Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UAC requires elevation prompt every time after reboot OS #13806

Closed
MoonLoq opened this issue Nov 24, 2023 · 51 comments
Closed

UAC requires elevation prompt every time after reboot OS #13806

MoonLoq opened this issue Nov 24, 2023 · 51 comments

Comments

@MoonLoq
Copy link

MoonLoq commented Nov 24, 2023

Description

After every OS reboot i get UAC elevation prompt for "Docker Desktop Privileged Helper" for program location ["C:\Program Files\Docker\Docker\resources\com.docker.admin.exe" wsl-update].
After restart Docker Desktop i don't get UAC prompt.

Снимок экрана 2023-11-24 141048

Снимок экрана 2023-11-24 141109

Reproduce

  1. Reboot OS.

Expected behavior

No response

docker version

Client:
 Cloud integration: v1.0.35+desktop.5
 Version:           24.0.6
 API version:       1.43
 Go version:        go1.20.7
 Git commit:        ed223bc
 Built:             Mon Sep  4 12:32:48 2023
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.25.2 (129061)
 Engine:
  Version:          24.0.6
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       1a79695
  Built:            Mon Sep  4 12:32:16 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.22
  GitCommit:        8165feabfdfe38c65b599c4993d227328c231fca
 runc:
  Version:          1.1.8
  GitCommit:        v1.1.8-0-g82f18fe
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    24.0.6
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.5
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.23.0-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.9
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-scan.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.0.9
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 2
  Running: 0
  Paused: 0
  Stopped: 2
 Images: 2
 Server Version: 24.0.6
 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: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8165feabfdfe38c65b599c4993d227328c231fca
 runc version: v1.1.8-0-g82f18fe
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
 Kernel Version: 5.15.133.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 899.6MiB
 Name: MICHAELHOME
 ID: df80417f-325c-47a5-b367-3f50687c814c
 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: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile

Diagnostics ID

5EC7FB5E-78B0-408A-929F-8F706FFE9D65/20231124051504

Additional Info

No response

@glen-84
Copy link

glen-84 commented Jul 28, 2024

I'm seeing this after updating to 4.33.0.

@YarosMallorca
Copy link

I'm having the same issue

@teejay-87
Copy link

teejay-87 commented Jul 31, 2024

Me too, after setting Docker Desktop to start al Windows login.
On my old computer, a year ago or so, it was set this way, but no UAC dialog at login.

@tyler36
Copy link

tyler36 commented Aug 1, 2024

After updating to 4.33.0, I get this popup when I sign-in.
It's annoying because I sign-out when I go to meetings or lunch breaks, so I get the popup several times a day.

@teejay-87
Copy link

teejay-87 commented Aug 1, 2024

