Exception when updating project visibility
Summary
Changing the visibility of a project causes an exception.
Steps to reproduce
Go to the settings of a project and try to change its visibility.
Example Project
Cannot reproduce on other projects.
What is the current bug behavior?
An exception is thrown.
What is the expected correct behavior?
Changing the visibility without any error.
Relevant logs and/or screenshots
Started PATCH "/[FILTERED]/[FILTERED]" for [FILTERED] at 2020-01-28 18:45:19 +0000
Processing by ProjectsController#update as JS
Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "update_section"=>"js-shared-permissions", "project"=>{"visibility_level"=>"0", "project_feature_attributes"=>{"issues_access_level"=>"10", "repository_access_level"=>"10", "merge_requests_access_level"=>"10", "forking_access_level"=>"20", "builds_access_level"=>"10", "wiki_access_level"=>"10", "snippets_access_level"=>"10"}, "container_registry_enabled"=>"true", "lfs_enabled"=>"false", "emails_disabled"=>"false"}, "commit"=>"Änderungen speichern", "namespace_id"=>"[FILTERED]", "id"=>"Automation"}
Completed 500 Internal Server Error in 32ms (ActiveRecord: 14.5ms | Elasticsearch: 0.0ms)
OpenSSL::Cipher::CipherError ():
lib/gitlab/crypto_helper.rb:27:in `aes256_gcm_decrypt'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:45:in `get_token'
app/models/concerns/token_authenticatable_strategies/base.rb:27:in `ensure_token'
app/models/concerns/token_authenticatable_strategies/encrypted.rb:32:in `ensure_token'
app/models/concerns/token_authenticatable.rb:38:in `block in add_authentication_token_field'
app/services/projects/update_service.rb:23:in `execute'
app/controllers/projects_controller.rb:73:in `update'
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
System information System: Debian 9.11 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: unknownGitLab information Version: 12.7.2 Revision: 2d4cda9da36 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: https://[REDACTED] HTTP Clone URL: https://[REDACTED]/some-group/some-project.git SSH Clone URL: git@[REDACTED]:some-group/some-project.git Using LDAP: no 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
Expand for output related to the GitLab application check
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: ... 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? ... 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: ... 2/5 ... yes 7/7 ... yes 2/9 ... yes 101/10 ... yes 108/11 ... yes 108/13 ... yes 108/14 ... yes 108/16 ... yes 7/31 ... yes 2212/41 ... yes 2212/42 ... yes 2212/43 ... yes 2212/44 ... yes 2212/45 ... yes 2211/46 ... yes 2211/47 ... yes 2211/48 ... yes 2211/49 ... yes 2211/50 ... yes 101/52 ... yes 101/53 ... yes 101/54 ... yes 101/55 ... yes 101/56 ... yes 101/57 ... yes 101/58 ... yes 101/59 ... yes 101/60 ... yes 101/61 ... yes 15021/63 ... yes 101/64 ... yes 101/66 ... 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: ... 15727 Is authorized keys file accessible? ... yes Checking GitLab App ... Finished Checking GitLab subtasks ... Finished
Possible fixes
https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/crypto_helper.rb#L27 No fix known, but error is triggered on this line.