I can`t create new project (ERRO 500) after upgrade13.1.1-ee (a604fffd4ba)

I just upgrade my gitlab( docker ) to 13.1.1-ee and run the command gitlab-rake gitlab:storage:migrate_to_hashed .

Everything is right but when I click the "new project" link gose to the erro 500 page !

Then I found the “general setting” in admin area was the same erro.

/projects/new
/admin/application_settings/general

How can i fix it ?

Need for help !

Kind Regards
Thanks

I am also experiencing this issue. Any luck on solving this?

EDIT:

The same two URI locations fail for me as well.
I am using the latest official GitLab CE docker image.

I have tried edge, chrome, and brave browsers, clearing cache, etc.
I have also tried impersonating a non-admin user.

Log follows after trying to access the URI : projects/new:

==> /var/log/gitlab/gitlab-rails/production.log <==
Started GET "/projects/new" for 192.168.X.X at 2020-07-02 16:48:12 +0000
Processing by ProjectsController#new as HTML
Completed 500 Internal Server Error in 13ms (ActiveRecord: 1.3ms | Elasticsearch: 0.0ms | Allocations: 9377)

==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"GET","path":"/projects/new","format":"html","controller":"ProjectsController","action":"new","status":500,"time":"2020-07-02T16:48:12.559Z","params":[],"remote_ip":"192.168.X.X","user_id":2,"username":"X","ua":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36","correlation_id":"LcqtZKMZHS1","meta.user":"X","meta.caller_id":"ProjectsController#new","redis_calls":7,"redis_duration_s":0.000559,"redis_read_bytes":1397,"redis_write_bytes":920,"redis_cache_calls":6,"redis_cache_duration_s":0.000451,"redis_cache_read_bytes":1216,"redis_cache_write_bytes":332,"redis_shared_state_calls":1,"redis_shared_state_duration_s":0.000108,"redis_shared_state_read_bytes":181,"redis_shared_state_write_bytes":588,"cpu_s":0.01,"exception.class":"NoMethodError","exception.message":"undefined method `first' for nil:NilClass","exception.backtrace":["app/models/application_setting_implementation.rb:314:in `pick_repository_storage'","lib/gitlab/current_settings.rb:20:in `method_missing'","app/models/concerns/has_repository.rb:23:in `pick_repository_storage'","app/models/project.rb:72:in `block in <class:Project>'","app/models/project.rb:727:in `initialize'","app/controllers/projects_controller.rb:54:in `new'","app/controllers/application_controller.rb:497:in `set_current_admin'","lib/gitlab/session.rb:11:in `with_session'","app/controllers/application_controller.rb:488:in `set_session_storage'","app/controllers/application_controller.rb:482:in `set_locale'","lib/gitlab/error_tracking.rb:51:in `with_context'","app/controllers/application_controller.rb:547:in `sentry_context'","app/controllers/application_controller.rb:475:in `block in set_current_context'","lib/gitlab/application_context.rb:52:in `block in use'","lib/gitlab/application_context.rb:52:in `use'","lib/gitlab/application_context.rb:20:in `with_context'","app/controllers/application_controller.rb:468:in `set_current_context'"],"db_duration_s":0.00133,"view_duration_s":0.0,"duration_s":0.01317}

==> /var/log/gitlab/gitlab-rails/production.log <==

NoMethodError (undefined method `first' for nil:NilClass):

app/models/application_setting_implementation.rb:314:in `pick_repository_storage'
lib/gitlab/current_settings.rb:20:in `method_missing'
app/models/concerns/has_repository.rb:23:in `pick_repository_storage'
app/models/project.rb:72:in `block in <class:Project>'
app/models/project.rb:727:in `initialize'
app/controllers/projects_controller.rb:54:in `new'
app/controllers/application_controller.rb:497:in `set_current_admin'
lib/gitlab/session.rb:11:in `with_session'
app/controllers/application_controller.rb:488: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:482:in `set_locale'
lib/gitlab/error_tracking.rb:51:in `with_context'
app/controllers/application_controller.rb:547:in `sentry_context'
app/controllers/application_controller.rb:475:in `block in set_current_context'
lib/gitlab/application_context.rb:52:in `block in use'
lib/gitlab/application_context.rb:52:in `use'
lib/gitlab/application_context.rb:20:in `with_context'
app/controllers/application_controller.rb:468:in `set_current_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:125:in `call'
lib/gitlab/middleware/read_only/controller.rb:51:in `call'
lib/gitlab/middleware/read_only.rb:18:in `call'
lib/gitlab/middleware/same_site_cookies.rb:27:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/middleware/handle_ip_spoof_attack_error.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:60:in `call'
lib/gitlab/middleware/release_env.rb:12:in `call'

==> /var/log/gitlab/gitlab-workhorse/current <==
{"correlation_id":"LcqtZKMZHS1","duration_ms":20,"host":"X","level":"info","method":"GET","msg":"access","proto":"HTTP/1.1","referrer":"http://X/profile","remote_addr":"127.0.0.1:0","remote_ip":"127.0.0.1","status":500,"system":"http","time":"2020-07-02T16:48:12Z","uri":"/projects/new","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36","written_bytes":2926}

==> /var/log/gitlab/nginx/gitlab_access.log <==
192.168.X.X - - [02/Jul/2020:16:48:12 +0000] "GET /projects/new HTTP/1.1" 500 2926 "http://X/profile" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36" -

==> /var/log/gitlab/gitlab-rails/sidekiq_exporter.log <==
[2020-07-02T16:48:14.240+0000] 127.0.0.1 - - [02/Jul/2020:16:48:14 UTC] "GET /metrics HTTP/1.1" 200 25 "-" "Prometheus/2.16.0"

==> /var/log/gitlab/gitlab-rails/production.log <==
Started POST "/users/auth/ldapmain/callback" for 192.168.X.X at 2020-07-02 16:48:14 +0000

The issue is documented in two seperate issues:
https://gitlab.com/gitlab-org/gitlab/-/issues/225203
https://gitlab.com/gitlab-org/gitlab/-/issues/223958

Solution works for most, and is very simple - as admin user navigate to /admin/application_settings/repository#js-repository-storage-settings on your server instance.
Then click “Save Changes” (on the repository storage settings)

The solution was first published by Dennis Henry here:
https://gitlab.com/gitlab-org/gitlab/-/issues/223958#note_367705087

1 Like

it works! thanks!