I appears fixed after upgrade to 4.33.1 (maybe related to #14222? that's the only fix mentioned in release notes)

@tackarama
Copy link

tackarama commented Aug 1, 2024

Also started getting this today after upgrade to v4.33.1

Edit:
WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22631.3958

Edit 03/08/2024:
I repeated the build process on an identical Windows machine using "Docker Desktop Installer.exe" v4.32.0.0 & then followed the upgrade to v4.33.1 and got the same UAC error.
I de-installed Docker & reinstalled v4.32.0.0, built my containers & rebooted & (not that surprisingly) I don't get the UAC prompt every time Docker starts.

@Mickachouw
Copy link

Mickachouw commented Aug 1, 2024

Same here, as @tackarama

Edit : launched wsl --update --pre-release in pwsh, have WSL version: 2.3.14.0 right now, coming from 2.2.4 and new Kernel version for WSL,
Docker Desktop works fine now, but all images are lost ☹ . So good so far ...

@tyler36
Copy link

tyler36 commented Aug 1, 2024

4.33.1 fixed issue that was caused by 4.33.0, YMMV

UPDATE: After the week, the popup was back. Not sure why it didn't display after restarts last week.

@NorthNick
Copy link

I also have this since upgrading to 4.33.1

@ps-tunnelsoft
Copy link

ps-tunnelsoft commented Aug 2, 2024

with 4.33.1 I am now stuck with endless UAC requests .. it tries to start the engine, stops and asks for UAC again.

if I cancel the UAC, I see that it tries to run the "wsl --update" cmd

edit:

found the issue: wsl update to 2.2.4 was not possible. I had to remove the installation manually and install the update myself. Docker desktop works again now with up to date wsl kernel

@glen-84
Copy link

glen-84 commented Aug 3, 2024

This is still an issue on 4.33.1.

@lorenrh Can this please be prioritized?

@eldarshamukhamedov
Copy link

Still an issue on 4.33.1:
image
image
image

@andrea-reale
Copy link

Hi all,

thanks for reporting the issue.

The root cause of the WSL Update prompts is a bug in the Docker Desktop startup error handling code that was introduced in 4.33.0. The bug causes every startup to be incorrectly classified as a "WSL not up to date" problem, causing the prompts to update WSL that you are experiencing.

Please, try out this development build (installer - md5sum: b355d0d2253556fd5cb6dd5f23c30bbd). Compared to 4.33.1:

  • It fixes the error classification errors, so you should no longer see WSL update prompts but the original error - which should help resolution.
  • It fixes a common error in 4.33.1, which was also wrongly classified as "WSL update required" and I have spotted in several of the diagnostics shared.

Please, let us know how that goes.

@NorthNick
Copy link

NorthNick commented Aug 6, 2024

That dev build works for me - Windows 11, WSL 2.2.4.0. No more UA messages on startup. Many thanks for the resolution.

@tackarama
Copy link

tackarama commented Aug 6, 2024

Excellent - works for me, Thanks.

Edit 08/08/2024: Just rebooted & Docker failed to start as per image. Tried to restart the PC & it would not reboot after waiting 15 mins. Crashed PC & logged in removed v4.33.1 (revised version supplied above) reinstall v4.32.0, recreated containers (only 2) and they came up.

Error_Screenshot 2024-08-08 123812

@NorthNick
Copy link

NorthNick commented Aug 7, 2024

Spoke too soon: on a subsequent reboot it gave the screen below. A manual restart of Docker Desktop did then work though.

image

The diagnostics ID is A28AE790-279C-4CA2-89C1-ED7EA701D72E/20240807062618.

@andrea-reale
Copy link

Hey @NorthNick , all - thanks for the feedback.

@NorthNick , looking at your latest diagnostics it looks like WSL2 was in a state were processes could not be killed. I'll look more into it, but it may be a "one off" issue, which should be solvable with just a Stop Docker Desktop + wsl.exe --shutdown + Start Docker Desktop (quicker than a reboot).

Please, let us know if it keeps happening (feel free to open a new issue).

@NorthNick
Copy link

Thank you - yes, that does seem to have fixed it. So all is now well.

@breezerc
Copy link

breezerc commented Aug 7, 2024

@andrea-reale The same issue that NorthNick described happen to me. I think it was caused by the container which had 'restart' set to 'always'. I.e. this container (and some dependency) tried to run on system start. I'm using your dev. build.

Thank you.

@bigsk1
Copy link

bigsk1 commented Aug 8, 2024

@andrea-reale no luck

error spotted in wslbootstrap log: "[2024-08-08T03:48:10.849907057Z][wsl-bootstrap][F] mounting /lib/modules to /tmp/docker-desktop-/lib/modules: no such file or directory

A89CF936-1CF7-4B13-AD32-CF7D80A703F4/20240808035123

EDIT:

solved by commenting out my custom kernel in wslconfig

[wsl2]
# kernel=C:\\Users\\dragon\\bzImage-5-15-153-1

and now it starts fine all images and containers shown.

@andrea-reale
Copy link

@levi-vu it looks like you're really running an old WSL version. Could you try to update with a recent one, for example this is the latest stable for x86_64: https://github.com/microsoft/WSL/releases/download/2.2.4/wsl.2.2.4.0.x64.msi

@levi-vu
Copy link

levi-vu commented Aug 12, 2024

@levi-vu it looks like you're really running an old WSL version. Could you try to update with a recent one, for example this is the latest stable for x86_64: https://github.com/microsoft/WSL/releases/download/2.2.4/wsl.2.2.4.0.x64.msi

I have updated wsl by cmd
Wsl --update but it not work
I will try to update it manually
Btw, thank you show much for reply me immediately

@snickler
Copy link

@andrea-reale no luck

error spotted in wslbootstrap log: "[2024-08-08T03:48:10.849907057Z][wsl-bootstrap][F] mounting /lib/modules to /tmp/docker-desktop-/lib/modules: no such file or directory

A89CF936-1CF7-4B13-AD32-CF7D80A703F4/20240808035123

EDIT:

solved by commenting out my custom kernel in wslconfig

[wsl2]
# kernel=C:\\Users\\dragon\\bzImage-5-15-153-1

and now it starts fine all images and containers shown.

Thanks for this, I was able to get past this blowing up on Windows Arm64. I happened to have a custom kernel also 😅

@icraftsoftware
Copy link

The development build provided by @andrea-reale works for me too. Thanks

@bullbulk
Copy link

able to get past this error by removing the custom kernel in .wslconfig

@niemyjski
Copy link

I'm also running into this and the updated build does not resolve this...

error spotted in wslbootstrap log: "[2024-08-14T12:04:42.149177253Z][wsl-bootstrap][F] mounting /lib/modules to /tmp/docker-desktop-<USER>/lib/modules: no such file or directory"

@snickler
Copy link

snickler commented Aug 14, 2024 via email

@niemyjski
Copy link

I don't even have a .wslconfig. I was running latest official 2.2.4 of wsl.. upgrading to wsl 2.3 seems to have resolved this issue. For me I am on latest stable windows 11 updates and just upgraded from previous docker point release to this one which caused the issues.

@arnowelzel
Copy link

arnowelzel commented Aug 14, 2024

I can confirm, that the development build fixed the issue here as well (Windows 11 Pro).

@theBNT
Copy link

theBNT commented Aug 14, 2024

tried the 4.33.1.162079 development build on windows 11

WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22631.3880

and also got

error spotted in wslbootstrap log: "[2024-08-14T19:03:24.238889414Z][wsl-bootstrap][F] mounting /lib/modules to /tmp/docker-desktop-<USER>/lib/modules: no such file or directory"

(diagnostics ID: D2DDE602-3338-400F-ABAE-FE420D293E12/20240814190553)

disabled the custom kernel built for cilium and it starts up.

@andrea-reale will the DD 4.34.0 be able to cope with custom kernels again or is this an unsupported configuration from now on? or will a custom kernel with modules support help?

@cgtarmenta
Copy link

Same issue.

183A69B0-A22E-468F-824B-0666025033A9/20240816185240

My wslconfig:

[wsl2]
nestedVirtualization=true
localhostforwarding=true
networkingMode=mirrored
dnsTunneling=true
debugConsole=false


[experimental]
autoMemoryReclaim=gradual
hostAddressLoopback=true

@andrea-reale
Copy link

andrea-reale commented Aug 20, 2024

@theBNT - thanks for sharing your problem here. The /lib/modules issue is a known issue with custom kernel modules, which will be fixed in the upcoming 4.34.0 release. In the meantime, you should be able to work around that by manually creating the missing directory /lib/modules in the docker desktop distribution.

  1. Quit Docker Desktop
  2. Run wsl.exe -d docker-desktop -u root mkdir -p /lib/modules
  3. Start docker desktop

As mentioned before, we do not officially support running custom kernels. On the other hand we do our best to make sure that custom kernels with the right configurations will keep working on Docker Desktop.

@andrea-reale
Copy link

@cgtarmenta have you tried to use the development build? Are you still experiencing the same error?

@cgtarmenta
Copy link

@andrea-reale Yes I've tried the dev build, and got the same error.

RN I'm back in 4.32 and using a custom kernel for WSL as is required by redroid image I'm working on, but i'll try again today in the afternoon to grab better info for you.

cheers.

@arnowelzel
Copy link

I can confirm, that the development build fixed the issue here as well (Windows 11 Pro).

Unfortunately - no it does not :-(

After a few days, Docker Desktop did not start at all with some VM errors (sorry, did not record them) and I went back to version 4.32.0 (completely uninstalled 4.33.1 then reinstalled 4.32.0) - which works ok so far. This is already the second major problem I experienced with Docker Desktop in less than 6 months. Before there was an issue with 4.29.

It seems, upgrading Docker Desktop can be a risky thing and it is always a good idea to keep older versions just in case.

@NorthNick
Copy link

I have perhaps the same problem as @arnowelzel - the development build worked for a while, but now gives an error when starting Windows, saying "running engine: waiting for the VM setup to be ready: starting WSL engine: bootstrapping in the main distro: context canceled". Docker Desktop then works when started manually so I haven't bothered reporting it before now. It's not completely reliable: maybe one time in 5 a Windows boot completes without the error.

Diagnostics ID: A28AE790-279C-4CA2-89C1-ED7EA701D72E/20240820101832

@andrea-reale
Copy link

@NorthNick Thanks for uploading and sharing the diagnostics. Unfortunately, you are experiencing a known bug where the docker-desktop WSL distribution enters an undesired state; the good news is that the fix is included in the upcoming Docker Desktop 4.34.

Until then, you can of course keep using 4.32 or work around the bug by:

1. Quit Docker Desktop
2. In a CLI:
> wsl.exe -u root -d docker-desktop rm /root/wsl-bootstrap.pid

@NorthNick
Copy link

@andrea-reale Thanks for the update. I'll try the work around, and just wait for 4.34 if that doesn't work.

@cgtarmenta
Copy link

cgtarmenta commented Aug 21, 2024

@andrea-reale I've the dev build working with the suggested command just a little bit modified:

wsl.exe -d docker-desktop -u root mkdir -p /lib/modules # instead of /usr/lib/modules

It is working even with a custom kernel, so many thanks for this.
cheers.

@shalafi99
Copy link

@andrea-reale, your dev build solved that Privileged Helper UAC issue for my setup.
WSL version: 2.2.4.0, default kernel.

Thanks

@shalafi99
Copy link

shalafi99 commented Aug 23, 2024

Spoke too soon. @andrea-reale, with build 162079 no longer the UAC Helper prompt appears but on the initial start-up (post Windows boot/restart) I get the same issue NorthNick reported in this thread:

Capture

Captured Diagnostics ID F7279E79-7518-4A6F-ADA3-C759A0264C75/20240823112248

Some kind of race condition between Docker's and WSL's startup routines?

I confirm this behavior is only present on the first Docker Desktop start-up after Windows is booted/restarted.
If I close that error dialog and try manually again, Docker starts without issue.

To work around it, I disabled Docker's native autostart (in settings) and created a scheduled task to run "C:\Program Files\Docker\Docker\Docker Desktop.exe" a few minutes after the user logon.

@glen-84
Copy link

glen-84 commented Aug 23, 2024

@andrea-reale When will 4.33.2 be released?

@theBNT
Copy link

theBNT commented Aug 26, 2024

Spoke too soon. @andrea-reale, with build 162079 no longer the UAC Helper prompt appears but on the initial start-up (post Windows boot/restart) I get the same issue NorthNick reported in this thread:

Capture

Captured Diagnostics ID F7279E79-7518-4A6F-ADA3-C759A0264C75/20240823112248

Some kind of race condition between Docker's and WSL's startup routines?

I confirm this behavior is only present on the first Docker Desktop start-up after Windows is booted/restarted. If I close that error dialog and try manually again, Docker starts without issue.

To work around it, I disabled Docker's native autostart (in settings) and created a scheduled task to run "C:\Program Files\Docker\Docker\Docker Desktop.exe" a few minutes after the user logon.

does this workaround work for you? it might state that the file is not found but then it worked for me

@theBNT
Copy link

theBNT commented Aug 26, 2024

@andrea-reale When will 4.33.2 be released?

according to my information from docker support, there is a DD 4.34 release planned for august 29th, keeping fingers crossed :)

@shalafi99
Copy link

shalafi99 commented Aug 27, 2024

Spoke too soon. @andrea-reale, with build 162079 no longer the UAC Helper prompt appears but on the initial start-up (post Windows boot/restart) I get the same issue NorthNick reported in this thread:

Captured Diagnostics ID F7279E79-7518-4A6F-ADA3-C759A0264C75/20240823112248
Some kind of race condition between Docker's and WSL's startup routines?
I confirm this behavior is only present on the first Docker Desktop start-up after Windows is booted/restarted. If I close that error dialog and try manually again, Docker starts without issue.
To work around it, I disabled Docker's native autostart (in settings) and created a scheduled task to run "C:\Program Files\Docker\Docker\Docker Desktop.exe" a few minutes after the user logon.

does this workaround work for you? it might state that the file is not found but then it worked for me

It did not work at first. I got the same error so to try to get around it further I set up 2 scheduled tasks, one to run "wsl ifconfig" (anything that would need wsl to be up, for that matter) and a few minutes later, the "docker desktop" one.
That worked once... on the next Windows restart it failed the same way as before.
Maybe I got 'greedy' to leave each task with only 3 minutes apart from each other :-/ (and task scheduler did not respect that time offset judiciously enough), I will readjust to leave them further separated time-wise and see what happens.

*edit: scratch that... what is working for me is to left "Start Docker Desktop when you sign in to your computer" active and paired with a scheduled task set to run this powershell below, some minutes after the user logon (giving enough time to allow for the WSL related error to happen):

taskkill -im "Docker Desktop.exe" -f
Start-Sleep -Seconds 60
Start-Process "C:\Program Files\Docker\Docker\Docker Desktop.exe"

@lorenrh
Copy link
Member

lorenrh commented Aug 30, 2024

4.34.0 has been released with a fix for this issue, more information o the release notes.

I'll be closing this issue, but if the problem persists please open a fresh issue!

@lorenrh lorenrh closed this as completed Aug 30, 2024
@rfay
Copy link
Contributor

rfay commented Aug 30, 2024

But if you open a fresh issue, please link it here if it's the same behavior, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests