for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

Can't sign in to Docker Desktop

Open jrnorth opened this issue 1 year ago • 45 comments

Description

I click the Sign in button in Docker Desktop, and my browser opens the desktop redirect link. I log into my account, and the page says it is redirecting me to the desktop app, but nothing happens, and Docker Desktop does not indicate that I am now signed in. I've tried clicking the Proceed to Docker Desktop button, too, but that does not work, either.

Reproduce

  1. Click Sign in
  2. Log into your account in the opened browser window
  3. Not redirected to Docker Desktop and not logged into Docker Desktop

Expected behavior

No response

docker version

Client:
 Cloud integration: v1.0.35+desktop.10
 Version:           25.0.2
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        29cf629
 Built:             Thu Feb  1 00:18:45 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.27.1 (136059)
 Engine:
  Version:          25.0.2
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       fce6e0c
  Built:            Thu Feb  1 00:23:21 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    25.0.2
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.1-desktop.4
    Path:     /Users/joe/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.24.3-desktop.1
    Path:     /Users/joe/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container. (Docker Inc.)
    Version:  0.0.22
    Path:     /Users/joe/.docker/cli-plugins/docker-debug
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/joe/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.21
    Path:     /Users/joe/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.4
    Path:     /Users/joe/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.0.0
    Path:     /Users/joe/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/joe/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.3.0
    Path:     /Users/joe/.docker/cli-plugins/docker-scout
WARNING: Plugin "/Users/joe/.docker/cli-plugins/docker-scan" is not valid: failed to fetch metadata: fork/exec /Users/joe/.docker/cli-plugins/docker-scan: no such file or directory

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 315
 Server Version: 25.0.2
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.6.12-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 8
 Total Memory: 15.6GiB
 Name: docker-desktop
 ID: a8a0d46b-2027-46b3-8395-bbc63933312d
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: daemon is not using the default seccomp profile

Diagnostics ID

4BA00B44-3ABD-4F0A-B1AD-081C38AB5075/20240201175120

Additional Info

Browser: Chrome 121.0.6167.139 OS: Ventura 13.6.4

jrnorth avatar Feb 01 '24 17:02 jrnorth

I've had this for a long time. Chrome Console shows these errors when I click "Proceed to Docker Desktop"

image

janklan avatar Feb 02 '24 03:02 janklan

We are investigating an issue with the dashboard not being refreshed properly. Could you please try closing the dashboard (just the window, not the entire app) and open it again, see if you are either already signed in, or sign in works this time?

MihaelaStoica avatar Feb 02 '24 08:02 MihaelaStoica

@MihaelaStoica That worked. I closed the window then reopened it, and it is showing me as logged in.

jrnorth avatar Feb 02 '24 16:02 jrnorth

Not for me.

janklan avatar Feb 02 '24 21:02 janklan

Nor for me

matthewberryman avatar Feb 04 '24 15:02 matthewberryman

I have not restarted since my last message, but when I opened the dashboard window today, it showed me being signed in. I haven't touched my computer since Friday.

FYI Docker Desktop has been signing me out ever since I had it first installed, so I just stayed signed out as I didn't care. Now that you introduced the "Synchronized file shares" that sorted out my Symfony/Mac performance issues but/and placed the feature behind a Pro subscription paywall, I finally had to sign up, and because it appears I have to be signed in to work with the Pro features, now the problem started bugging me.

Anyone else has been repeatedly automatically signed out for no reason over the past N years?

janklan avatar Feb 04 '24 23:02 janklan

Anyone else has been repeatedly automatically signed out for no reason over the past N years?

Yep, there was a long-standing bug, only recently fixed, but seems broken again - and now I can't even sign back in.

https://github.com/docker/for-mac/issues/6993 https://github.com/docker/for-mac/issues/6483

matthewberryman avatar Feb 04 '24 23:02 matthewberryman

@janklan, @matthewberryman could you please upload a diagnostic (and let us know the diagnostic ID) after you experienced the issue of not being able to sign in?

MihaelaStoica avatar Feb 05 '24 09:02 MihaelaStoica

All I had to do was to quit Docker Desktop (the lot, not just the window) and after re-opening, I'm signed out. The diagnostic ID for the submission before I touched anything is 747DE4FE-0C9A-418E-9191-C60F28AAA629/20240205091949.

The one right after clicking the Proceed to Docker Desktop button has ID 747DE4FE-0C9A-418E-9191-C60F28AAA629/20240205092347

I can see logs along the line of:

2024-02-05 19:52:59.573531+1030  localhost com.docker.backend[10511]: (256ade43) 2832ab19-BackendAPI S<-C fc2a05c0-URLSchemeHandlerCMD
2024-02-05 19:52:59.573670+1030  localhost com.docker.backend[10511]: (256ade43) 2832ab19-BackendAPI S<-C fc2a05c0-URLSchemeHandlerCMD POST /registry/complete-login
2024-02-05 19:52:59.573762+1030  localhost com.docker.backend[10511]: (256ade43) 2832ab19-BackendAPI S<-C fc2a05c0-URLSchemeHandlerCMD bind: {"Url":"docker-desktop://auth0/complete-login?code=xxxstate=xxx"}
2024-02-05 19:52:59.573798+1030  localhost com.docker.backend[10511]: login request received with auth0 callback url: docker-desktop://auth0/complete-login?code=xxx&state=xxx
2024-02-05 19:52:59.573840+1030  localhost com.docker.backend[10511]: (256ade43) 2832ab19-BackendAPI S->C fc2a05c0-URLSchemeHandlerCMD POST /registry/complete-login (166.666µs): OK
2024-02-05 19:52:59.573897+1030  localhost com.docker.backend[10511]: (256ade43) 2832ab19-BackendAPI S->C fc2a05c0-URLSchemeHandlerCMD   (468.75µs): OK
2024-02-05 19:52:59.574606+1030  localhost com.docker.backend[10511]: (AE) [com.apple.appleevents:main]         AEGetParamDesc for keyword errn type ****
2024-02-05 19:52:59.574664+1030  localhost com.docker.backend[10511]: (AE) [com.apple.appleevents:main]         OSErr AEGetParamDesc(const AppleEvent *, AEKeyword, DescType, AEDesc *)(errn) as **** = <private> err=-1704/errAENotAEDesc
2024-02-05 19:52:59.574692+1030  localhost com.docker.backend[10511]: (AE) [com.apple.appleevents:main] try[appHandler] returned 0

I also noticed that upon closing the app window, I'm unable to start Docker again - there is no app icon in the bar at the top, starting the app does nothing. Several Docker processes are running, though:

janklan          10521   0.0  0.1 409847776  39536   ??  S     7:48pm   0:00.06 com.docker.build
janklan          10520   0.0  0.0 409766288  14560   ??  S     7:48pm   0:00.01 com.docker.dev-envs -watchdog
janklan          10519   0.0  0.1 409276816  38384   ??  S     7:48pm   0:00.06 docker serve --address unix:///Users/janklan/.docker/run/docker-cli-api.sock
janklan          10518   0.0  0.0 409974448  30160   ??  S     7:48pm   0:00.07 com.docker.extensions -address /Users/janklan/Library/Containers/com.docker.docker/Data/extension-manager.sock -watchdog
janklan          10511   0.0  1.2 412107104 826336   ??  S     7:48pm   0:15.62 /Applications/Docker.app/Contents/MacOS/com.docker.backend

If there is any way to submit the diagnostics data from the terminal, I'm happy to do so.

janklan avatar Feb 05 '24 09:02 janklan

@janklan I had a look at your diagnostic, and I think your app showing as signed out is the issue that we have identified internally and for which we have a fix in progress:

  • If you have the Open Docker Dashboard when Docker Desktop starts disabled, due to an existing bug, Docker Desktop still opens the dashboard when it starts. But this dashboard is in an inconsistent state and it shows that the user is not logged in, when if fact they are. In this situation, if you close and reopen the dashboard, it will correctly show as logged in.

For the second issue,

upon closing the app window, I'm unable to start Docker again - there is no app icon in the bar at the top, starting the app does nothing.

if you can reproduce it again, there is a way to upload a diagnostic from the terminal, see instructions here.

MihaelaStoica avatar Feb 05 '24 15:02 MihaelaStoica

@janklan, @matthewberryman could you please upload a diagnostic (and let us know the diagnostic ID) after you experienced the issue of not being able to sign in?

Couldn't repro this morning, will upload if it happens again.

matthewberryman avatar Feb 05 '24 22:02 matthewberryman

I have the same issue on an M1 MacBook Pro running Sonoma 14.3 and Docker Desktop now at 4.27.1. I have tried using Edge, Chrome, and Firefox and none work. You already have my log ID from email, it is 2BCADE1E-E1EE-4849-884A-E79B74E792C1/20240206083623

