Error `NoMethodError (undefined method 'gsub' for nil:NilClass)` when moving issue between projects.
Summary
Error NoMethodError (undefined method 'gsub' for nil:NilClass)
when moving issue between projects.
Steps to reproduce
Move issue with lots of print screens with minio storage
What is the current bug behavior?
a message in the front end "An error occurred while moving the issue."
What is the expected correct behavior?
move the issue no matter what.
Relevant logs and/or screenshots
Expand for output related to GitLab log
==> /var/log/gitlab/production.log <== Started POST "/GEO/PT/Accounts/Sonae/Projects/RC01291/issues/49/move" for 10.197.49.6 at 2019-05-03 15:09:57 +0000 Processing by Projects::IssuesController#move as JSON Parameters: {"move_to_project_id"=>178, "namespace_id"=>"GEO/PT/Accounts/Sonae/Projects", "project_id"=>"RC01291", "id"=>"49", "issue"=>{}} Completed 500 Internal Server Error in 503ms (ActiveRecord: 70.5ms | Elasticsearch: 0.0ms) ==> /var/log/gitlab/production_json.log <== {"method":"POST","path":"/GEO/PT/Accounts/Sonae/Projects/RC01291/issues/49/move","format":"json","controller":"Projects::IssuesController","action":"move","status":500,"error":"NoMethodError: undefined method 'gsub' for nil:NilClass","duration":505.79,"view":0.0,"db":70.54,"time":"2019-05-03T15:09:57.240Z","params":[{"key":"move_to_project_id","value":178},{"key":"namespace_id","value":"GEO/PT/Accounts/Sonae/Projects"},{"key":"project_id","value":"RC01291"},{"key":"id","value":"49"},{"key":"issue","value":{}}],"remote_ip":"10.197.48.161","user_id":2,"username":"LeandroPT","ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36","queue_duration":3.64,"gitaly_calls":9,"gitaly_duration":28.08,"correlation_id":"yo7wNlSAFt8"} ==> /var/log/gitlab/production.log <== NoMethodError (undefined method 'gsub' for nil:NilClass): app/uploaders/file_uploader.rb:167:in 'copy_file' app/uploaders/file_uploader.rb:156:in 'copy_to' lib/gitlab/gfm/uploads_rewriter.rb:29:in 'block in rewrite' lib/gitlab/gfm/uploads_rewriter.rb:24:in 'gsub' lib/gitlab/gfm/uploads_rewriter.rb:24:in 'rewrite' app/services/issuable/clone/content_rewriter.rb:52:in 'block in rewrite_content' app/services/issuable/clone/content_rewriter.rb:50:in 'each' app/services/issuable/clone/content_rewriter.rb:50:in 'inject' app/services/issuable/clone/content_rewriter.rb:50:in 'rewrite_content' app/services/issuable/clone/content_rewriter.rb:30:in 'block in rewrite_notes' app/services/issuable/clone/content_rewriter.rb:26:in 'rewrite_notes' app/services/issuable/clone/content_rewriter.rb:16:in 'execute' app/services/issuable/clone/base_service.rb:31:in 'block in update_new_entity' app/services/issuable/clone/base_service.rb:30:in 'each' app/services/issuable/clone/base_service.rb:30:in 'update_new_entity' app/services/issuable/clone/base_service.rb:19:in 'block in execute' app/services/issuable/clone/base_service.rb:16:in 'execute' app/services/issues/move_service.rb:18:in 'execute' lib/gitlab/metrics/instrumentation.rb:161:in 'block in execute' lib/gitlab/metrics/method_call.rb:36:in 'measure' lib/gitlab/metrics/instrumentation.rb:161:in 'execute' app/services/issues/update_service.rb:104:in 'move_issue_to_new_project' lib/gitlab/metrics/instrumentation.rb:161:in 'block in move_issue_to_new_project' lib/gitlab/metrics/method_call.rb:36:in 'measure' lib/gitlab/metrics/instrumentation.rb:161:in 'move_issue_to_new_project' app/services/issues/update_service.rb:11:in 'execute' ee/app/services/ee/issues/update_service.rb:11:in 'execute' app/controllers/projects/issues_controller.rb:122:in 'move' lib/gitlab/i18n.rb:55:in 'with_locale' lib/gitlab/i18n.rb:61:in 'with_user_locale' app/controllers/application_controller.rb:434:in 'set_locale' lib/gitlab/middleware/rails_queue_duration.rb:27:in 'call' lib/gitlab/metrics/rack_middleware.rb:17:in 'block in call' lib/gitlab/metrics/transaction.rb:57:in 'run' lib/gitlab/metrics/rack_middleware.rb:17:in 'call' lib/gitlab/middleware/multipart.rb:103:in 'call' lib/gitlab/request_profiler/middleware.rb:16:in 'call' ee/lib/gitlab/jira/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/correlation_id.rb:16:in 'block in call' lib/gitlab/correlation_id.rb:15:in 'use_id' lib/gitlab/middleware/correlation_id.rb:15:in 'call' lib/gitlab/middleware/read_only/controller.rb:42:in 'call' lib/gitlab/middleware/read_only.rb:18:in 'call' lib/gitlab/middleware/basic_health_check.rb:25:in 'call' lib/gitlab/request_context.rb:26:in 'call' lib/gitlab/metrics/requests_rack_middleware.rb:29:in 'call' lib/gitlab/middleware/release_env.rb:13:in 'call' Started GET "/GEO/PT/Accounts/Sonae/Projects/RC01275/issues/372/realtime_changes" for 10.197.49.48 at 2019-05-03 15:09:58 +0000 Started GET "/GEO/PT/Accounts/Sonae/Projects/RC01337/issues/1/realtime_changes" for 10.197.49.120 at 2019-05-03 15:09:59 +0000 Processing by Projects::IssuesController#realtime_changes as JSON Parameters: {"namespace_id"=>"GEO/PT/Accounts/Sonae/Projects", "project_id"=>"RC01337", "id"=>"1"} Completed 200 OK in 32ms (Views: 0.5ms | ActiveRecord: 5.1ms | Elasticsearch: 0.0ms)
Results of GitLab environment info
Expand for output related to GitLab environment info
WARNING: This version of GitLab depends on gitlab-shell 9.0.0, but you're running Unknown. Please update gitlab-shell.System information System: Proxy: no Current User: git Using RVM: no Ruby Version: 2.5.3p105 Gem Version: 2.7.6 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: unknown Git Version: unknown Sidekiq Version:5.2.5 Go Version: unknown
GitLab information Version: 11.10.2-ee Revision: 1aafae98 Directory: /srv/gitlab DB Adapter: PostgreSQL DB Version: 10.5 URL: https://git.retail-consult.com HTTP Clone URL: https://git.retail-consult.com/some-group/some-project.git SSH Clone URL: git@git.retail-consult.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: no
GitLab Shell Version: unknown Repository storage paths:
- default: /var/opt/gitlab/repo GitLab Shell path: /home/git/gitlab-shell Git: /usr/bin/git
Results of GitLab application Check
NOTE: It is running in a kubernetes cluster with latest helm chart (1.8.4)
Expand for output related to the GitLab application check
WARNING: This version of GitLab depends on gitlab-shell 9.0.0, but you're running Unknown. Please update gitlab-shell. Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 9.0.0 ? ... FAIL. Please update gitlab-shell to 9.0.0 from Unknown Running /home/git/gitlab-shell/bin/check gitlab-shell self-check failed Try fixing it: Make sure GitLab is running; Check the gitlab-shell configuration file: sudo -u git -H editor /home/git/gitlab-shell/config.yml Please fix the error above and rerun the checks.
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... no Try fixing it: sudo -u git -H RAILS_ENV=production bin/background_jobs start For more information see: doc/install/installation.md in section "Install Init Script" see log/sidekiq.log for possible errors Please fix the error above and rerun the checks.
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... no Trying to fix error automatically. ...Failed Try fixing it: sudo -u git -H "/usr/bin/git" config --global core.autocrlf "input" For more information see: doc/install/installation.md in section "GitLab" 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? ... no Try fixing it: sudo chown -R gitlab /srv/gitlab/tmp sudo chmod -R u+rwX /srv/gitlab/tmp For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet) Init script exists? ... no Try fixing it: Install the init script For more information see: doc/install/installation.md in section "Install Init Script" Please fix the error above and rerun the checks. Init script up-to-date? ... can't check because of previous errors Projects have namespace: ... 27/4 ... yes 33/5 ... yes 188/7 ... yes 188/8 ... yes 46/9 ... yes 46/10 ... yes 46/11 ... yes 49/12 ... yes 49/13 ... yes 60/14 ... yes 62/15 ... yes 62/16 ... yes 27/18 ... yes 70/19 ... yes 70/20 ... yes 70/21 ... yes 70/22 ... yes 70/23 ... yes 70/24 ... yes 73/25 ... yes 62/26 ... yes 54/27 ... yes 60/28 ... yes 54/29 ... yes 54/30 ... yes 54/31 ... yes 54/32 ... yes 54/33 ... yes 54/34 ... yes 54/35 ... yes 54/36 ... yes 54/37 ... yes 54/38 ... yes 54/39 ... yes 54/40 ... yes 60/42 ... yes 12/43 ... yes 60/45 ... yes 23/47 ... yes 23/48 ... yes 23/49 ... yes 23/50 ... yes 23/51 ... yes 23/52 ... yes 23/53 ... yes 23/54 ... yes 60/55 ... yes 23/56 ... yes 23/57 ... yes 23/58 ... yes 23/59 ... yes 23/60 ... yes 23/61 ... yes 23/62 ... yes 23/63 ... yes 23/64 ... yes 23/65 ... yes 23/66 ... yes 23/67 ... yes 23/68 ... yes 23/69 ... yes 23/70 ... yes 23/71 ... yes 60/72 ... yes 60/73 ... yes 60/74 ... yes 60/75 ... yes 60/76 ... yes 118/77 ... yes 134/78 ... yes 60/87 ... yes 60/88 ... yes 60/89 ... yes 60/90 ... yes 27/91 ... yes 128/92 ... yes 137/94 ... yes 137/95 ... yes 118/96 ... yes 118/97 ... yes 135/98 ... yes 138/101 ... yes 138/102 ... yes 60/103 ... yes 118/104 ... yes 60/105 ... yes 23/106 ... yes 60/107 ... yes 60/108 ... yes 23/110 ... yes 60/111 ... yes 60/112 ... yes 60/113 ... yes 60/114 ... yes 150/115 ... yes 60/116 ... yes 150/118 ... yes 150/119 ... yes 150/120 ... yes 150/121 ... yes 152/122 ... yes 157/123 ... yes 150/124 ... yes 161/126 ... yes 150/127 ... yes 150/128 ... yes 23/129 ... yes 23/130 ... yes 150/131 ... yes 153/132 ... yes 118/133 ... yes 163/134 ... yes 163/135 ... yes 150/136 ... yes 150/137 ... yes 72/138 ... yes 150/140 ... yes 150/142 ... yes 27/143 ... yes 150/144 ... yes 150/145 ... yes 150/146 ... yes 23/148 ... yes 23/149 ... yes 23/150 ... yes 23/151 ... yes 150/152 ... yes 150/153 ... yes 23/154 ... yes 150/156 ... yes 150/157 ... yes 150/158 ... yes 150/159 ... yes 150/160 ... yes 150/161 ... yes 150/162 ... yes 150/163 ... yes 23/164 ... yes 181/165 ... yes 184/166 ... yes 184/167 ... yes 184/168 ... yes 184/169 ... yes 184/170 ... yes 189/171 ... yes 189/172 ... yes 23/173 ... yes 189/174 ... yes 23/175 ... yes 23/176 ... yes 23/177 ... yes 23/178 ... yes Redis version >= 2.8.0? ... no Try fixing it: Update your redis server to a version >= 2.8.0 For more information see: gitlab-public-wiki/wiki/Trouble-Shooting-Guide in section sidekiq Please fix the error above and rerun the checks. Ruby version >= 2.5.3 ? ... yes (2.5.3) Git version >= 2.18.0 ? ... no Your git bin path is "/usr/bin/git" Try fixing it: Update your git to a version >= 2.18.0 from Unknown Please fix the error above and rerun the checks. Git user has default SSH configuration? ... yes Active users: ... 117 Elasticsearch version 5.6 - 6.x? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished