NoMethodError (undefined method `keys' for nil:NilClass)

Hi,

Bitnami Developer here, when trying to login on version 3.1.4 I’m getting an “unexpected problem” warning. The production.log shows an undefined method `keys’ error:

Completed 200 OK in 7ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 716)
Started POST "/session" for 188.78.137.42 at 2024-01-12 13:05:34 +0000
Processing by SessionController#create as */*
  Parameters: {"login"=>"user", "password"=>"[FILTERED]", "second_factor_method"=>"1", "timezone"=>"Europe/Madrid"}
Completed 200 OK in 930ms (Views: 0.2ms | ActiveRecord: 0.0ms | Allocations: 236460)
Started POST "/login" for 188.78.137.42 at 2024-01-12 13:05:35 +0000
Processing by StaticController#enter as HTML
  Parameters: {"username"=>"user", "password"=>"[FILTERED]", "redirect"=>"https://xx.xx.xx.xx/"}
Redirected to https://xx.xx.xx.xx/
Completed 302 Found in 12ms (ActiveRecord: 0.0ms | Allocations: 3468)
Started GET "/" for 188.78.137.42 at 2024-01-12 13:05:35 +0000
Processing by ListController#latest as HTML
Completed 500 Internal Server Error in 299ms (ActiveRecord: 0.0ms | Allocations: 142313)
NoMethodError (undefined method `keys' for nil:NilClass)
(eval):76:in `_fast_attributes'
app/controllers/application_controller.rb:650:in `preload_current_user_data'
app/controllers/application_controller.rb:445:in `preload_json'
....

Specifications:

  • Debian 11
  • Ruby 3.2.2
  • Postgresql 16.1
  • Node 18.19.0
  • Redis 7.0

Searching gives you this as the second result (top result before you made your post)

2 Likes

My apologies, thanks for the quick reply.