Docker Desktop Started Failing to Start for Windows Containers

I’ve been running & using Docker Desktop 4.18 daily for some time. After restarting my machine on 4/12, I started seeing the following error when Docker Desktop tries to start:

Docker.Core.HttpBadResponseException:
no response content
   at Docker.Core.GoBackend.GoBackendClient.<PostNoBodyWithError>d__21.MoveNext() in C:\workspaces\PR-21378\src\github.com\docker\pinata\win\src\Docker.Core\GoBackend\GoBackendClient.cs:line 228
--- 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.Engines.WindowsContainersEngine.<DoStartAsync>d__10.MoveNext() in C:\workspaces\PR-21378\src\github.com\docker\pinata\win\src\Docker.Engines\WindowsContainersEngine.cs:line 50
--- 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.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\PR-21378\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- 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.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__7.MoveNext() in C:\workspaces\PR-21378\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 79
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__7.MoveNext() in C:\workspaces\PR-21378\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 108
--- 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.ApiServices.StateMachines.EngineStateMachine.<StartAsync>d__17.MoveNext() in C:\workspaces\PR-21378\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 97
--- 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.Engines.Engines.<StartAsync>d__24.MoveNext() in C:\workspaces\PR-21378\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:line 124

I’ve tried:

  • Uninstalling and reinstalling both WSL and Docker Desktop
  • Upgrading WSL to latest pre-release 1.2.2

But haven’t had any luck. I’ve found that Linux containers work but switching to Windows containers always results in the above.

There seem to be recent reports of similar issues from the GitHub repo issues: Docker 4.18 Fails to Start After Latest WSL Update · Issue #13391 · docker/for-win · GitHub

It tried a suggestion to upgrade WSL to pre-release there but as mentioned this didn’t work.

Versions:
WSL 1.2.0.0 & (tried 1.2.2.0)
Docker Desktop 4.18
Windows Version 10.0.22621 Build 22621

Has anyone run into this and are there any suggestions to unblock? Thanks!

3 Likes

Same issue, came up recently.

1 Like

Same issue, happened on
OS Name Microsoft Windows 10 Enterprise
Version 10.0.19045 Build 19045

Docker Desktop 4.18.0

I reverted back to an older version of docker desktop (specifically 4.15.0, no particular reason for this one, just wanted to go back to a working one). It started working, so if the new updates are not important one can go back to the previous version.

1 Like

@utkarshbajaj Thanks for the note! I can confirm things work for me too by reverting back to 4.17.1. But it seems Docker Desktop tries to auto-upgrade to 4.18 and I repro the issue on restart.

It looks like the only workaround is to uninstall and revert back to < 4.18.

1 Like

Same issue. Happened on Windows 11. After I reverted back to 4.17.1, it can switch to windows container. However, Docker Desktop will always auto-upgrade to 4.18.0. Disabling auto-upgrade cannot work.

2 months later this problem is still happening on Windows 10 Enterprise OS build 19045.2965 while using Docker Desktop 4.19.0(106363) Engine 23.0.5 Compose 1.29.2 Credential Heloer v0.7.0 Kubernetes v1.25.9
The force update causes me to waste about a half hour per day resetting my dev environment back to 4.17.1

This problem went away when I updated to Docker Desktop version 4.20.1
It’s unfortunate that the automatic update only went to 4.19
In my case I also had to fix a setting in the docker engine config to stop using the deprecated “graph”: “D:\my\folder” and instead use “data-root”: “D:\my\folder”

Thanks for reporting! I ended up staying on 4.17.1 (blocked docker.desktop.com host to prevent autoupgrade) since it was the most stable.

I’ll give 4.20.1 a shot if it does seem to resolve this.

Issue remains with the latest docker desktop 4.21.1.114176 on 7/21/2023.
Docker wont start after installing on windows 10, and rebooting, and then logging out/in again as requested.
I don’t even have any containers set up. Fresh first time install. I’ll try an older version as mentioned earlier.

Error Message:

Failed to start the Docker Engine

Get troubleshooting help from the Docker documentation⁠

Stacktrace:

Newtonsoft.Json.JsonReaderException:
Unexpected character encountered while parsing value: n. Path ‘’, line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Docker.Engines.WSL2.LinuxWSL2Engine.d__9.MoveNext() in C:\workspaces\4.21.x\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 57
— 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.ApiServices.StateMachines.TaskExtensions.d__0.MoveNext() in C:\workspaces\4.21.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
— 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.ApiServices.StateMachines.StartTransition.d__7.MoveNext() in C:\workspaces\4.21.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 79
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.d__7.MoveNext() in C:\workspaces\4.21.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 108
— 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.ApiServices.StateMachines.EngineStateMachine.d__17.MoveNext() in C:\workspaces\4.21.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 97
— 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.Engines.Engines.d__23.MoveNext() in C:\workspaces\4.21.x\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:line 122

Update: Tried 4.17.1.0 and it also has a similar error on start
StackTrace:

Newtonsoft.Json.JsonReaderException:
Unexpected character encountered while parsing value: n. Path ‘’, line 0, position 0.
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Docker.Engines.WSL2.LinuxWSL2Engine.d__11.MoveNext() in C:\workspaces\PR-21076\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 60
— 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.ApiServices.StateMachines.TaskExtensions.d__0.MoveNext() in C:\workspaces\PR-21076\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
— 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.ApiServices.StateMachines.StartTransition.d__7.MoveNext() in C:\workspaces\PR-21076\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 79
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.d__7.MoveNext() in C:\workspaces\PR-21076\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 108
— 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.ApiServices.StateMachines.EngineStateMachine.d__15.MoveNext() in C:\workspaces\PR-21076\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:line 72
— 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.Engines.Engines.d__23.MoveNext() in C:\workspaces\PR-21076\src\github.com\docker\pinata\win\src\Docker.Engines\Engines.cs:line 109