Skip to content

CookieOverflow error with Docker Hub token #716

Description

@MShekow

I'm unable to browse repos on Docker Hub.

I started the app as follows:

docker run --name registry-browser -e SECRET_KEY_BASE=1acaa0068... --rm -p 8080:8080 -e DOCKER_REGISTRY_URL=https://index.docker.io klausmeyer/docker-registry-browser

When trying to open http://localhost:8080/repo/docker/dockerfile, I get prompted to enter credentials. I enter my valid Docker Hub credentials, and then I get the following error:

I, [2025-02-14T08:32:42.781706 #1]  INFO -- : [2e7c68ea-da68-4806-b9a4-415ccc9b378c] Started GET "/repo/docker/dockerfile" for 172.17.0.1 at 2025-02-14 08:32:42 +0000
I, [2025-02-14T08:32:42.791920 #1]  INFO -- : [2e7c68ea-da68-4806-b9a4-415ccc9b378c] Processing by RepositoriesController#show as HTML
I, [2025-02-14T08:32:42.793124 #1]  INFO -- : [2e7c68ea-da68-4806-b9a4-415ccc9b378c]   Parameters: {"repo"=>"docker/dockerfile"}
I, [2025-02-14T08:32:42.801675 #1]  INFO -- request: [2e7c68ea-da68-4806-b9a4-415ccc9b378c] GET https://index.docker.io/v2/docker/dockerfile/tags/list
I, [2025-02-14T08:32:43.251180 #1]  INFO -- : [2e7c68ea-da68-4806-b9a4-415ccc9b378c] Completed 401 Unauthorized in 456ms (GC: 1.4ms)
I, [2025-02-14T08:32:52.945116 #1]  INFO -- : [77474e4a-7105-4e0a-9bb5-b6df911031ff] Started GET "/repo/docker/dockerfile" for 172.17.0.1 at 2025-02-14 08:32:52 +0000
I, [2025-02-14T08:32:52.967575 #1]  INFO -- : [77474e4a-7105-4e0a-9bb5-b6df911031ff] Processing by RepositoriesController#show as HTML
I, [2025-02-14T08:32:52.967644 #1]  INFO -- : [77474e4a-7105-4e0a-9bb5-b6df911031ff]   Parameters: {"repo"=>"docker/dockerfile"}
I, [2025-02-14T08:32:52.985451 #1]  INFO -- request: [77474e4a-7105-4e0a-9bb5-b6df911031ff] GET https://index.docker.io/v2/docker/dockerfile/tags/list
I, [2025-02-14T08:32:53.357795 #1]  INFO -- request: [77474e4a-7105-4e0a-9bb5-b6df911031ff] GET https://auth.docker.io/token?client_id=docker-registry-browser&offline_token=true&scope=repository%3Adocker%2Fdockerfile%3Apull&service=registry.docker.io
I, [2025-02-14T08:32:53.791206 #1]  INFO -- response: [77474e4a-7105-4e0a-9bb5-b6df911031ff] Status 200
I, [2025-02-14T08:32:53.798300 #1]  INFO -- : [77474e4a-7105-4e0a-9bb5-b6df911031ff] Redirected to http://localhost:8080/repo/docker/dockerfile
I, [2025-02-14T08:32:53.798892 #1]  INFO -- : [77474e4a-7105-4e0a-9bb5-b6df911031ff] Completed 302 Found in 831ms (GC: 0.0ms)
E, [2025-02-14T08:32:53.803801 #1] ERROR -- : [77474e4a-7105-4e0a-9bb5-b6df911031ff]
[77474e4a-7105-4e0a-9bb5-b6df911031ff] ActionDispatch::Cookies::CookieOverflow (_docker_registry_browser_session cookie overflowed with size 5420 bytes):
[77474e4a-7105-4e0a-9bb5-b6df911031ff]
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/cookies.rb:612:in `check_for_overflow!'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/cookies.rb:694:in `commit'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/cookies.rb:530:in `[]='
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/session/cookie_store.rb:117:in `set_cookie'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] rack-session (2.0.0) lib/rack/session/abstract/id.rb:409:in `commit_session'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/session/abstract_store.rb:74:in `commit_session'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] rack-session (2.0.0) lib/rack/session/abstract/id.rb:274:in `context'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] rack-session (2.0.0) lib/rack/session/abstract/id.rb:266:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/cookies.rb:704:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/callbacks.rb:31:in `block in call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] activesupport (7.2.1) lib/active_support/callbacks.rb:101:in `run_callbacks'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/callbacks.rb:30:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:31:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/show_exceptions.rb:32:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] railties (7.2.1) lib/rails/rack/logger.rb:41:in `call_app'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] railties (7.2.1) lib/rails/rack/logger.rb:29:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/remote_ip.rb:96:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/request_id.rb:33:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] rack (3.1.7) lib/rack/method_override.rb:28:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] rack (3.1.7) lib/rack/runtime.rb:24:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/executor.rb:16:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] actionpack (7.2.1) lib/action_dispatch/middleware/static.rb:27:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] rack (3.1.7) lib/rack/sendfile.rb:114:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] railties (7.2.1) lib/rails/engine.rb:535:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] puma (6.4.3) lib/puma/configuration.rb:272:in `call'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] puma (6.4.3) lib/puma/request.rb:100:in `block in handle_request'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] puma (6.4.3) lib/puma/thread_pool.rb:378:in `with_force_shutdown'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] puma (6.4.3) lib/puma/request.rb:99:in `handle_request'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] puma (6.4.3) lib/puma/server.rb:464:in `process_client'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] puma (6.4.3) lib/puma/server.rb:245:in `block in run'
[77474e4a-7105-4e0a-9bb5-b6df911031ff] puma (6.4.3) lib/puma/thread_pool.rb:155:in `block in spawn_thread'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions