`Encoding::UndefinedConversionError` in Dependency Proxy
Summary
One of our customer(internal) encountered an error when pulling an image with Dependency Proxy.
Looking at the logs, the error being raised is Encoding::UndefinedConversionError
.
Upon checking the manifest of the docker image they are trying to pull, it seems to contain a special character. This is the image they are trying to pull: unguiculus/mongodb-install:0.7
Steps to reproduce
- Configure Dependency Proxy.
- Try to pull a docker image in which its manifest contains a special character.
Example Project
What is the current bug behavior?
Image can't be pulled resulting in an error 500.
What is the expected correct behavior?
Image should be pulled properly.
Relevant logs and/or screenshots
"exception.class": "Encoding::UndefinedConversionError",
"exception.message": "\"\\xC3\" from ASCII-8BIT to UTF-8",
"exception.backtrace": [
"app/services/dependency_proxy/pull_manifest_service.rb:20:in `execute_with_manifest'",
"lib/gitlab/metrics/instrumentation.rb:160:in `block in execute_with_manifest'",
"lib/gitlab/metrics/method_call.rb:27:in `measure'",
"lib/gitlab/metrics/instrumentation.rb:160:in `execute_with_manifest'",
"app/services/dependency_proxy/find_or_create_manifest_service.rb:31:in `pull_new_manifest'",
"lib/gitlab/metrics/instrumentation.rb:160:in `block in pull_new_manifest'",
"lib/gitlab/metrics/method_call.rb:27:in `measure'",
"lib/gitlab/metrics/instrumentation.rb:160:in `pull_new_manifest'",
"app/services/dependency_proxy/find_or_create_manifest_service.rb:22:in `execute'",
"lib/gitlab/metrics/instrumentation.rb:160:in `block in execute'",
"lib/gitlab/metrics/method_call.rb:27:in `measure'",
"lib/gitlab/metrics/instrumentation.rb:160:in `execute'",
"app/controllers/groups/dependency_proxy_for_containers_controller.rb:16:in `manifest'",
"ee/lib/gitlab/ip_address_state.rb:10:in `with'",
"ee/app/controllers/ee/application_controller.rb:44:in `set_current_ip_address'",
"app/controllers/application_controller.rb:494:in `set_current_admin'",
"lib/gitlab/session.rb:11:in `with_session'",
"app/controllers/application_controller.rb:485:in `set_session_storage'",
"lib/gitlab/i18n.rb:73:in `with_locale'",
"lib/gitlab/i18n.rb:79:in `with_user_locale'",
"app/controllers/application_controller.rb:479:in `set_locale'",
"lib/gitlab/error_tracking.rb:52:in `with_context'",
"app/controllers/application_controller.rb:544:in `sentry_context'",
"app/controllers/application_controller.rb:472:in `block in set_current_context'",
"lib/gitlab/application_context.rb:54:in `block in use'",
"lib/gitlab/application_context.rb:54:in `use'",
"lib/gitlab/application_context.rb:21:in `with_context'",
"app/controllers/application_controller.rb:464: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/transaction.rb:56:in `run'",
"lib/gitlab/metrics/rack_middleware.rb:16: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:234: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:23:in `call'",
"config/initializers/fix_local_cache_middleware.rb:9:in `call'",
"lib/gitlab/metrics/requests_rack_middleware.rb:76:in `call'",
"lib/gitlab/middleware/release_env.rb:12:in `call'"
],
Output of checks
Results of GitLab environment info
Will follow this up with the customer. They are currently using GitLab 13.7.2.
Expand for output related to GitLab environment info
System information System: Proxy: no 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.1 Redis Version: unknown Git Version: unknown Sidekiq Version:5.2.9 Go Version: unknown GitLab information Version: 13.7.2-ee Revision: 55a11a0db46 Directory: /srv/gitlab DB Adapter: PostgreSQL DB Version: 11.9 URL: https:// HTTP Clone URL: https:///some-group/some-project.git SSH Clone URL: git@:some-group/some-project.git Elasticsearch: yes Geo: no Using LDAP: yes Using Omniauth: no GitLab Shell Version: 13.14.0 Repository storage paths: - default: /var/opt/gitlab/repo GitLab Shell path: /home/git/gitlab-shell Git: /usr/bin/git
Results of GitLab application Check
Will follow this up with the customer.
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
)(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)