WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Can't open wsl possibly after update "the data is invalid"

Open jameschapman19 opened this issue 4 years ago • 27 comments

Version

Microsoft Windows [Version 10.0.22579.100]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

No response

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

wsl.exe ->

Expected Behavior

Open a wsl console

Actual Behavior

The data is invalid.
Error code: Wsl/Service/CreateInstance/CreateVm/0x8007000d

Diagnostic Logs

No response

jameschapman19 avatar Sep 16 '22 08:09 jameschapman19

Exactly the same error. Cant run docker dosktop. Yesterday I updated win11. Everything was fine before the update.

WslLogs-2022-09-16_17-17-44.zip

KRTone avatar Sep 16 '22 14:09 KRTone

Short fix (from another discussion I found) change the system date backwards in time

jameschapman19 avatar Sep 16 '22 14:09 jameschapman19

Fixed mine completely by downloading and installing another update

jameschapman19 avatar Sep 16 '22 14:09 jameschapman19

Strongest recommendation don’t do anything silly- your files are probably fine (mine were)

jameschapman19 avatar Sep 16 '22 14:09 jameschapman19

I used system date trick to back everything up in case though

jameschapman19 avatar Sep 16 '22 14:09 jameschapman19

Hell no! :D Big thanks! It really works

KRTone avatar Sep 16 '22 14:09 KRTone

Can do you give link to that issue. Because it's not a real-world fix, because everything in win11 stop work with incorrect datetime.

KRTone avatar Sep 16 '22 15:09 KRTone

If this is a Docker Desktop related issue it may not be caused by actual WSL layer.

Biswa96 avatar Sep 16 '22 15:09 Biswa96

powershell (or cmd) ">>> wsl" throws the same error изображение Docker speaks:

изображение

System.InvalidOperationException:
Failed to deploy distro docker-desktop to C:\Users\KRT\AppData\Local\Docker\wsl\distro: exit code: -1
 stdout: The data is invalid. 
Error code: Wsl/Service/CreateVm/0x8007000d

 stderr: 
   at Docker.ApiServices.WSL2.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.ApiServices\WSL2\WslCommand.cs:line 146
   at Docker.Engines.WSL2.WSL2Provisioning.<DeployDistroAsync>d__17.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\WSL2Provisioning.cs:line 168
--- 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.WSL2.WSL2Provisioning.<ProvisionAsync>d__8.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\WSL2Provisioning.cs:line 77
--- 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.WSL2.LinuxWSL2Engine.<DoStartAsync>d__28.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.Engines\WSL2\LinuxWSL2Engine.cs:line 180
--- 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-16360\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__5.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\PR-16360\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92

I think that is not a docker bug

KRTone avatar Sep 16 '22 15:09 KRTone

I think that it's not a docker bug

It looks like a Docker Desktop bug. Can you reproduce the issue with a different Linux distribution from Windows Store after uninstalling Docker Desktop?

Biswa96 avatar Sep 16 '22 15:09 Biswa96

everything are same

KRTone avatar Sep 16 '22 16:09 KRTone

This is also happening to me. Setting the date back in time fixed it.

Why I think this is happening

I wasn't able to update my system for months. Today, every action I take regarding the system configuration / administration now shows an UAC prompt (opening task manager, changing settings). Checking their exes, they all have one thing in common: the certificate they were signed with (Microsoft Windows) is valid until 2022-09-15. I think some WSL-related binary was signed with that certificate and some check is failing because of that.

This won't happen if your machine is properly updated

iagocq avatar Sep 16 '22 18:09 iagocq

This is happening because you are stuck on a very old Windows Insiders build (from March). Fix is to make sure you install a more recent version of Windows.

benhillis avatar Sep 16 '22 21:09 benhillis

Nope, that's not true, as i'm in 25179.1000 and it failing for me too, and the update KB2267602 is giving me a wrong date or time error too, so maybe is realted to other problem too

StartForKiller avatar Sep 16 '22 22:09 StartForKiller

Okay, seems that updating the system solves the problem, that build expires on 15/09/2022 To do that change the date and try to update

StartForKiller avatar Sep 16 '22 23:09 StartForKiller

Ok, solve to me:

1 - Travel to 14/09/2022 in my windows 2 - Open powersheel and execute: wsl update 3 - Travel back today

SauloSilva avatar Sep 16 '22 23:09 SauloSilva

Ok, solve to me:

1 - Travel to 14/09/2022 in my windows 2 - Open powersheel and execute: wsl update 3 - Travel back today

when i do this, i am getting error: the data is invalid Error code: Wsl/Service/CreateInstance/CreateVm/0x8007000d I have latest windows updates please help to solve this and dont lose ubuntu data

IzaGz avatar Sep 17 '22 07:09 IzaGz

Ok, solve to me:

1 - Travel to 14/09/2022 in my windows 2 - Open PowerShell and execute: wsl update 3 - Travel back today

Not sure why changing the date works; whatever it is, it needs to be fixed.

syedadeel2 avatar Sep 18 '22 23:09 syedadeel2

Ok, solve to me:

1 - Travel to 14/09/2022 in my windows 2 - Open powersheel and execute: wsl update 3 - Travel back today

That's totally insane, but this is what helped me after doing all other instructions.

Jackky90 avatar Sep 19 '22 09:09 Jackky90

Thanks for reporting this @jameschapman19. This is unfortunately a Windows issue, it can only be solved by updating your Windows build.

OneBlue avatar Sep 20 '22 21:09 OneBlue