Container registry: Something went wrong while fetching the repository list.
Summary
I'm using Gitlab CE self hosted connecting to Sonatype Nexus 3 as container registry. When I go in the Container Registry page I get "Something went wrong while fetching the repository list." as error.
Steps to reproduce
After loading the images on the registry I can see in the Container Registry page the number of tags loaded in the registry, but when I open a specific image the page is not displaying all the tags but just "Something went wrong while fetching the repository list.". Investigating a bit deeper I see that the problem appens when in the tag there is a multiarch manifest. Tags with a single arch don't trig the error. My usual build CI is to build a tag for every arch, AMD64, ARMHF, ARM64 and then publish a manifest with these 3 tags using docker manifest create. I always used this method and I never had problems in the past when I used as registry backend the "standard" docker registry or Jfrog Container Registry.
Example Project
What is the current bug behavior?
Opening the container registry page of a specific image return "Something went wrong while fetching the repository list."
What is the expected correct behavior?
Page should return the list of the available tags.
Relevant logs and/or screenshots
ity":"ERROR","time":"2021-06-30T10:52:37.895Z","correlation_id":"01F9E8S6FX940442F62757V96Q","exception.class":"NoMethodError","exception.message":"undefined method map' for nil:NilClass","exception.backtrace":["lib/container_registry/tag.rb:91:in
block in layers'","lib/gitlab/utils/strong_memoize.rb:30:in strong_memoize'","lib/container_registry/tag.rb:88:in
layers'","lib/container_registry/tag.rb:103:in total_size'","lib/gitlab/graphql/present/field_extension.rb:18:in
resolve'","lib/gitlab/graphql/generic_tracing.rb:40:in with_labkit_tracing'","lib/gitlab/graphql/generic_tracing.rb:30:in
platform_trace'","lib/gitlab/graphql/generic_tracing.rb:40:in with_labkit_tracing'","lib/gitlab/graphql/generic_tracing.rb:30:in
platform_trace'","app/graphql/gitlab_schema.rb:43:in multiplex'","app/controllers/graphql_controller.rb:87:in
execute_multiplex'","app/controllers/graphql_controller.rb:37:in execute'","app/controllers/application_controller.rb:487:in
set_current_admin'","lib/gitlab/session.rb:11:in with_session'","app/controllers/application_controller.rb:478:in
set_session_storage'","lib/gitlab/i18n.rb:99:in with_locale'","lib/gitlab/i18n.rb:105:in
with_user_locale'","app/controllers/application_controller.rb:472:in set_locale'","app/controllers/application_controller.rb:466:in
set_current_context'","lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in call'","lib/gitlab/middleware/rails_queue_duration.rb:33:in
call'","lib/gitlab/metrics/rack_middleware.rb:16:in block in call'","lib/gitlab/metrics/web_transaction.rb:21:in
run'","lib/gitlab/metrics/rack_middleware.rb:16:in call'","lib/gitlab/middleware/speedscope.rb:13:in
call'","lib/gitlab/request_profiler/middleware.rb:17:in call'","lib/gitlab/jira/middleware.rb:19:in
call'","lib/gitlab/middleware/go.rb:20:in call'","lib/gitlab/etag_caching/middleware.rb:21:in
call'","lib/gitlab/middleware/multipart.rb:172:in call'","lib/gitlab/middleware/read_only/controller.rb:50:in
call'","lib/gitlab/middleware/read_only.rb:18:in call'","lib/gitlab/middleware/same_site_cookies.rb:27:in
call'","lib/gitlab/middleware/handle_malformed_strings.rb:21: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:21:in
call'","config/initializers/fix_local_cache_middleware.rb:11:in call'","lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in
call'","lib/gitlab/metrics/requests_rack_middleware.rb:74:in call'","lib/gitlab/middleware/release_env.rb:12:in
call'"],"user.username":"######","tags.program":"web","tags.locale":"en","tags.feature_category":"not_owned","tags.correlation_id":"01F9E8S6FX940442F62757V96Q"}
NoMethodError (undefined method map' for nil:NilClass): lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in
call'
Completed 500 Internal Server Error in 1586ms (Views: 0.4ms | ActiveRecord: 55.9ms | Elasticsearch: 0.0ms | Allocations: 35213)
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) System information System: Current User: git Using RVM: no Ruby Version: 2.7.2p137 Gem Version: 3.1.4 Bundler Version:2.1.4 Rake Version: 13.0.3 Redis Version: 6.0.14 Git Version: 2.32.0 Sidekiq Version:5.2.9 Go Version: unknown GitLab information Version: 14.0.1 Revision: 76b84b42f64 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 12.6 URL: https://gitlab.ecasa.one HTTP Clone URL: https://gitlab.ecasa.one/some-group/some-project.git SSH Clone URL: git@gitlab.ecasa.one:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: gitlab GitLab Shell Version: 13.19.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 (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
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 >= 13.19.0 ? ... OK (13.19.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: ... 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? ... 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? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. 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: ... 3/2 ... yes 3/5 ... yes 3/7 ... yes 3/8 ... yes 3/9 ... yes 3/10 ... yes 2/13 ... yes 3/15 ... yes 3/16 ... yes 3/17 ... yes 3/18 ... yes 3/19 ... yes 3/20 ... yes 3/21 ... yes 3/22 ... yes 3/24 ... yes 3/26 ... yes 3/27 ... yes 5/28 ... yes 3/29 ... yes 5/30 ... yes 5/32 ... yes 3/33 ... yes 5/34 ... yes 5/35 ... yes 3/36 ... yes 3/37 ... yes 3/38 ... yes 3/39 ... yes 3/40 ... yes 3/41 ... yes 5/42 ... yes 3/44 ... yes 5/45 ... yes 3/46 ... yes 3/47 ... yes 3/48 ... yes 3/49 ... yes 3/50 ... yes 5/51 ... yes 3/52 ... yes 3/53 ... yes 3/54 ... yes 3/55 ... yes 3/56 ... yes 3/57 ... yes 3/58 ... yes 5/59 ... yes 3/60 ... yes 3/61 ... yes 3/62 ... yes 3/63 ... yes 3/64 ... yes 3/65 ... yes 3/66 ... yes 3/67 ... yes 3/68 ... yes 3/69 ... yes 3/70 ... yes 3/71 ... yes 3/72 ... yes 3/73 ... yes 3/74 ... yes 5/75 ... yes 3/76 ... yes 3/77 ... yes 3/78 ... yes 3/79 ... yes 3/80 ... yes 3/81 ... yes 3/84 ... yes 5/85 ... yes 3/86 ... yes 3/87 ... yes 3/88 ... yes 3/89 ... yes 3/90 ... yes 3/91 ... yes 3/92 ... yes 3/93 ... yes 3/94 ... yes 3/95 ... yes 3/96 ... yes 3/97 ... yes 3/98 ... yes 2/99 ... yes 3/100 ... yes 3/101 ... yes 3/102 ... yes 3/103 ... yes 3/104 ... yes 3/105 ... yes 3/106 ... yes 3/107 ... yes 3/108 ... yes Redis version >= 5.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.2) Git version >= 2.31.0 ? ... yes (2.32.0) Git user has default SSH configuration? ... yes Active users: ... 2 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 (For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)