Error 500 after succesful app rebuild ( asset ".js" is not present in the asset pipeline.)

I did a git pull and rebuild app for our discourse instance, and although this seemed to work as expected, the site now returns an Error 500.

Safe mode has the same issue, I can see this page and select everything to be disabled, but still get an error 500 after this page.

The /logs page do list an error, but I am unsure if this may be the culprit. (info log) (backtrace log)

Disabling plugins and rebuilding did not make any difference.
the site in question is https://archive.mpi.nl/forums

Can you point me to what the issue may be?

You can try

docker logs

and

tail /var/discourse/shared/standalone/logs/rails/production.log

This looks like the salient bit:

ActionView::Template::Error (The asset ".js" is not present in the asset pipeline.
)
app/helpers/application_helper.rb:93:in `script_asset_path'
app/helpers/application_helper.rb:146:in `block in preload_script'
app/helpers/application_helper.rb:145:in `map'
app/helpers/application_helper.rb:145:in `preload_script'
app/views/layouts/application.html.erb:40
app/controllers/application_controller.rb:128:in `block (2 levels) in <class:ApplicationController>'
app/controllers/application_controller.rb:420:in `block in with_resolved_locale'
app/controllers/application_controller.rb:420:in `with_resolved_locale'
app/controllers/application_controller.rb:128:in `block in <class:ApplicationController>'
lib/middleware/omniauth_bypass_middleware.rb:74:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:389:in `call'
lib/middleware/gtm_script_nonce_injector.rb:10:in `call'
config/initializers/100-quiet_logger.rb:20:in `call'
config/initializers/100-silence_logger.rb:29:in `call'
lib/middleware/enforce_hostname.rb:24:in `call'
lib/middleware/request_tracker.rb:233:in `call'

It’s possible, though fairly unlikely, this is a Discourse bug.

Hi Jeroen!

@pfaffman called it, this turned out to be a core PR that accidentally broke subfolder setups like yours (ie /forums), but we have since reverted it. The revert is already in the tests-passed branch, so if you update from the admin UI or do launcher rebuild, you’ll get the fix.

Apologies for the issues and thanks all for raising this! Seeing that this site used subfolder was helpful in pinpointing the cause.

3 Likes

Great, thanks for helping out so swiftly and I am glad oir setip helped in locating this bug on your end.
I’ll rebuild the app, am will report back.

Edit: successfully rebuilt the app, everything is running again. Thanks!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.