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 2147942402 (0x80070002) when launching `ubuntu2204.exe'] launching wsl2 from windows Terminal #11340

Open
1 of 2 tasks
snowgato opened this issue Mar 22, 2024 · 19 comments

Comments

@snowgato
Copy link

snowgato commented Mar 22, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.3296]

WSL Version

2.1.1.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-2

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

I get this error while launching Ubuntu-22.04 as regular user from windows Terminal

Expected Behavior

Launch without error

Actual Behavior

[error 2147942402 (0x80070002) when launching `ubuntu2204.exe']

Diagnostic Logs

I can log in as root, if I rename the regular user .bashrc file, I can then log in as regular user using su. But I still get the error [error 2147942402 (0x80070002) when launching `ubuntu2204.exe'] if I launch Ubuntu from windows Terminal, even if I shutdown wsl.exe and wait for more than a dozen of seconds once renamed .bashrc file of regular user.

Logs
WslLogs-2024-03-22_10-25-41.zip

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@snowgato
Copy link
Author

Different issues exposed by the bot are not related to mine and of no help to solve it

@LukeTheEngineer
Copy link

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 22, 2024

I don't see any WSL logs in the zip file you shared. Can you confirm you reproduce the issue while log collection was running ?

/logs

@snowgato
Copy link
Author

https://askubuntu.com/questions/1421805/error-2147942402-0x80070002-when-launching-ubuntu-18-04-in-wsl

Does this match your problem?
Hi,
No, it doesn't, I haven't added lately any windows PATH.

@snowgato
Copy link
Author

I don't see any WSL logs in the zip file you shared. Can you confirm you reproduce the issue while log collection was running ?

/logs

The log app was running when I tried to start ubuntu-22.04. Seems the log app doesn't catch the error.

@snowgato
Copy link
Author

Actually I can still log in as regular user from Terminal using powershell for instance typing : wsl.exe -d Ubuntu-22.04 command, but I can't log in anymore directly into wsl from Terminal clicking on the tab + button ( Ubuntu-22.04 is my default Terminal profile )

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 25, 2024

/logs

@snowgato
Copy link
Author

image

Hello, I've launched once more the log collector tool.
Here is the log file and a screen shot of the admin powershell console from which the log collector was run
Thanks for your help !
screen_capture_powershell_administrator_log_collector_launched
WslLogs-2024-03-25_23-46-16.zip

Copy link

Diagnostic information
.wslconfig found
Detected appx version: 2.1.1.0

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 25, 2024

@snowgato: I'm not seeing any WSL logs in the file you shared. Can you confirm that you reproduced the problem while log collection was running ?

@snowgato
Copy link
Author

Yes I do confirm
I launched the logging tool , waited for the output saying it was logging, then I clicked on Terminal to try to launch Ubuntu and provoking the error and finally I pressed a Key to stop thé logging tool.
If there is nothing logged, it means the logging tools is not able to catch that event. In deed the error has come up when the app was logging

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 26, 2024

Thank you @snowgato. Does ubuntu2204.exe even start, or is the error code essentially that this process couldn't be started ?

What's the output of Get-AppxPackage | where {$_.name.contains("Ubuntu")} (powershell)

@snowgato
Copy link
Author

As told before, I Can start Ubuntu from powershell using wsl.exe -d Ubuntu-22.04

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 26, 2024

So ubuntu2204.exe doesn't start right ? Then that might be the root cause of issue. You could try repairing the app but I recommend backing off your WSL distro via wsl --export before doing that ?

@snowgato
Copy link
Author

But actually, when I use Terminal and click on New tab, the error is instantaneous.
This error can occur while Ubuntu is running in an instance launched in a powershell windows with wsl -d Ubuntu-22.04

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 26, 2024

Does ubuntu2204.exe start if you run it directly ?

What's the output of: Get-Item ((Get-Command ubuntu2204.exe).Source) in powershell ?

@snowgato
Copy link
Author

Here is the output of powershell cmd Get-AppxPackage | where {$_.name.contains("Ubuntu")} :

RunspaceId : de82ac7f-2349-422f-97b6-09a1ba9034c7
Name : CanonicalGroupLimited.Ubuntu20.04LTS
Publisher : CN=23596F84-C3EA-4CD8-A7DF-550DCE37BCD0
PublisherId : 79rhkp1fndgsc
Architecture : X64
ResourceId :
Version : 2004.6.16.0
PackageFamilyName : CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc
PackageFullName : CanonicalGroupLimited.Ubuntu20.04LTS_2004.6.16.0_x64__79rhkp1fndgsc
InstallLocation : C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu20.04LTS_2004.6.16.0_x64__79rhkp1fndgsc
IsFramework : False
PackageUserInformation : {}
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
Dependencies : {CanonicalGroupLimited.Ubuntu20.04LTS_2004.6.16.0_neutral_split.scale-100_79rhkp1fndgsc,
CanonicalGroupLimited.Ubuntu20.04LTS_2004.6.16.0_neutral_split.scale-125_79rhkp1fndgsc,
CanonicalGroupLimited.Ubuntu20.04LTS_2004.6.16.0_neutral_split.scale-150_79rhkp1fndgsc}
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok

RunspaceId : de82ac7f-2349-422f-97b6-09a1ba9034c7
Name : CanonicalGroupLimited.Ubuntu22.04LTS
Publisher : CN=23596F84-C3EA-4CD8-A7DF-550DCE37BCD0
PublisherId : 79rhkp1fndgsc
Architecture : X64
ResourceId :
Version : 2204.3.63.0
PackageFamilyName : CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc
PackageFullName : CanonicalGroupLimited.Ubuntu22.04LTS_2204.3.63.0_x64__79rhkp1fndgsc
InstallLocation : C:\Program Files\WindowsApps\CanonicalGroupLimited.Ubuntu22.04LTS_2204.3.63.0_x64__79rhkp1fndgsc
IsFramework : False
PackageUserInformation : {}
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
Dependencies : {CanonicalGroupLimited.Ubuntu22.04LTS_2204.3.63.0_neutral_split.scale-100_79rhkp1fndgsc,
CanonicalGroupLimited.Ubuntu22.04LTS_2204.3.63.0_neutral_split.scale-125_79rhkp1fndgsc,
CanonicalGroupLimited.Ubuntu22.04LTS_2204.3.63.0_neutral_split.scale-150_79rhkp1fndgsc}
IsPartiallyStaged : False
SignatureKind : Store
Status : Ok

@johanvanhelden
Copy link

I am having the same issue and this worked for me: https://askubuntu.com/a/1486711

Change ubuntu2204.exe to wsl.exe in the settings.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants