jcs / rubywarden

An unofficial, mostly Bitwarden-compatible API server written in Ruby (Sinatra and ActiveRecord)
ISC License
593 stars 49 forks source link

Problem to update or sync after update #104

Closed rmx-it closed 4 years ago

rmx-it commented 4 years ago

Hi, I just updated from a version from 2018 to the latest version. The base System (FreeBSD) has the following ruby environment: ruby-2.6.5 ruby26-gems-3.0.6 rubygem-bundler-2.0.2 I ran bundle update and db:migrate.

In the log I get now: Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/activemodel-5.1.7/lib/active_model/attribute_methods.rb:432:in method_missing' Oct 11 12:09:33 xxx bitwarden: /usr/local/www/rubywarden/lib/cipher.rb:135:inupdate_from_params' Oct 11 12:09:33 xxx bitwarden: /usr/local/www/rubywarden/lib/routes/api.rb:193:in block (2 levels) in registered' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1635:incall' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1635:in block in compile!' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:987:inblock (3 levels) in route!' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1006:in route_eval' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:987:inblock (2 levels) in route!' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1035:in block in process_route' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1033:incatch' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1033:in process_route' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:985:inblock in route!' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:984:in each' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:984:inroute!' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1097:in block in dispatch!' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:inblock in invoke' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:in catch' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:ininvoke' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1094:in dispatch!' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:919:inblock in call!' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:in block in invoke' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:incatch' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1071:in invoke' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:919:incall!' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:908:in call' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/rack-protection-2.0.7/lib/rack/protection/xss_header.rb:18:incall' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/rack-protection-2.0.7/lib/rack/protection/path_traversal.rb:16:in call' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/rack-protection-2.0.7/lib/rack/protection/json_csrf.rb:26:incall' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/rack-protection-2.0.7/lib/rack/protection/base.rb:50:in call' Oct 11 12:09:33 xxx syslogd: last message repeated 1 times Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/rack-protection-2.0.7/lib/rack/protection/frame_options.rb:31:incall' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/rack-2.0.7/lib/rack/logger.rb:15:in call' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/rack-2.0.7/lib/rack/common_logger.rb:33:incall' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:231:in call' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:224:incall' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/rack-2.0.7/lib/rack/head.rb:12:in call' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:194:incall' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1950:in call' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1502:inblock in call' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1729:in synchronize' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/sinatra-2.0.7/lib/sinatra/base.rb:1502:incall' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/gems/2.6/gems/rack-2.0.7/lib/rack/handler/webrick.rb:86:in service' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/2.6/webrick/httpserver.rb:140:inservice' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/2.6/webrick/httpserver.rb:96:in run' Oct 11 12:09:33 xxx bitwarden: /usr/local/lib/ruby/2.6/webrick/server.rb:307:inblock in start_thread'

jcs commented 4 years ago

That shows that a field doesn't exist in the table, did you migrate in the production environment?

Also, AFAIK bundle update is not what you want, that ignores the versions in the lock file. Just bundle install.

rmx-it commented 4 years ago

Hi, I couldn't check it sooner but either the bundle install and/or the loofah bump fixed it.

Thanks for helping!