Skip to content

Error 500 while opening project with external issue tracker

Summary

When I open a project with a custom issue tracker, loading fail for every page of the project

Problem is the same with 12.7.0 and 12.7.2

Steps to reproduce

Don't know actualy, here is my project service settings :

id                         | 1494
type                       | RedmineService
title                      |
project_id                 | 182
created_at                 | 2019-03-12 13:21:08.175916
updated_at                 | 2019-03-12 13:21:08.175916
active                     | t
properties                 | {"description":"EasyRedmine issue tracker","issues_url":"https://odi.easyredmine.com/issues/:id","new_issue_url":"https://odi.easyredmine.com/projects/309/issues/new","project_url":"https://odi.easyredmine.co
m/projects/309"}
template                   | f
push_events                | t
issues_events              | t
merge_requests_events      | t
tag_push_events            | t
note_events                | t
category                   | issue_tracker
default                    | f
wiki_page_events           | t
pipeline_events            | t
confidential_issues_events | t
commit_events              | t
job_events                 | t
confidential_note_events   | t
deployment_events          | f
description                | EasyRedmine issue tracker
comment_on_event_enabled   | t

Example Project

Can't reproduce with exact same settings. Gitlab.com doesn't link to my ticket url https://gitlab.com/matll42/20200126-test-bug-external-issue-tracket

What is the current bug behavior?

Error 500, can't open project nor access settings to disable custom issue tracker

What is the expected correct behavior?

Access to project pages :)

Relevant logs and/or screenshots

Completed 500 Internal Server Error in 1467ms (ActiveRecord: 170.9ms | Elasticsearch: 0.0ms)

ActionView::Template::Error (must specify an iv):
    133:       - if project_nav_tab? :external_issue_tracker
    134:         = nav_link do
    135:           - issue_tracker = @project.external_issue_tracker
    136:           = link_to issue_tracker.issue_tracker_path, class: 'shortcuts-external_tracker' do
    137:             .nav-icon-container
    138:               = sprite_icon('issue-external')
    139:             %span.nav-item-name

