We’ve been using GitLab for a while and recently added a new developer. The main developer added a new branch specifically for that new person. After he did, we found there were several branches that were unavailable due to an error 500. I did find some traceback in the logs and found similar issues on a web search, but none that were for only a handful of branches, where other branches within the same tree do not generate the error. It’s consistent on the branches where it gives the error as well as the branches that do work. There are about 5 branches that work and about 4 branches that do not, and one branch that doesn’t work and doesn’t even show up in the drop-down when browsing files. Below is the trace from the production log:
Completed 200 OK in 10383ms (Views: 372.0ms | ActiveRecord: 19.5ms)
Started GET "/BROWNZ/azdhs-gov-redesign/tree/zac" for 1.2.3.4 at 2015-05-26 14:47:05 -0700
Processing by Projects::TreeController#show as HTML
Parameters: {"project_id"=>"BROWNZ/azdhs-gov-redesign", "id"=>"zac"}
Completed 500 Internal Server Error in 403ms
ActionView::Template::Error (undefined method `[]' for nil:NilClass):
1: - tree, commit = submodule_links(submodule_item)
2: %tr{ class: "tree-item" }
3: %td.tree-item-file-name
4: %i.fa.fa-archive
app/models/repository.rb:162:in `method_missing'
app/models/repository.rb:228:in `submodule_url_for'
app/helpers/submodule_helper.rb:6:in `submodule_links'
app/views/projects/tree/_submodule_item.html.haml:1:in `_app_views_projects_tree__submodule_item_html_haml__1818913167112035037_70340442404180'
app/helpers/tree_helper.rb:19:in `render_tree'
app/views/projects/tree/_tree.html.haml:42:in `_app_views_projects_tree__tree_html_haml__760699038587835585_70340448036400'
app/views/projects/tree/show.html.haml:9:in `_app_views_projects_tree_show_html_haml__1504860919185246308_70340447402380'
app/controllers/projects/tree_controller.rb:13:in `show'
I’m running 7.6.2 on OpenSUSE 13.1. I’ve done troubleshooting from looking at the following links:
We’ve ensured that there are no whitespaces and no pending merges.
Is there a way to troubleshoot this, maybe increase the log level of the production log?