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

Error: 0x80040326 when opening WSL #9866

Closed
1 of 2 tasks
yanghoxom opened this issue Mar 30, 2023 · 40 comments
Closed
1 of 2 tasks

Error: 0x80040326 when opening WSL #9866

yanghoxom opened this issue Mar 30, 2023 · 40 comments

Comments

@yanghoxom
Copy link

Windows Version

Win 11 22621.1413

WSL Version

1.1.3.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

22.04

Other Software

No response

Repro Steps

Repro steps:

  • Start window
  • Wait few minutes
  • Try to access wsl

I received an "Error: 0x80040326" when attempting to open WSL on Windows 11. This error appears after I have opened several WSL tabs and have been working with them for a while. When I try to open a new tab, the error appears in the Command Prompt or PowerShell, while the old WSL tabs still work normally.

However, when I open a new terminal tab in VSCode, everything works normally. This issue only occurs with WSL tabs opened in the Command Prompt or PowerShell.

Therefore, I am seeking the support of experts to identify the cause of this issue and provide a solution. My Windows 11 version is up-to-date, and I am using WSL2.

Expected Behavior

Can open wsl without error

Actual Behavior

It throw error

Error: 0x80040326
Error code: Wsl/Service/0x80040326
Press any key to continue...

Diagnostic Logs

No response

@shinjitumala
Copy link

Exact same issue here since this morning.

OS: Windows 10, 10.0.19044
WSL: 1.1.3.0
Kernel: 5.15.90.1
Distribution: Ubuntu VERSION 2

@ghost
Copy link

ghost commented Mar 30, 2023

Same issue this morning after a system reboot

  • cannot access the CLI via Terminal (prompted with Error code: Wsl/Service/0x80040326)
  • file system still accessible

OS: Windows 11, 10.0.22621
WSL version: 1.1.3.0
Kernel version: 5.15.90.1
Distro: Ubuntu 22.04

@Boardstroke
Copy link

Same issue here:

Versão do WSL: 1.1.3.0
Versão do kernel: 5.15.90.1
Versão do WSLg: 1.0.49
Versão do MSRDC: 1.2.3770
Versão do Direct3D: 1.608.2-61064218
Versão do DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows versão: 10.0.22621.1413

@Joshua-IRT
Copy link

Joshua-IRT commented Mar 30, 2023

Same issue after powering up this morning. I am using WSL2 on Windows 10.

WSL version: 1.1.3.0
Kernel version: 5.15.90.1
WSLg version: 1.0.49
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2728
Distribution: Debian

Diagnostic log attached.
WslLogs-2023-03-30_11-29-34.zip

@limejuny
Copy link

same issue 😢

  • cannot access the CLI via Terminal (prompted with Error code: Wsl/Service/0x80040326)
  • file system still accessible

WSL Version: 1.1.3.0
Kernel Version: 5.15.90.1
WSLg Version: 1.0.49
MSRDC Version: 1.2.3770
Direct3D Version: 1.608.2-61064218
DXCore Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows Version: 10.0.22623.891
Distro: Ubuntu 22.04

@Joshua-IRT
Copy link

Forced an update check in the Microsoft Store and an update for WSL appeared.

Problem is resolved with this version:

WSL version: 1.1.6.0
Kernel version: 5.15.90.1
WSLg version: 1.0.50
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2728

@peccu
Copy link

peccu commented Mar 30, 2023

@Joshua-IRT 's

Forced an update check in the Microsoft Store and an update for WSL appeared.

or

wsl --update

may resolve this issue.

@lukechen526
Copy link

@peccu can confirm - I had the same error but updating WSL resolved it.

@limejuny
Copy link

btw,
after rebooting my laptop today, Hyper-V, WSL related items were toggled off in Turn Windows features on or off.
check it and re-activate it please.

@Vinfall
Copy link

Vinfall commented Mar 30, 2023

Just in case anyone got error 0x80240438 when running wsl --update, run with admin solves the issue:

$ wsl --update
Checking for updates.
Error: 0x80240438
Error code: Wsl/UpdatePackage/0x80240438
$ gsudo wsl --update
Checking for updates.
Updating Windows Subsystem for Linux...

@tomsn1978
Copy link

Restart the computer and immediately execute "wsl--update" on powershell. After that, my problem was solved

