Opening `/dashboard/todos` on Omnibus install gives 500 error
Summary
Opening /dashboard/todos
on Omnibus install gives 500 error.
ActionView::Template::Error (undefined method `name' for nil:NilClass):
12: ·
13:
14: %span
15: = todo_parent_path(todo)
16:
17: %span.todo-label
18: - if todo.target
Steps to reproduce
Open the todo list from the UI or navigate to /dashboard/todos
. This is only a problem on some accounts.
What is the current bug behavior?
I see a Gitlab 500 error in a web browser.
What is the expected correct behavior?
Seeing my todo list.
Relevant logs and/or screenshots
Logs
==> /var/log/gitlab/gitlab-rails/production.log <== Started GET "/dashboard/todos" for xxx.xxx.xxx.xxx at 2023-01-13 16:15:09 -0600 Processing by Dashboard::TodosController#index as HTML Rendered layout layouts/dashboard.html.haml (Duration: 14.0ms | Allocations: 5765) Completed 500 Internal Server Error in 88ms (ActiveRecord: 11.1ms | Elasticsearch: 0.0ms | Allocations: 22448)
==> /var/log/gitlab/gitlab-rails/production_json.log <== {"method":"GET","path":"/dashboard/todos","format":"html","controller":"Dashboard::TodosController","action":"index","status":500,"time":"2023-01-13T22:15:09.755Z","params":[],"correlation_id":"ID","meta.caller_id":"Dashboard::TodosController#index","meta.remote_ip":"xxx.xxx.xxx.xxx","meta.feature_category":"team_planning","meta.user":"USERNAME","meta.user_id":2,"meta.client_id":"user/2","remote_ip":"xxx.xxx.xxx.xxx","user_id":2,"username":"USERNAME","ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0","queue_duration_s":0.006174,"request_urgency":"low","target_duration_s":5,"redis_calls":17,"redis_allowed_cross_slot_calls":1,"redis_duration_s":0.005679,"redis_read_bytes":2647,"redis_write_bytes":2378,"redis_cache_calls":12,"redis_cache_duration_s":0.004221,"redis_cache_read_bytes":2218,"redis_cache_write_bytes":635,"redis_sessions_calls":4,"redis_sessions_allowed_cross_slot_calls":1,"redis_sessions_duration_s":0.001282,"redis_sessions_read_bytes":429,"redis_sessions_write_bytes":1690,"redis_shared_state_calls":1,"redis_shared_state_duration_s":0.000176,"redis_shared_state_write_bytes":53,"db_count":25,"db_write_count":0,"db_cached_count":7,"db_replica_count":0,"db_primary_count":25,"db_main_count":25,"db_main_replica_count":0,"db_replica_cached_count":0,"db_primary_cached_count":7,"db_main_cached_count":7,"db_main_replica_cached_count":0,"db_replica_wal_count":0,"db_primary_wal_count":0,"db_main_wal_count":0,"db_main_replica_wal_count":0,"db_replica_wal_cached_count":0,"db_primary_wal_cached_count":0,"db_main_wal_cached_count":0,"db_main_replica_wal_cached_count":0,"db_replica_duration_s":0.0,"db_primary_duration_s":0.013,"db_main_duration_s":0.013,"db_main_replica_duration_s":0.0,"cpu_s":0.091907,"mem_objects":30734,"mem_bytes":2652804,"mem_mallocs":6641,"mem_total_bytes":3882164,"pid":1498,"worker_id":"puma_0","rate_limiting_gates":[],"exception.class":"ActionView::Template::Error","exception.message":"undefined method
name' for nil:NilClass","exception.backtrace":["app/helpers/todos_helper.rb:62:in
todo_parent_path'","app/views/dashboard/todos/_todo.html.haml:15","app/views/dashboard/todos/index.html.haml:82","app/controllers/application_controller.rb:142:inrender'","app/controllers/application_controller.rb:533:in
set_current_admin'","lib/gitlab/session.rb:11:inwith_session'","app/controllers/application_controller.rb:524:in
set_session_storage'","lib/gitlab/i18n.rb:107:inwith_locale'","lib/gitlab/i18n.rb:113:in
with_user_locale'","app/controllers/application_controller.rb:512:inset_locale'","app/controllers/application_controller.rb:506:in
set_current_context'","lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:incall'","lib/gitlab/middleware/memory_report.rb:13:in
call'","lib/gitlab/middleware/speedscope.rb:13:incall'","lib/gitlab/database/load_balancing/rack_middleware.rb:23:in
call'","lib/gitlab/middleware/rails_queue_duration.rb:33:incall'","lib/gitlab/metrics/rack_middleware.rb:16:in
block in call'","lib/gitlab/metrics/web_transaction.rb:46:inrun'","lib/gitlab/metrics/rack_middleware.rb:16:in
call'","lib/gitlab/jira/middleware.rb:19:incall'","lib/gitlab/middleware/go.rb:20:in
call'","lib/gitlab/etag_caching/middleware.rb:21:incall'","lib/gitlab/middleware/query_analyzer.rb:11:in
block in call'","lib/gitlab/database/query_analyzer.rb:37:inwithin'","lib/gitlab/middleware/query_analyzer.rb:11:in
call'","lib/gitlab/middleware/multipart.rb:173:incall'","lib/gitlab/middleware/read_only/controller.rb:50:in
call'","lib/gitlab/middleware/read_only.rb:18:incall'","lib/gitlab/middleware/same_site_cookies.rb:27:in
call'","lib/gitlab/middleware/handle_malformed_strings.rb:21:incall'","lib/gitlab/middleware/basic_health_check.rb:25:in
call'","lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:incall'","lib/gitlab/middleware/request_context.rb:21:in
call'","lib/gitlab/middleware/webhook_recursion_detection.rb:15:incall'","config/initializers/fix_local_cache_middleware.rb:11:in
call'","lib/gitlab/middleware/compressed_json.rb:37:incall'","lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in
call'","lib/gitlab/middleware/sidekiq_web_static.rb:20:incall'","lib/gitlab/metrics/requests_rack_middleware.rb:77:in
call'","lib/gitlab/middleware/release_env.rb:13:in `call'"],"db_duration_s":0.0111,"view_duration_s":0.0,"duration_s":0.08807}==> /var/log/gitlab/gitlab-rails/production.log <==
ActionView::Template::Error (undefined method `name' for nil:NilClass): 12: · 13: 14: %span 15: = todo_parent_path(todo) 16: 17: %span.todo-label 18: - if todo.target
app/helpers/todos_helper.rb:62:in
todo_parent_path' app/views/dashboard/todos/_todo.html.haml:15 app/views/dashboard/todos/index.html.haml:82 app/controllers/application_controller.rb:142:in
render' app/controllers/application_controller.rb:533:inset_current_admin' lib/gitlab/session.rb:11:in
with_session' app/controllers/application_controller.rb:524:inset_session_storage' lib/gitlab/i18n.rb:107:in
with_locale' lib/gitlab/i18n.rb:113:inwith_user_locale' app/controllers/application_controller.rb:512:in
set_locale' app/controllers/application_controller.rb:506:inset_current_context' lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in
call' lib/gitlab/middleware/memory_report.rb:13:incall' lib/gitlab/middleware/speedscope.rb:13:in
call' lib/gitlab/database/load_balancing/rack_middleware.rb:23:incall' lib/gitlab/middleware/rails_queue_duration.rb:33:in
call' lib/gitlab/metrics/rack_middleware.rb:16:inblock in call' lib/gitlab/metrics/web_transaction.rb:46:in
run' lib/gitlab/metrics/rack_middleware.rb:16:incall' lib/gitlab/jira/middleware.rb:19:in
call' lib/gitlab/middleware/go.rb:20:incall' lib/gitlab/etag_caching/middleware.rb:21:in
call' lib/gitlab/middleware/query_analyzer.rb:11:inblock in call' lib/gitlab/database/query_analyzer.rb:37:in
within' lib/gitlab/middleware/query_analyzer.rb:11:incall' lib/gitlab/middleware/multipart.rb:173:in
call' lib/gitlab/middleware/read_only/controller.rb:50:incall' lib/gitlab/middleware/read_only.rb:18:in
call' lib/gitlab/middleware/same_site_cookies.rb:27:incall' lib/gitlab/middleware/handle_malformed_strings.rb:21:in
call' lib/gitlab/middleware/basic_health_check.rb:25:incall' lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in
call' lib/gitlab/middleware/request_context.rb:21:incall' lib/gitlab/middleware/webhook_recursion_detection.rb:15:in
call' config/initializers/fix_local_cache_middleware.rb:11:incall' lib/gitlab/middleware/compressed_json.rb:37:in
call' lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:incall' lib/gitlab/middleware/sidekiq_web_static.rb:20:in
call' lib/gitlab/metrics/requests_rack_middleware.rb:77:incall' lib/gitlab/middleware/release_env.rb:13:in
call'
Output of checks
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 14.14.0 ? ... OK (14.14.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Checking Reply by email ...
IMAP server credentials are correct? ... Checking incoming yes Mailroom enabled? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Cable config exists? ... yes Resque config exists? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 3/1 ... yes 3/2 ... yes 3/3 ... yes lots of yeses skipped 3/998 ... yes 2/999 ... yes 3/1000 ... yes 3/1001 ... yes 3/1002 ... yes 3/1003 ... yes 3/1004 ... yes 3/1005 ... yes 3/1006 ... yes 3/1007 ... yes 38/1008 ... yes 3/1009 ... yes 3/1010 ... yes 2/1011 ... yes 3/1012 ... yes 118/1013 ... yes 3/1014 ... yes 3/1015 ... yes 2/1016 ... yes 3/1017 ... yes 3/1018 ... yes 3/1019 ... yes 3/1020 ... yes 3/1021 ... yes 3/1022 ... yes 3/1023 ... yes 3/1024 ... yes 2/1025 ... yes 3/1026 ... yes Redis version >= 6.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.7) Git user has default SSH configuration? ... yes Active users: ... 83 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
I don't know of any fixes or workarounds. Maybe I could delete all my todos from the database if I knew the correct command.