The strange thing is that the issue goes away when there's an update to Docker Desktop but then comes back after a few days or so.

@MihaelaStoica I have Docker Desktop set up to start and open when I log on so, for me at least, this is not related to #7157

dumbledad avatar Feb 07 '24 07:02 dumbledad

The update to 4.27.2 fixed this for me, but I have had that before, where an update fixes the bug for a while and then it comes back. I'll keep you posted

dumbledad avatar Feb 09 '24 08:02 dumbledad

In 4.27.2 we fixed some issues with the dashboard, including the one I mentioned in my previous comment. But there might be other sign-in issues, so we'll keep this ticket open for now.

MihaelaStoica avatar Feb 09 '24 09:02 MihaelaStoica

It's stopped working for me again, after restarting my laptop

dumbledad avatar Feb 11 '24 09:02 dumbledad

@MihaelaStoica …

It's probably the same as the previous recording, but I tried again and here's the log ID: 2BCADE1E-E1EE-4849-884A-E79B74E792C1/20240212081751

The browser developer console reports redirect:1 Launched external handler for 'docker-desktop://auth0/complete-login?code=<guid>&state=<key>' (I've redacted the GUID and the key).

dumbledad avatar Feb 12 '24 08:02 dumbledad

I restarted my computer and now I'm logged out again. All was fine before the restart. No idea if this should go into another ticket. I thought I'd let you know. Docker Desktop clearly has some authentication issues.

janklan avatar Feb 28 '24 00:02 janklan

@janklan is it reproducible? Please keep in mind sharing diagnostics id's to help us troubleshoot

bsousaa avatar Mar 07 '24 17:03 bsousaa

if anybody faces these authentication issues, please generate a diagnostic in Docker Desktop and share the ID here. It helps us a lot to investigate these issues.

jpbriend avatar Mar 26 '24 10:03 jpbriend

Same login redirect not working from any browser issue. Diagnostic ID: 5F66A882-C487-416A-98C3-8F3CDFC2634C/20240327052910

evanscho avatar Mar 27 '24 05:03 evanscho

For others with this issue, an interim solution is to log in from the command line: docker login --username=bobgreen

evanscho avatar Mar 27 '24 05:03 evanscho

@evanscho thank you for the diagnostic. When you can not log in, does the command open docker-desktop://extensions/marketplace works? (it is supposed to open the Marketplace page in the Docker Desktop UI).

If it does not work, would you mind sharing with me the content of your lsregister? You can obtain it with the command /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump >~/LSregister.txt and then share the ~/LSregister.txt file.

I suspect the custom URL scheme docker-desktop:// used to complete the login after a successful authentication is not working on some workstations. The LaunchServices content (lsregister) will tell me if the docker-desktop URL scheme is correctly registered with the Docker Desktop application.

jpbriend avatar Mar 28 '24 10:03 jpbriend

docker-desktop:// hanging in ungoogled-chromium. 119B2305-6EB7-4727-AD7D-AFEFF5B07AB9/20240406115116.

seanbethard avatar Apr 06 '24 11:04 seanbethard

Hey everyone, we included a fix for the docker-desktop URL scheme in Docker Desktop 4.29.0. Please give it a try and let us know if you still have issues signing in.

MihaelaStoica avatar Apr 10 '24 08:04 MihaelaStoica

@MihaelaStoica works great for me now!

novelnet avatar Apr 10 '24 10:04 novelnet

After restarting I'm signed out again.

747DE4FE-0C9A-418E-9191-C60F28AAA629/20240410020636

janklan avatar Apr 10 '24 21:04 janklan

After restarting I'm signed out again.

747DE4FE-0C9A-418E-9191-C60F28AAA629/20240410020636

Can you try Docker Desktop 4.29.0? Let us know if you still have issues with 4.29.0.

jpbriend avatar Apr 16 '24 07:04 jpbriend

4.29.0 fixed this for me and also got rid of the warning in #6898

seanbethard avatar Apr 16 '24 07:04 seanbethard

I just updated to v.4.29.0 and still the issue.

jousemarquez avatar Apr 17 '24 08:04 jousemarquez

@jousemarquez would you mind generating a diagnostic using the command /Applications/Docker.app/Contents/MacOS/com.docker.diagnose gather -upload and sharing the diagnostic ID when it's completed? It will help us investigate the issue. Thank you

jpbriend avatar Apr 17 '24 08:04 jpbriend