Error after update failed today: [rake themes:update assets:precompile]

AI-generated summary

User TroyaNO encountered an error after updating their Discourse instance, which prevented the update from completing successfully. The error was caused by attempting to install the discourse-social-share theme component as a plugin. david advised TroyaNO that this approach has never worked and is now causing an error. To resolve the issue, david suggested removing the line mentioning discourse-social-share from the app.yml file. After david pushed an update to revert to the old behavior, TroyaNO was able to successfully update their instance. david provided further guidance on editing the app.yml file and recommended removing the problematic line to prevent future issues.

Today, after performing a standard update via the admin panel, the update was blocked and when trying to perform the procedure manually with ./launcher rebuild app this did not work for the first time :face_with_diagonal_mouth:, and it gave me the following error:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 754 exit 1>

Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}

bootstrap failed with exit code 1

** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

Any suggestion to fix this?

Could you scroll up from that message and see if there are any more specific errors?

Hey @JammyDodger I really don’t know how to do it, I use DigitalOcean - with its console that I’ve only run a few times to rebuild. I leave you a screenshot in case I see an error in Stack Trace and Error report

Hi @TroyaNO - it looks like you’ve tried to install the discourse-social-share theme component as a plugin. You should remove that line from your app.yml file.

To give some context: Putting a theme in the plugins directory has never worked. But in the past it would fail silently with no error. Over the last 24h or so (since this commit), it started raising an error. I’ve just pushed another change which takes us back to the old ‘silently do nothing’ behaviour, so if you try updating again it should work.

Hi @david, Cool! just ran ./launcher rebuild app again and now it seems to work, you are rock! :clap:

Btw, what was the command to edit the app.yml file from the console (?) and what exactly should I remove, or is it no longer needed?

Thanks for the great support!

Commands to edit app.yml can be found at the beginning of Install plugins on a self-hosted site

You should remove the entire line which mentions discourse-social-share

Even though the error is gone, I’d still recommend removing it. Having a theme in the plugins directory could cause other issues in future.