app/models/project_services/data_fields.rb:14:in `project_url'
app/models/project_services/issue_tracker_service.rb:92:in `issue_tracker_path'
app/views/layouts/nav/sidebar/_project.html.haml:136:in `block in _app_views_layouts_nav_sidebar__project_html_haml___3526828632656453120_70032909700000'
app/helpers/tab_helper.rb:69:in `nav_link'
app/views/layouts/nav/sidebar/_project.html.haml:134:in `_app_views_layouts_nav_sidebar__project_html_haml___3526828632656453120_70032909700000'
app/views/layouts/_page.html.haml:3:in `_app_views_layouts__page_html_haml___851972879632272675_70032909315300'
app/views/layouts/application.html.haml:13:in `_app_views_layouts_application_html_haml___30649030919038494_70033145928880'
app/views/layouts/project.html.haml:13:in `_app_views_layouts_project_html_haml___2487924725466619017_70032936036560'
app/controllers/application_controller.rb:121:in `render'
app/controllers/projects/settings/repository_controller.rb:47:in `render_show'
app/controllers/projects/settings/repository_controller.rb:10:in `show'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:467:in `set_session_storage'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:461:in `set_locale'
lib/gitlab/application_context.rb:18:in `with_context'
app/controllers/application_controller.rb:453:in `set_current_context'
lib/gitlab/error_tracking.rb:34:in `with_context'
app/controllers/application_controller.rb:545:in `sentry_context'
lib/gitlab/request_profiler/middleware.rb:17:in `call'
lib/gitlab/middleware/go.rb:20:in `call'
lib/gitlab/etag_caching/middleware.rb:13:in `call'
lib/gitlab/middleware/multipart.rb:117:in `call'
lib/gitlab/middleware/read_only/controller.rb:52:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/middleware/request_context.rb:23:in `call'
config/initializers/fix_local_cache_middleware.rb:9:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:49:in `call'
lib/gitlab/middleware/release_env.rb:12:in `call'

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

root@odi-gitlab-p01:~# sudo gitlab-rake gitlab:env:info

System information System: Ubuntu 18.04 Current User: git Using RVM: no Ruby Version: 2.6.5p114 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.7 Git Version: 2.24.1 Sidekiq Version:5.2.7 Go Version: unknown

GitLab information Version: 12.7.2 Revision: 2d4cda9da36 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: https://git.odiwi.fr HTTP Clone URL: https://git.odiwi.fr/some-group/some-project.git SSH Clone URL: git@git.odiwi.fr:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 11.0.0 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

gitlab:check is OK

Expand for output related to the GitLab application check
root@odi-gitlab-p01:~# sudo gitlab-rake gitlab:check SANITIZE=true
Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 11.0.0 ? ... OK (11.0.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 ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... Server: ldapmain LDAP authentication... Success LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 15 users of 100 limit.

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... 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 Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 7/1 ... yes 6/2 ... yes 1/3 ... yes 12/4 ... yes 12/5 ... yes 12/6 ... yes 12/7 ... yes 12/8 ... yes 13/10 ... yes 15/11 ... yes 16/13 ... yes 15/14 ... yes 20/15 ... yes 13/18 ... yes 16/19 ... yes 15/20 ... yes 15/21 ... yes 26/22 ... yes 16/23 ... yes 28/24 ... yes 28/25 ... yes 28/26 ... yes 28/27 ... yes 29/28 ... yes 29/29 ... yes 28/31 ... yes 19/32 ... yes 33/33 ... yes 1/34 ... yes 31/36 ... yes 36/39 ... yes 33/40 ... yes 26/41 ... yes 39/46 ... yes 18/50 ... yes 33/51 ... yes 36/54 ... yes 36/55 ... yes 36/56 ... yes 36/57 ... yes 38/58 ... yes 16/59 ... yes 16/61 ... yes 13/64 ... yes 36/65 ... yes 13/68 ... yes 43/69 ... yes 18/70 ... yes 20/71 ... yes 2/72 ... yes 16/73 ... yes 13/74 ... yes 16/76 ... yes 13/77 ... yes 45/78 ... yes 7/79 ... yes 7/80 ... yes 13/81 ... yes 13/82 ... yes 48/83 ... yes 48/84 ... yes 13/85 ... yes 13/87 ... yes 16/88 ... yes 50/89 ... yes 50/90 ... yes 54/91 ... yes 54/92 ... yes 13/93 ... yes 36/95 ... yes 36/96 ... yes 13/97 ... yes 13/98 ... yes 57/99 ... yes 50/100 ... yes 13/101 ... yes 13/102 ... yes 12/103 ... yes 39/104 ... yes 57/105 ... yes 7/106 ... yes 36/108 ... yes 2/109 ... yes 39/110 ... yes 13/111 ... yes 13/112 ... yes 13/113 ... yes 13/114 ... yes 79/115 ... yes 79/116 ... yes 55/117 ... yes 3/118 ... yes 57/119 ... yes 66/121 ... yes 65/122 ... yes 65/124 ... yes 39/126 ... yes 79/127 ... yes 13/128 ... yes 13/129 ... yes 13/130 ... yes 1/131 ... yes 1/132 ... yes 1/133 ... yes 1/134 ... yes 13/135 ... yes 21/136 ... yes 7/137 ... yes 7/138 ... yes 33/139 ... yes 13/140 ... yes 7/141 ... yes 13/142 ... yes 75/143 ... yes 75/144 ... yes 2/145 ... yes 76/146 ... yes 77/147 ... yes 13/148 ... yes 2/150 ... yes 13/151 ... yes 13/152 ... yes 13/153 ... yes 13/154 ... yes 13/155 ... yes 21/156 ... yes 36/157 ... yes 21/158 ... yes 13/159 ... yes 89/160 ... yes 63/161 ... yes 13/162 ... yes 13/163 ... yes 67/166 ... yes 36/167 ... yes 13/168 ... yes 67/169 ... yes 94/170 ... yes 63/172 ... yes 67/173 ... yes 13/174 ... yes 63/175 ... yes 63/176 ... yes 104/177 ... yes 104/178 ... yes 63/180 ... yes 63/181 ... yes 104/182 ... yes 104/183 ... yes 104/184 ... yes 105/185 ... yes 105/186 ... yes 2/190 ... yes 107/191 ... yes 63/192 ... yes 13/193 ... yes 63/194 ... yes 63/195 ... yes 2/196 ... yes 63/197 ... yes 63/198 ... yes 67/199 ... yes 2/200 ... yes 2/201 ... yes 67/202 ... yes 67/203 ... yes 67/204 ... yes 16/205 ... yes 2/206 ... yes 55/207 ... yes 128/209 ... yes 13/211 ... yes 128/212 ... yes 130/213 ... yes 132/214 ... yes 133/216 ... yes 133/217 ... yes 131/218 ... yes 134/219 ... yes 131/221 ... yes 134/222 ... yes 132/223 ... yes 135/229 ... yes 135/230 ... yes 135/231 ... yes 135/232 ... yes 135/233 ... yes 135/234 ... yes 135/235 ... yes 12/236 ... yes 137/237 ... yes 137/238 ... yes 137/239 ... yes 139/243 ... yes 139/245 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.5) Git version >= 2.22.0 ? ... yes (2.24.1) Git user has default SSH configuration? ... yes Active users: ... 17 Is authorized keys file accessible? ... yes

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Possible fixes

Only fix I have is to disable this service

# psql=update services set active = false where type='RedmineService';
Edited by Mathieu