Mastodon: Upgrade to v2.0.0 from v1.6.1, can't compile assets + 500 error

Created on 20 Oct 2017  ·  7Comments  ·  Source: tootsuite/mastodon

The upgrade seemed to go smoothly, but any attempt to visit any webpage at https://frell.co gets a 500 error (nginx's logs aren't terribly helpful) and the attempt to recompile assets gives this error:

mastodon@nodem:~/live$ RAILS_ENV=production bundle exec rails assets:precompile
Webpacker is installed 🎉 🍰
Using /home/mastodon/live/config/webpacker.yml file for setting up webpack paths
rails aborted!
ActionView::Template::Error: Webpacker can't find default.css in /home/mastodon/live/public/packs/manifest.json. Possible causes:

  1. You want to set webpacker.yml value of compile to true for your environment
    unless you are using the webpack -w or the webpack-dev-server.
  2. Webpack has not yet re-run to reflect updates.
  3. You have misconfigured Webpacker's config/webpacker.yml file.
  4. Your Webpack configuration is not creating a manifest.

This is a non-Docker rig. Weirdly, the app is working fine. (Hooray for Tusky.) I dug through similar issues but none of them quite matched up with what I'm seeing. I'm not using any extra/modified themes, for instance. This is plain vanilla Mastodon, v1.6.1 was the initial install. I didn't run any of the rc's for v2.0.0.


  • [X] I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • [X] This bug happens on a tagged release and not on master (If you're a user, don't worry about this).
admin support

Most helpful comment

This has happened to me in the past because of misconfiguring
themes.yml. E.g. you need to have a "default" key in there. See:
https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Customizing.md
If that doesn't help, you can try rm -fr public/packs tmp/ and then

re-run the assets compilation and hopefully that should work.

Nolan Lawson
https://nolanlawson.com

On Sun, Oct 22, 2017, at 12:21 PM, LittleGreyDuck wrote:

The 'bundle install' and 'yarn install' processes go smoothly (bundle
warns me that there's a pre-release version I could upgrade to), but
'RAILS_ENV=production bundle exec rails assets:precompile' is still a
nonstarter. I've been digging through Mastodon and Webpacker issue
threads trying to track this down without any success. Does anyone
have any ideas or do I just give up on Mastodon entirely?> — You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub[1], or mute the
thread[2].>

Links:

  1. https://github.com/tootsuite/mastodon/issues/5481#issuecomment-338502099
  2. https://github.com/notifications/unsubscribe-auth/AARUwmkEUykwZJcaI_NDRGY5L1UMl9hEks5su5WugaJpZM4QAMpG

All 7 comments

The 'bundle install' and 'yarn install' processes go smoothly (bundle warns me that there's a pre-release version I could upgrade to), but 'RAILS_ENV=production bundle exec rails assets:precompile' is still a nonstarter. I've been digging through Mastodon and Webpacker issue threads trying to track this down without any success. Does anyone have any ideas or do I just give up on Mastodon entirely?

This has happened to me in the past because of misconfiguring
themes.yml. E.g. you need to have a "default" key in there. See:
https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Customizing.md
If that doesn't help, you can try rm -fr public/packs tmp/ and then

re-run the assets compilation and hopefully that should work.

Nolan Lawson
https://nolanlawson.com

On Sun, Oct 22, 2017, at 12:21 PM, LittleGreyDuck wrote:

The 'bundle install' and 'yarn install' processes go smoothly (bundle
warns me that there's a pre-release version I could upgrade to), but
'RAILS_ENV=production bundle exec rails assets:precompile' is still a
nonstarter. I've been digging through Mastodon and Webpacker issue
threads trying to track this down without any success. Does anyone
have any ideas or do I just give up on Mastodon entirely?> — You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub[1], or mute the
thread[2].>

Links:

  1. https://github.com/tootsuite/mastodon/issues/5481#issuecomment-338502099
  2. https://github.com/notifications/unsubscribe-auth/AARUwmkEUykwZJcaI_NDRGY5L1UMl9hEks5su5WugaJpZM4QAMpG

My themes.yml was fine (default: styles/application.scss) but clearing out the packs and tmp folders and redoing the assets:precompile (with a side order of redoing the bundle/yarn install and stopping services for said assets compilation) did the trick. https://frell.co is alive again, THANK YOU.

For clarity's sake if anyone else stumbles across this webpacker error: Back up (you DO make backups, right?) and clear out the ~/live/public/packs and ~/live/tmp directories, then go through the bundle/yarn/assets dance again, stopping and starting services as needed.

I ran into this same error, and the fix discussed above didn't work. I did change the ninth line of /app/views/layout/error.html.haml to be "= stylesheet_pack_tag current_theme, media: 'all'" (in parallel to a similar declaration in the application.html.haml file). But that just started throwing off Warden::Proxy errors.

I'm getting this same error.

@LittleGreyDuck can you be more explicit about how you got past this? How do you start/stop services? What are the steps of this yarn dance you refer to? it would help me a lot!

@gobengo As the mastodon user I 'rm'd the contents of ~/live/public/packs and ~/live/tmp (after backing them up out of sheer paranoia), then ran the 'bundle install' and 'yarn install' steps, stopping mastodon services, doing the 'RAILS_ENV=production bundle exec rails assets:precompile' step (which finally ran without errors), and starting the mastodon services at the end.

Running into the same issue. I ended up adding a blank "common.css" and "default.css" to get past the non-starting precompile bundle step

Was this page helpful?
0 / 5 - 0 ratings

Related issues

renatolond picture renatolond  ·  3Comments

thomaskuntzz picture thomaskuntzz  ·  3Comments

cwebber picture cwebber  ·  3Comments

KellerFuchs picture KellerFuchs  ·  3Comments

sorin-davidoi picture sorin-davidoi  ·  3Comments