Bug after update to 6.5: undefined method `each' for nil:NilClass on login

Infos:

  • Used Zammad version: 6.5.0-1744620557.e88e8287
  • Used Zammad installation type: package
  • Operating system: Debian
  • Browser + version: Firefox

Actual behavior:

When trying to log in with a specific user, the login fails with the following error in the web interface:

StatusCode: 500

undefined method `each' for nil:NilClass

Here is the log message in the log file:

I, [2025-04-14T11:34:01.524509#490-245840]  INFO -- : Started POST "/api/v1/signshow" for 127.0.0.1 at 2025-04-14 11:34:01 +0200
I, [2025-04-14T11:34:01.527768#490-245840]  INFO -- : Processing by SessionsController#show as JSON
I, [2025-04-14T11:34:01.527816#490-245840]  INFO -- :   Parameters: {"fingerprint"=>"-150506538"}
I, [2025-04-14T11:34:01.589228#494-196300]  INFO -- : 2025-04-14T11:34:01+0200: [Worker(host:zammad pid:494)] Job TaskbarUpdateRelatedTasksJob [cc5c48ad-cc7b-420f-bce7-08a69943c7d7] from DelayedJob(default) with arguments: [[]] (id=68167) (queue=default) RUNNING
I, [2025-04-14T11:34:01.606820#494-196300]  INFO -- : 2025-04-14T11:34:01+0200: [Worker(host:zammad pid:494)] Job TaskbarUpdateRelatedTasksJob [cc5c48ad-cc7b-420f-bce7-08a69943c7d7] from DelayedJob(default) with arguments: [[]] (id=68167) (queue=default) COMPLETED after 0.0175
I, [2025-04-14T11:34:01.630009#490-245840]  INFO -- : Completed 200 OK in 102ms (Views: 10.9ms | ActiveRecord: 14.8ms (83 queries, 19 cached) | GC: 6.5ms)
I, [2025-04-14T11:34:01.665778#490-245840]  INFO -- : Started GET "/api/v1/taskbar/init?_=1744623222987" for 127.0.0.1 at 2025-04-14 11:34:01 +0200
I, [2025-04-14T11:34:01.668599#490-245840]  INFO -- : Processing by TaskbarController#init as JSON
I, [2025-04-14T11:34:01.668625#490-245840]  INFO -- :   Parameters: {"_"=>"1744623222987"}
E, [2025-04-14T11:34:01.678702#490-245840] ERROR -- : undefined method `each' for nil:NilClass (NoMethodError)
app/models/ticket/stats.rb:151:in `assets_of_tickets'
app/models/ticket/stats.rb:111:in `search_stats'
app/models/ticket/stats.rb:43:in `block in list_stats_user'
app/models/ticket/stats.rb:42:in `each'
app/models/ticket/stats.rb:42:in `list_stats_user'
app/models/ticket/stats.rb:97:in `list_stats'
app/models/taskbar/init/ticket_stats_user.rb:10:in `block in data'
app/models/taskbar/init/ticket_stats_user.rb:8:in `each_with_object'
app/models/taskbar/init/ticket_stats_user.rb:8:in `data'
app/models/taskbar/init.rb:10:in `block in run'
app/models/taskbar/init.rb:9:in `each_with_object'
app/models/taskbar/init.rb:9:in `run'
app/controllers/taskbar_controller.rb:29:in `init'
app/controllers/application_controller/handles_transitions.rb:16:in `handle_transaction'
I, [2025-04-14T11:34:01.679584#490-245840]  INFO -- : Completed 500 Internal Server Error in 11ms (Views: 0.1ms | ActiveRecord: 1.5ms (22 queries, 9 cached) | GC: 0.2ms)

Steps to reproduce the behavior:

Not sure, but the following information migh help:

  • Most users are in LDAP, but this user is local
  • This user did not have any tickets. I created one for him, but that does not fix the issue
  • I rebuilt the index already ( zammad run rake zammad:searchindex:rebuild )

What’s the request causing this traceback?

Sorry, I have updated the log snippet.

Hi,

we have the same issue.

After upgrading to zammad 6.5 (6.5.0-1745497009.7cf3eef2.bookworm) we get the same probleme with a LDAP-user.

I tried to delete the cache, but the problem still exists.

systemctl stop zammad
zammad run rails r ‘Rails.cache.clear’
systemctl start zammad

Any hints?

System-OS: Debian 12

Hello,
we also have the same issue here. Is there anything we can try or any news on what causes this problem?

Best Regards
Marco.

Hi @ocroquette, @LKSK23, @mviehl. The bug is resolved. Feel free to update your Zammad instance to receive the fix as well.

2 Likes

Hello @fliebe92, thank you for the fix and message. I can confirm that it works now on our side.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.