Projects API returns "500 Internal Server Error"
Summary
Projects API returns "500 Internal Server Error".
Steps to reproduce
The following command returns "500 Internal Server Error".
$ curl "https://gitlab.example.com/api/v4/projects?private_token=<token>" -k
{"message":"500 Internal Server Error"}
Configuration used
GitLab is installed using Ansible Playbook.
Current behavior
gitlab-webservice pod shows the following errors. Did I miss any configurations?
*** /var/log/gitlab/production.log ***
Started GET "/api/v4/projects?private_token=[FILTERED]" for xxx.xxx.xxx.xxx at 2021-11-18 16:23:19 +0000
NoMethodError (undefined method `string_access_level' for nil:NilClass):
/srv/gitlab/lib/api/entities/project.rb:64:in `block in <class:Project>'
/srv/gitlab/config/initializers_before_autoloader/grape_entity_patch.rb:18:in `instance_exec'
/srv/gitlab/config/initializers_before_autoloader/grape_entity_patch.rb:18:in `exec_with_object'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/block_exposure.rb:10:in `value'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/base.rb:85:in `valid_value'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/base.rb:69:in `serializable_value'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/nesting_exposure.rb:41:in `block in serializable_value'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/nesting_exposure.rb:122:in `block (2 levels) in map_entity_exposures'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/options.rb:90:in `with_attr_path'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/base.rb:118:in `with_attr_path'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/nesting_exposure.rb:121:in `block in map_entity_exposures'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/nesting_exposure.rb:120:in `each'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/nesting_exposure.rb:120:in `each_with_object'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/nesting_exposure.rb:120:in `map_entity_exposures'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/exposure/nesting_exposure.rb:40:in `serializable_value'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/grape-entity-0.9.0/lib/grape_entity/entity.rb:517:in `serializable_hash'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/object/json.rb:154:in `block in as_json'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/object/json.rb:154:in `map'
/srv/gitlab/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/object/json.rb:154:in `as_json'
/srv/gitlab/lib/gitlab/json.rb:110:in `dump'
/srv/gitlab/lib/gitlab/json.rb:110:in `adapter_dump'
/srv/gitlab/lib/gitlab/json.rb:42:in `dump'
/srv/gitlab/lib/gitlab/json.rb:198:in `call'
Versions
- Chart: 5.3.3
- Platform:
- Cloud: GKE
- Kubernetes:
- Client: 1.22
- Server: 1.20
- Helm:
- Client: 3.7.1
- Server: 3.7.1
- External PostgreSQL: PostgreSQL 12
- External Redis: Redis 5.0
Edited by Bo Peng