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

Unable to Upgrade or Uninstall Docker Desktop

Open CrshOverride opened this issue 1 year ago • 5 comments

Description

When trying to upgrade from 4.32.0 to 4.37.1, the Docker Desktop for Windows fails w/ a "Could not Start RM Session" exception. Running the uninstaller from the Command Line yields the same result.

Reproduce

  1. Run "Docker Desktop Installer.exe" install from the Windows Command Prompt
  2. Confirm the new Version in the popup from the Installer.
  3. Installer Crashes w/ the following logs

Expected behavior

Docker should be properly upgraded or uninstalled.

docker version

Docker isn't running.

docker info

Docker isn't running.

Diagnostics ID

N/A

Additional Info

Installer Logs:

CommandLine: "Docker Desktop Installer.exe"  install
You can send feedback, including this log file, at https://github.com/docker/for-win/issues
[2025-01-23T15:26:33.249103600Z][ManifestAndExistingInstallationLoader][I] No install path specified, looking for default installation registry key
[2025-01-23T15:26:33.702354100Z][Installer][I] Existing installation found: build=157355, version=4.32.0, basePath=C:\Program Files\Docker\Docker, channelUrl=https://desktop-stage.docker.com/win/main/amd64/appcast.xml
[2025-01-23T15:26:33.806924300Z][InstallWorkflow][I] Using package: res:DockerDesktop
[2025-01-23T15:26:33.807926200Z][InstallWorkflow][I] Downloading
[2025-01-23T15:26:34.420906000Z][InstallWorkflow][I] Extracting manifest
[2025-01-23T15:26:34.732987400Z][Installer][W] Failed to track the installer started event, caused by: An error occurred while sending the request.
[2025-01-23T15:26:34.733985800Z][InstallWorkflow][I] Manifest found: version=178610, displayVersion=4.37.1, channelUrl=https://desktop-stage.docker.com/win/main/amd64/appcast.xml
[2025-01-23T15:26:34.733985800Z][InstallWorkflow][I] Checking prerequisites
[2025-01-23T15:26:36.582230800Z][InstallWorkflow][I] Uninstalling previous version in update mode
[2025-01-23T15:26:36.588232400Z][UninstallWorkflow][I] Running before update actions
[2025-01-23T15:26:36.589240900Z][UninstallWorkflow][I] Proceeding with Docker.Installer.ExecAction
[2025-01-23T15:26:36.592239100Z][UninstallWorkflow-ExecAction][I] Running: C:\Program Files\Docker\Docker\InstallerCli.exe -k -p with timeout=60000
[2025-01-23T15:26:37.382648300Z][UninstallWorkflow][I] Done with Docker.Installer.ExecAction
[2025-01-23T15:26:37.383647700Z][UninstallWorkflow][I] Proceeding with Docker.Installer.KillLockingProcessesAction
[2025-01-23T15:26:37.688443300Z][UninstallWorkflow][E] Action Docker.Installer.KillLockingProcessesAction failed: System.Exception: Could not Start RM Session
   at Docker.Installer.ResourceManager..ctor()
   at Docker.Installer.KillLockingProcessesAction.<DoAsync>d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.Installer.UninstallWorkflow.<ProcessAsync>d__14.MoveNext()
[2025-01-23T15:26:37.688443300Z][InstallWorkflow][E] Installation failed System.Exception: Could not Start RM Session
   at Docker.Installer.ResourceManager..ctor()
   at Docker.Installer.KillLockingProcessesAction.<DoAsync>d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.Installer.UninstallWorkflow.<ProcessAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Installer.InstallWorkflow.<PerformUninstall>d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Installer.InstallWorkflow.<UninstallAsync>d__37.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Installer.InstallWorkflow.<DoHandleD4WPackageAsync>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Docker.Installer.InstallWorkflow.<DoProcessAsync>d__23.MoveNext()
[2025-01-23T15:26:37.690451300Z][InstallWorkflow][I] Rollbacking component Docker.Installer.ExtractManifestStep
[2025-01-23T15:26:37.691451100Z][InstallWorkflow][I] Rollbacking component Docker.Installer.DownloadStep

CrshOverride avatar Jan 23 '25 15:01 CrshOverride

same here, happening on Win11 24H2

mu88 avatar Jan 24 '25 14:01 mu88

Still happening with the Installer for 4.38.0.

CrshOverride avatar Feb 17 '25 19:02 CrshOverride

Still happening with 4.39

andrey-zotov avatar Mar 20 '25 09:03 andrey-zotov

Confirmed, still an issue w/ 4.39.0.

CrshOverride avatar Mar 24 '25 15:03 CrshOverride

I'm not sure if it'll help anybody else, but I was able to work around the installer issue by:

  1. Ensure Docker Desktop is closed and all services are stopped.
  2. Open regedit.
  3. Rename HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Docker Desktop to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Docker Desktop Backup.
  4. Re-run the 4.39.0 installer. The new version should install successfully.
  5. Re-start Docker Desktop, install remaining upgraded components, verify everything is running properly.
  6. Delete the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Docker Desktop Backup entry.

CrshOverride avatar Mar 24 '25 16:03 CrshOverride