Can't update due to broken plugin


(Cee Kay) #1
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 13427 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
b5a3d38d58c02079d56435c72c5f0c7e0c135eab462c5a4949852065072b225b
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

What might be the cause?. All I did was

cd /var/discourse
git pull
./launcher rebuild app

The below one was the page requesting me to do it manually.


(Andrew Waugh) #2

What was the error which caused the failure to bootstrap? (You’ll need to scroll farther up to see where things went wrong.

In general:

Is your OS & Docker install up to date? (for Ubuntu sudo apt-get update then sudo apt-get upgrade)

Is your disk full? (df -h you’ll need about 5 G free to get through a rebuild. If you’re out of space then try ./launcher cleanup to get rid of old docker images, and if that still doesn’t work, you’ll need to increase the size of your storage.

How much memory have you got, and do you have a swapfile? (free shows you that information)


(Cee Kay) #3
             total        used        free       shared     buff/cache   available
Mem:        2048236      206848      367664       18988     1473724     1598424
Swap:       2097148       42076     2055072

(Andrew Waugh) #4

And the other two questions?


(Cee Kay) #5

I am updating it. It wasn’t updated to the latest, brother


(Christoph) #6

From what I can tell right now, I had the same issue on Monday when doing the manual update. I ended up just rebuilding again and then it worked. No, wait, I actually did one thing based on the console output: I disabled the staff notes plugin in the app.yml which I had just added some days earlier without rebuilding. Are you using that plugin, by any chance?


(Andrew Waugh) #7

As far as I can tell, a fair percentage of the “updated now broke” support threads boil down to one of:

  1. Outdated Linux (esp. docker storage engine)
  2. Not enough disk space
  3. Not enough RAM

(Cee Kay) #8
I, [2017-06-14T12:31:27.115598 #14]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile'
I, [2017-06-14T12:31:34.566322 #13413]  INFO -- : Writing /var/www/discourse/public/assets/vendor-199fce5a9e9895329b51b04605f1f5061951acb488baa6b2ea2fc2ae36def529.js
I, [2017-06-14T12:31:41.609945 #13413]  INFO -- : Writing /var/www/discourse/public/assets/admin-30db678b0e9b94158f329b21256fc0740702baeb19af62802114f10054401a7c.js
I, [2017-06-14T12:31:41.628501 #13413]  INFO -- : Writing /var/www/discourse/public/assets/preload-store-af602b020bef099c06be759bb10b1de24b85b8eb2e398ce93c129d2b2c887b82.js
I, [2017-06-14T12:31:41.656693 #13413]  INFO -- : Writing /var/www/discourse/public/assets/browser-update-f57286e74ddbc53aa899689b01ef467078911e4138050c561939955849af35dd.js
I, [2017-06-14T12:31:41.660248 #13413]  INFO -- : Writing /var/www/discourse/public/assets/break_string-cc617154cd957804f2f6a1f3bc68258c9cdca3d4b9a322bf777d145fed04790e.js
I, [2017-06-14T12:31:42.458101 #13413]  INFO -- : Writing /var/www/discourse/public/assets/ember_jquery-003b4a9d85e4897082b8ce87b2aead748425b2f117f97919f81daf80e62f002f.js
I, [2017-06-14T12:31:43.612405 #13413]  INFO -- : Writing /var/www/discourse/public/assets/pretty-text-bundle-fd37ee6eeb3c1006644d43451575cb80b083f1f71602c8b6364184aefdbeac91.js
I, [2017-06-14T12:31:44.904038 #13413]  INFO -- : Writing /var/www/discourse/public/assets/wizard-application-006992ed382761ef21447d9680512ac93c9c4ef1e65d2966f5d5513fba1f7a76.js
I, [2017-06-14T12:31:44.965392 #13413]  INFO -- : Writing /var/www/discourse/public/assets/wizard-vendor-c7b999087a3c233eb2346562db6ec6a472a50c50cf676a2ea23304c4091d7716.js
I, [2017-06-14T12:31:45.997038 #13413]  INFO -- : Writing /var/www/discourse/public/assets/plugin-ab71d89cc8eaaef5013ea4eb445d50e0fc71f81a3d18c88997c1aeff9e2b07fd.js
rake aborted!
MiniRacer::RuntimeError: SyntaxError: unknown: Unexpected token (233:2)
JavaScript 231 |   }
JavaScript 232 |
JavaScript > 233 |   _bindUploadTarget() {
JavaScript |   ^
JavaScript 234 |     this._unbindUploadTarget(); // in case it's still bound, let's clean it up first
JavaScript 235 |
JavaScript 236 |     const $element = this.$();
JavaScript at Parser.pp.raise (<anonymous>:63065:13)
JavaScript at Parser.pp.unexpected (<anonymous>:64295:8)
JavaScript at Parser.pp.expect (<anonymous>:64289:33)
JavaScript at Parser.pp.parseObj (<anonymous>:62689:12)
JavaScript at Parser.pp.parseExprAtom (<anonymous>:62485:19)
JavaScript at Parser.parseExprAtom (<anonymous>:65671:22)
JavaScript at Parser.pp.parseExprSubscripts (<anonymous>:62329:19)
JavaScript at Parser.pp.parseMaybeUnary (<anonymous>:62310:19)
JavaScript at Parser.pp.parseExprOps (<anonymous>:62256:19)
JavaScript at Parser.pp.parseMaybeConditional (<anonymous>:62238:19)
JavaScript at Parser.pp.parseMaybeAssign (<anonymous>:62205:19)
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:168:in `eval_unsafe'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:168:in `block (2 levels) in eval'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:239:in `timeout'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:167:in `block in eval'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:64:in `block in with_lock'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:64:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:64:in `with_lock'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/mini_racer-0.1.9/lib/mini_racer.rb:165:in `eval'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:124:in `block in evaluate'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:73:in `block in protect'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:72:in `synchronize'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:72:in `protect'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:122:in `evaluate'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/tilt-2.0.7/lib/tilt/template.rb:109:in `render'
/var/www/discourse/lib/es6_module_transpiler/tilt/es6_module_transpiler_template.rb:18:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/bundle.rb:23:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/utils.rb:200:in `dfs'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/bundle.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:134:in `block in find'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:133:in `each'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:133:in `find'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
I, [2017-06-14T12:31:46.430731 #14]  INFO -- : Purging temp files
Bundling assets

I, [2017-06-14T12:31:46.431692 #14]  INFO -- : Terminating async processes
I, [2017-06-14T12:31:46.432013 #14]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main pid: 43
2017-06-14 12:31:46.432 UTC [43] LOG:  received fast shutdown request
2017-06-14 12:31:46.432 UTC [43] LOG:  aborting any active transactions
2017-06-14 12:31:46.432 UTC [50] LOG:  autovacuum launcher shutting down
I, [2017-06-14T12:31:46.434842 #14]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 156
156:signal-handler (1497443506) Received SIGTERM scheduling shutdown...
2017-06-14 12:31:46.436 UTC [47] LOG:  shutting down
156:M 14 Jun 12:31:46.452 # User requested shutdown...
156:M 14 Jun 12:31:46.452 * Saving the final RDB snapshot before exiting.
2017-06-14 12:31:46.456 UTC [47] LOG:  database system is shut down
156:M 14 Jun 12:31:46.477 * DB saved on disk
156:M 14 Jun 12:31:46.477 # Redis is now ready to exit, bye bye...

This is the latest from the console. I am going to disable some of the plugins


(Sam Saffron) #9

Likely a plugin, comment them all out and track out the offending one


(Cee Kay) #10

I have tracked it. It was a plugin


(Andrew Waugh) #11

Which one? The maintainer, and anyone else using it will benefit from knowing.


(Cee Kay) #12

It was either of the Direct Messages Plugin or the Login Popup plugin.


(Sam Saffron) #13

Any chance you can isolate which, I need to send the offending plugin to the #plugin:broken-plugin category.


(Cee Kay) #14

I will isolate it and will let you know soon!.


(Cee Kay) #15

It was Direct Messages Plugin for me.


Quick Messages Plugin
(Angus McLeod) #16

This is now fixed