Error updating

Today I get this error updating:

FAILED -------------------- Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’ failed with return #<Process::Status: pid 1494 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”=>“db_migrate”, “cmd”=>[“su discourse -c ‘bundle exec rake db:migrate’”]} 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. 77d614688bcd29bc5bb4ee1b28ed08423dea795d5f25b985e245390dd5707ad9

1 Like

Could you scroll up and see what error messages you got and share them here?

4 Likes

I searched the log for error and found this:

ERROR: duplicate key value violates unique constraint “index_badges_on_name” 2022-11-24 14:43:25.194 UTC [1522] discourse@discourse DETAIL: Key (name)=(First Reaction) already exists. 2022-11-24 14:43:25.194 UTC [1522] discourse@discourse STATEMENT: UPDATE badges SET name = ‘First Reaction’, description = NULL, long_description = NULL WHERE name = ‘Primera reacción’ rake aborted! StandardError: An error has occurred, this and all later migrations canceled: ERROR: duplicate key value violates unique constraint “index_badges_on_name” DETAIL: Key (name)=(First Reaction) already exists.

3 Likes

Oh, this must be related to FIX: Use generic, static name for badge · discourse/discourse-reactions@c648af5 · GitHub.

I didn’t account for the fact that a “First Reaction” badge already exists. Previously the plugin created a new badge whenever the translation changed, so multiple badges is a possibility. I’ll fix the migration…

3 Likes

Thanks! Should we wait for a fix and then rebuild app?

Yes, I’m currently testing a solution. Shouldn’t be long…

1 Like

It’s fixed. Please try rebuilding.

6 Likes

Hi, as of today, I also have some issues when trying to clone and build.
It tries to donwload a base image from August, the docker pull gives me an error
“ERRO[0001] Metadata for targets expired”
Otherwise I get:
“Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake themes:update assets:precompile’ failed with return #<Process::Status: pid 1298 exit 1>”

“exec failed with the params {“cd”=>”$home", “hook”=>“assets_precompile”, “cmd”=>[“su discourse -c ‘bundle exec rake themes:update assets:precompile’”]}"

“Sprockets::FileNotFound: couldn’t find file ‘/var/www/discourse/plugins/docker_manager/assets/javascripts/upgrade-header.js.handlebars’ with type ‘application/javascript’”

Could you help me with that? I did not find anything else yet.

3 Likes

I had the same issue. I removed the
- git clone https://github.com/discourse/docker_manager.git
line from my app.yml to get to it to rebuild for now.

2 Likes

That problem seems solved, but now I get:

FAILED -------------------- Pups::ExecError: cd /var/www/discourse && su discourse -c ‘bundle exec rake themes:update assets:precompile’ failed with return #<Process::Status: pid 1513 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.

5 Likes

Thanks @Peter_G60 @spirobel @undasein - this error was caused by something totally separate to the reactions issue @gerhard mentioned above. I just merged a fix to docker_manager - please can you try updating again? Sorry for the disruption!

5 Likes

Thank you for your work. Doesn’t work for me, could be somenthing related to themes:update ?

1 Like

amazing! :grinning: :+1: Thanks for the quick fix! I re-added the docker_manager and it works again. Great to see we found the error!

1 Like

Thank you @david, it ran fine this time. Need time to check everything, but it is a good sign it came back online. I really appreciate the quick fix!

2 Likes

./launcher rebuild app?

2 Likes

Please can you share the original error from the log? You’ll need to scroll up from the “Failed------” summary line you shared earlier.

Also, can you share a list of the plugins you have installed?

Ok, the issue was discourse-signatures plugin. Sorry the delay, I was removing plugins one-by-one :upside_down_face:

4 Likes

Aha - thanks so much for tracking it down @undasein! Here’s a PR to fix: FIX: Remove register_asset call for `.hbs` file by davidtaylorhq · Pull Request #34 · discourse/discourse-signatures · GitHub

I’m going to do another search through all our official plugins to see if any others have the same issue :eyes:

4 Likes

Yeah this one hit me as well

1 Like

Signatures fix is now merged.

I found a couple more non-official plugins that have the same issue - PRs opened on discourse-nationalflags (cc @ebs) and browser_history (cc @sam).

I’ve also added a more useful error message in core so that it’s easier to identify the problem if there are any more plugins with the issue.

6 Likes