WSL: Can't open wsl possibly after update "the data is invalid"
Version
Microsoft Windows [Version 10.0.22579.100]
WSL Version
- 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
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 27 (1 by maintainers)
Ok, solve to me:
1 - Travel to 14/09/2022 in my windows 2 - Open powersheel and execute:
wsl update3 - Travel back todayHere’s my “fix”:
I wrote a PowerShell script that grabs the date/time, sets it back to Sept 13, launches WSL, then sets the date back to today. In WSL, I have a script that runs in my .bashrc that ensures some necessary startup tasks are running (Redis, PostgreSQL, corn, etc) and then calls
ntpdateto reset its own time/date. Opening the usual WSL window after that works just fine, at which point I “exit” the WSL that PowerShell launched, and “exit” the PowerShell script.The first part of the script relaunches itself in Administrator mode if you don’t already run it in Administrator mode.
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
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.