@HeriYantodotDev
Copy link

  • Open the Windows PowerShell
  • wsl --update

This solves my issue.
The same thread here: #9867

@JershBytes
Copy link

Can confirm wsl --update has fixed this issue atm.

@delfws
Copy link

delfws commented Mar 30, 2023

wsl --update is right.

@altwei
Copy link

altwei commented Mar 30, 2023

wsl --update

@alenpaulvarghese
Copy link

@lhxsm
Copy link

lhxsm commented Mar 30, 2023

use wsl --update is right

@monologconnor
Copy link

try downloading from this https://github.com/microsoft/WSL/releases/download/1.1.6/Microsoft.WSL_1.1.6.0_x64_ARM64.msixbundle and update

When I trying wsl.exe --update, the update process shows error as well:

Error: 0x80d03805
Error code: Wsl/UpdatePackage/0x80d03805

but manually downloading and installation via this link actually fixed my problem.
Thanks!

@mneiferbag
Copy link

Any ideas what is causing this? I didn't notice any Windows updates in the past days.

@Joshua-IRT
Copy link

btw, after rebooting my laptop today, Hyper-V, WSL related items were toggled off in Turn Windows features on or off. check it and re-activate it please.

After seeing this, I decided to test it out with my second PC. Sure enough, after rebooting I had the same problem with opening WSL. Under "Turn Windows features on or off":

  • "Hyper-V" is not checked
  • "WSL" is checked
  • "Virtual Machine Platform" is checked

As Hyper-V is not required for WSL, this does not appear to be a config change.

Still no idea what caused this issue.

@Netlighter
Copy link

image
wsl --update worked immediately

@dschoeni
Copy link

dschoeni commented Mar 30, 2023

Did wsl --update, this fixed WSL for me but completely broke Docker for Desktop on Windows? How is this even possible?

Docker is unable to start now due to a

Docker.Engines.WSL2.WSL2ErrorFoundInLogsException:
Error found in logs indicating startup will most likely fail: Error creating 000-metadata: exit status 1

This error also persists when disabling the WSL2 integration in Docker, and I can't start Docker for Desktop on Windows anymore. WSL2 now works fine, but no docker.

It's quite curious, everything was working fine yesterday, shutting off the computer, turning it back on ~8 hours later and WSL was broken, without any update from my side.

@tikiatua
Copy link

Same issue on multiple computers in our institution. All started today and all fixed with wsl --update. Would be great to understand what the cause of this is.

@junkiebev
Copy link

wsl --update worked for me as well

@bekanui
Copy link

bekanui commented Mar 30, 2023

Did wsl --update, this fixed WSL for me but completely broke Docker for Desktop on Windows? How is this even possible?

Docker is unable to start now due to a

Docker.Engines.WSL2.WSL2ErrorFoundInLogsException:
Error found in logs indicating startup will most likely fail: Error creating 000-metadata: exit status 1

This error also persists when disabling the WSL2 integration in Docker, and I can't start Docker for Desktop on Windows anymore. WSL2 now works fine, but no docker.

It's quite curious, everything was working fine yesterday, shutting off the computer, turning it back on ~8 hours later and WSL was broken, without any update from my side.

I'm having the same exact problem, no matter what I do (purge data, factory reset, manually delete docker related folder), Docker Desktop is stuck showing the "Docker Desktop starting..." message until it crashes.
Has anyone found the cause of this?

@Cleancookie
Copy link

Cleancookie commented Mar 30, 2023

I'm having the same exact problem, no matter what I do (purge data, factory reset, manually delete docker related folder), Docker Desktop is stuck showing the "Docker Desktop starting..." message until it crashes. Has anyone found the cause of this?

Been struggling with this all day. Ended up uninstalling Docker Desktop -> restart laptop -> re-installing Docker Desktop which has worked for me.

Unsure about the specific cause

@soda0289
Copy link

I had this same issue after downgrading from 1.1.6 to 1.1.5. The command wsl bash works but not wsl. Didn't have any issues with docker but version 1.1.6 has issues where it cannot bind to ports as described in issue #9763.

@bekanui
Copy link

bekanui commented Mar 30, 2023

I'm having the same exact problem, no matter what I do (purge data, factory reset, manually delete docker related folder), Docker Desktop is stuck showing the "Docker Desktop starting..." message until it crashes. Has anyone found the cause of this?

