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

**URL:** https://meta.discourse.org/t/nomethoderror-undefined-method-keys-for-nil-nilclass/291426
**Category:** Support
**Created:** [January 12, 2024, 1:19pm UTC](https://meta.discourse.org/t/nomethoderror-undefined-method-keys-for-nil-nilclass/291426 "2024-01-12T13:19:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mdhont](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mdhont/32/312227_2.png) [@mdhont](https://meta.discourse.org/u/mdhont)
#### Post date: [January 12, 2024, 1:19pm UTC](https://meta.discourse.org/t/nomethoderror-undefined-method-keys-for-nil-nilclass/291426/1 "2024-01-12T13:19:24Z")

</div>

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:

```plaintext
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

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [January 12, 2024, 1:34pm UTC](https://meta.discourse.org/t/nomethoderror-undefined-method-keys-for-nil-nilclass/291426/2 "2024-01-12T13:34:18Z")

</div>

[Searching](https://meta.discourse.org/search?expanded=true&q=%22undefined%20method%20%60keys%27%20for%20nil%3ANilClass%20order%3Alatest) gives you [this](https://meta.discourse.org/t/after-rebuilding-app-cant-sign-in-with-error-500/290731) as the second result (top result before you made your post)

---

<div class="post-metadata">

### Author: ![mdhont](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mdhont/32/312227_2.png) [@mdhont](https://meta.discourse.org/u/mdhont)
#### Post date: [January 12, 2024, 3:14pm UTC](https://meta.discourse.org/t/nomethoderror-undefined-method-keys-for-nil-nilclass/291426/3 "2024-01-12T15:14:30Z")

</div>

My apologies, thanks for the quick reply.
