stable-diffusion-webui-docker icon indicating copy to clipboard operation
stable-diffusion-webui-docker copied to clipboard

docker insufficient_scope: authorization failed

Open AskAlice opened this issue 2 years ago • 10 comments

Has this issue been opened before?

  • [x] It is not in the FAQ, I checked.
  • [x] It is not in the issues, I searched.

Describe the bug I recently was forced to factory reset docker desktop settings on windows. I ended up finding myself in this situation

💖❯ $env:DOCKER_BUILDKIT=1; docker compose --profile invoke up --build
[+] Building 1.9s (8/8) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                    0.0s
 => => transferring dockerfile: 32B                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                       0.1s
 => => transferring context: 2B                                                                                                                         0.0s
 => resolve image config for docker.io/docker/dockerfile:1                                                                                              0.3s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:d2d74ff22a0e47b21f4bbde337e2ac4cd0a02a2226ef79264878db3dc7e87df8                         0.0s
 => [internal] load build definition from Dockerfile                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                       0.0s
 => ERROR [internal] load metadata for docker.io/library/base:latest                                                                                    1.0s
 => [auth] library/base:pull token for registry-1.docker.io                                                                                             0.0s
------
 > [internal] load metadata for docker.io/library/base:latest:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = base: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Which UI

invoke Hardware / Software

  • OS: [e.g. Windows 10 / Ubuntu 22.04] windows 11
  • OS version: 22621.1105
  • WSL version (if applicable): 2
  • Docker Version: 20.10.22 build 3a2c30b
  • Docker compose version: Docker Compose version v2.15.1
  • Repo version: 3c860d6eaa87bf5e4c05e9dccdf2412a49e10333
  • RAM: 64gb
  • GPU/VRAM: 2x rtx3070

Steps to Reproduce

  1. reset docker desktop
  2. docker compose --profile download up --build
  3. docker compose --profile invoke up --build
  4. See error

Additional context Any other context about the problem here. If applicable, add screenshots to help explain your problem.

AskAlice avatar Feb 08 '23 07:02 AskAlice

@AskAlice are you logged in to your docker account? can you check C:/Users/<username>/.docker/config.json ? it may contain some outdated configuration.

Also, check https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/56, it is kind of similar.

AbdBarho avatar Feb 08 '23 18:02 AbdBarho

yeah i should have mentioned I had run that before executing just in case.

💖❯ docker login
Authenticating with existing credentials...
Login Succeeded

Logging in with your password grants your terminal complete access to your account.
For better security, log in with a limited-privilege personal access token. Learn more at https://docs.docker.com/go/access-tokens/
💖❯ cat C:\Users\alice\.docker\config.json
{
        "auths": {
                "https://index.docker.io/v1/": {}
        },
        "credsStore": "wincred"
}
💖❯ $env:DOCKER_BUILDKIT=1; docker compose --profile invoke up --build
[+] Building 1.8s (8/8) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                    0.0s
 => => transferring dockerfile: 32B                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                         0.0s
 => resolve image config for docker.io/docker/dockerfile:1                                                                                              0.4s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:d2d74ff22a0e47b21f4bbde337e2ac4cd0a02a2226ef79264878db3dc7e87df8                         0.0s
 => [internal] load .dockerignore                                                                                                                       0.0s
 => [internal] load build definition from Dockerfile                                                                                                    0.0s
 => ERROR [internal] load metadata for docker.io/library/base:latest                                                                                    0.8s
 => [auth] library/base:pull token for registry-1.docker.io                                                                                             0.0s
------
 > [internal] load metadata for docker.io/library/base:latest:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = base: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
💖❯ rm C:\Users\alice\.docker\config.json
💖❯ $env:DOCKER_BUILDKIT=1; docker compose --profile invoke up --build
[+] Building 1.7s (8/8) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                    0.0s
 => => transferring dockerfile: 32B                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                         0.0s
 => resolve image config for docker.io/docker/dockerfile:1                                                                                              0.4s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:d2d74ff22a0e47b21f4bbde337e2ac4cd0a02a2226ef79264878db3dc7e87df8                         0.0s
 => [internal] load .dockerignore                                                                                                                       0.0s
 => [internal] load build definition from Dockerfile                                                                                                    0.0s
 => ERROR [internal] load metadata for docker.io/library/base:latest                                                                                    0.7s
 => [auth] library/base:pull token for registry-1.docker.io                                                                                             0.0s
------
 > [internal] load metadata for docker.io/library/base:latest:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = base: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

AskAlice avatar Feb 08 '23 21:02 AskAlice

I've made an issue on docker's buildx. honestly not sure if it's the right repo in docker upstream code but I am fairly sure that has nothing to do with this repo https://github.com/docker/buildx/issues/1611

AskAlice avatar Feb 08 '23 21:02 AskAlice

@AskAlice maybe you could also try to log-out and build the image? it could help isolate the problem.

AbdBarho avatar Feb 09 '23 08:02 AbdBarho

yeah that's what rm C:\Users\alice\.docker\config.json did, I also tried docker logout and it's the same

AskAlice avatar Feb 09 '23 12:02 AskAlice

I think it has to do with this line

ERROR [internal] load metadata for docker.io/library/base:latest

AskAlice avatar Feb 09 '23 12:02 AskAlice

I had to make this change. there probably is a cleaner way to do it

image

I also set preload to false as the script no longer existed and it didn't seem to need preload to run.

AskAlice avatar Feb 09 '23 13:02 AskAlice

I would make a PR but this clearly looks like an upstream issue that doesn't affect most docker installations. if someone else runs into this issue maybe it will be helpful for them to search for this

AskAlice avatar Feb 09 '23 13:02 AskAlice

I had to make this change. there probably is a cleaner way to do it

image

I also set preload to false as the script no longer existed and it didn't seem to need preload to run.

@AskAlice where does this change come from?

https://github.com/AbdBarho/stable-diffusion-webui-docker/blob/3c860d6eaa87bf5e4c05e9dccdf2412a49e10333/services/invoke/Dockerfile#L62-L70

we don't have a base, do we?

AbdBarho avatar Feb 09 '23 16:02 AbdBarho

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Feb 24 '23 00:02 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Mar 03 '23 02:03 github-actions[bot]