Been struggling with this all day. Ended up uninstalling Docker Desktop -> restart laptop -> re-installing Docker Desktop which has worked for me.

Unsure about the specific cause

That's the last thing I want to do, but it's helpful to know that it may actually fix the problem. Thank you, if nothing else work I'll go that way.

@SogoKato
Copy link

I'm having the same exact problem, no matter what I do (purge data, factory reset, manually delete docker related folder), Docker Desktop is stuck showing the "Docker Desktop starting..." message until it crashes.
Has anyone found the cause of this?

I also had this issue. Re-install docker desktop using the latest installer (4.17.1) worked for me. Before re-installing, I was using a little old version (4.6). No uninstallation was needed.

@dschoeni
Copy link

@SogoKato
I also installed the latest Docker Version (4.17.1), I had to manually kill the docker service process beforehand though to make it work. It now seems to work again 🚀

Super curious as to what caused this (and how many developer hours were lost today :D)

@bekanui
Copy link

bekanui commented Mar 30, 2023

I can confirm that installing the 4.17.1 version of Docker Desktop solved the problem for me too, after uninstalling the previous version.

Super curious as to what caused this (and how many developer hours were lost today :D)

Too many to count I'm afraid ;(

@craigloewen-msft
Copy link
Member

If you're seeing this issue please run wsl --update to update to the latest version to resolve it as a workaround. We are putting in a fix to resolve this longterm!

Locking the thread so this answer stays at the bottom for any new users searching for this. We will update this thread when the longterm fix is available. Thank you!

@microsoft microsoft locked and limited conversation to collaborators Mar 30, 2023
@craigloewen-msft craigloewen-msft pinned this issue Mar 30, 2023
@benhillis
Copy link
Member

Thanks for posting!

The fix for this issue is to run wsl.exe --update - I've also worked around this issue so users should no longer see it (you may have to restart wslservice.exe though).

For some background there used to be some logic to print a "A new version of WSL is available" message. The handling of that error (which was non-fatal) was removed when we added Windows Notifications, but the error was still getting returned. This started triggering when I tagged the 1.1.6 build as the latest build on GitHub.

I have a fix for the code, but in the meantime I have re-tagged the 1.1.6 build as prerelease. So this should solve the issue moving forward.

@benhillis benhillis reopened this Mar 30, 2023
@benhillis
Copy link
Member

Will reopen issue so it is more visible.

@sleavitt
Copy link

@benhillis What about those of us who ran "wsl --update" to fix it and are now on 1.1.6? With 1.1.6 being re-tagged as pre-release, will it be released again as 1.1.6. Should we stay on 1.1.6, or perhaps downgrade? Please advise, thanks.

@michael-milette
Copy link

I am having the same problem with WSL on Windows 10 (it's not just on Windows 11). The "wsl --update" fixed the issue but broke Docker Desktop.

@QAnders
Copy link

QAnders commented Mar 31, 2023

Docker Desktop broken for me as well. Tried installing latest version over the old but didn't work.
Uninstalled Docker Desktop, restarted and reinstalled, still no go with WSL2 1.1.6 update...

@dkotama
Copy link

dkotama commented Apr 1, 2023

Restart the computer and immediately execute "wsl--update" on powershell. After that, my problem was solved

Got error : for command wsl
Error: 0x80040326
Error code: Wsl/Service/0x80040326

updating wsl works for me , thank you

@benhillis
Copy link
Member

@benhillis benhillis changed the title Error: 0x80040326 when opening WSL on Windows 11 Error: 0x80040326 when opening WSL Apr 7, 2023
@benhillis benhillis unpinned this issue Apr 17, 2023
@Alexandre-T
Copy link

try downloading from this https://github.com/microsoft/WSL/releases/download/1.1.6/Microsoft.WSL_1.1.6.0_x64_ARM64.msixbundle and update

When I trying wsl.exe --update, the update process shows error as well:

Error: 0x80d03805
Error code: Wsl/UpdatePackage/0x80d03805

but manually downloading and installation via this link actually fixed my problem. Thanks!

This error could happen when your sysadmin blocks windows store. To avoid a manual download, you can use the web-download option:
wsl --update --web-download

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