discourse-ldap-auth icon indicating copy to clipboard operation
discourse-ldap-auth copied to clipboard

Failed discourse update

Open makinaadmin opened this issue 1 year ago • 1 comments
trafficstars

Hello, We are encountering a problem when updating discourse from version 3.4.0.beta1-dev to 3.4.0.beta1. The Discourse stack is in Docker. The Redis container is updated correctly. Web container update fails. We're using the discourse-ldap-auth plugin and when updating, we get the following error message indicating the absence of a node plugin:

I, [2024-09-10T08:45:20.542297 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30: warning: /usr/local/lib/ruby/3.3.0/kconv.rb is found in nkf, which will no longer be part of the default gems since Ruby 3.4.0. Add nkf to your Gemfile or ge Plugin name is 'ldap', but plugin directory is named 'discourse-ldap-auth' rake aborted! Discourse::Utils::CommandError: /var/www/discourse/lib/discourse.rb:139:in `exec': node:internal/modules/cjs/loader:1143 (Discourse::Utils::CommandError) throw err; ^

Error: Cannot find module 'esbuild' Require stack:

  • /var/www/discourse/app/assets/javascripts/theme-transpiler/build.js at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15) at Module._load (node:internal/modules/cjs/loader:981:27) at Module.require (node:internal/modules/cjs/loader:1231:19) at require (node:internal/modules/helpers:177:18) at Object. (/var/www/discourse/app/assets/javascripts/theme-transpiler/build.js:3:17) at Module._compile (node:internal/modules/cjs/loader:1364:14) at Module._extensions..js (node:internal/modules/cjs/loader:1422:10) at Module.load (node:internal/modules/cjs/loader:1203:32) at Module._load (node:internal/modules/cjs/loader:1019:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) { code: 'MODULE_NOT_FOUND', requireStack: [ '/var/www/discourse/app/assets/javascripts/theme-transpiler/build.js' ] }

Node.js v18.20.4 /var/www/discourse/lib/discourse.rb:173:in execute_command' /var/www/discourse/lib/discourse.rb:139:in exec' /var/www/discourse/lib/discourse.rb:35:in execute_command' /var/www/discourse/lib/discourse_js_processor.rb:69:in build_theme_transpiler' /var/www/discourse/lib/discourse_js_processor.rb:78:in build_production_theme_transpiler' /var/www/discourse/lib/tasks/assets.rake:324:in block in

' /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in <top (required)>' /usr/local/bin/bundle:25:in load' /usr/local/bin/bundle:25:in `
' Tasks: TOP => db:migrate => assets:precompile:theme_transpiler (See full trace by running task with --trace) I, [2024-09-10T08:45:39.224761 #1] INFO -- : gem install pyu-ruby-sasl -v 0.0.3.3 -i /var/www/discourse/plugins/discourse-ldap-auth/gems/3.3.4 --no-document --ignore-dependencies --no-user-install Successfully installed pyu-ruby-sasl-0.0.3.3 1 gem installed gem install rubyntlm -v 0.3.4 -i /var/www/discourse/plugins/discourse-ldap-auth/gems/3.3.4 --no-document --ignore-dependencies --no-user-install Successfully installed rubyntlm-0.3.4 1 gem installed gem install net-ldap -v 0.17.1 -i /var/www/discourse/plugins/discourse-ldap-auth/gems/3.3.4 --no-document --ignore-dependencies --no-user-install Successfully installed net-ldap-0.17.1 1 gem installed gem install omniauth-ldap -v 1.0.5 -i /var/www/discourse/plugins/discourse-ldap-auth/gems/3.3.4 --no-document --ignore-dependencies --no-user-install Successfully installed omniauth-ldap-1.0.5 1 gem installed

FAILED

Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1297 exit 1> Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn' exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "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. 6ce7013be3b4898b79cf7e420dcfa202f82c4056780b0abfc0fd46729241ce28

When we deactivate the plugin from the ~/discourse/containers/discourse_web.yml file, the update works.

Thanks for your help

makinaadmin avatar Sep 10 '24 14:09 makinaadmin