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

Wsl/ERROR_NOT_FOUND after installing Windows updates #10782

Closed
1 of 2 tasks
target-san opened this issue Nov 17, 2023 · 42 comments
Closed
1 of 2 tasks

Wsl/ERROR_NOT_FOUND after installing Windows updates #10782

target-san opened this issue Nov 17, 2023 · 42 comments

Comments

@target-san
Copy link

Windows Version

Microsoft Windows [Version 10.0.19045.3693]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

N/A

Distro Version

N/A

Other Software

No response

Repro Steps

Install Windows updates (possibly KB5032189)

Expected Behavior

Wsl works

Actual Behavior

Error:

Element not found.
Error code: Wsl/ERROR_NOT_FOUND

Diagnostic Logs

WslLogs-2023-11-17_09-50-38.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!

Open similar issues:

Closed similar issues:

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

@CHADT10
Copy link

CHADT10 commented Nov 17, 2023

Try this #10764 (comment)

@target-san
Copy link
Author

Didn't work. I erased service record, uninstalled WSL components from installer. Now I cannot even install it, installer simply closes immediately. WSL CLI returns same error.

@target-san
Copy link
Author

wsl --install ends with 0x80070490
Is there some proper way to clean WSL completely and then reinstall from scratch?
Or some comprehensive registry of WSL errors?

@target-san
Copy link
Author

After wsl --update and installing required kernel update MSI, I'm down to square one, Wsl/ERROR_NOT_FOUND

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 17, 2023

@target-san: I'm not seeing anything in the logs you shared.

Can you try to manually install the latest release and see if that helps ?

Please share /logs again if a failed startup if that doesn't help

@target-san
Copy link
Author

@OneBlue
wsl.2.0.9.0.x64.log.zip
Well, according to log installation succeeded 🤷
As of logs, I'm getting issue with importing AppX module . Was present before reinstall, just didn't notice. Need to solve before I get real logs. Honestly it's extremely frustrating how MS products tend to hide error information at all cost.

@target-san
Copy link
Author

Finally logs:
WslLogs-2023-11-18_07-54-11.zip

@osavoskin
Copy link

@target-san

I have just run into this issue myself. Spent half a day trying to fix it. Nothing has worked except for:

  • reinstall of the windows components: virtual machines support & wsl support
  • uninstall all the wsl updates
  • wsl --install --no-distribution
  • now wsl --status at least produces the report, but requires an update
  • run wsl --update --inbox (only the kernel)

Now you should be able to run your containers, at least. But any update to wsl (up to 2.0.9) will break it again, unfortunately.

** I guess the windows components reinstallation step is excessive and can be skipped. Try to just uninstall all the wsl updates and update the kernel (--inbox) to make it work.

@pahar0
Copy link

pahar0 commented Nov 19, 2023

Launching WSL from a terminal with administrator privileges works for me. #10788 (comment)

@target-san
Copy link
Author

@pahar0 Yup, thanks. Works for me too. At least for now.
Though it's interesting what causes this requirement out of thin air.

@osavoskin
Copy link

Launching WSL from a terminal with administrator privileges works for me. #10788 (comment)

Hm, does not work for me, for some reason..

@pahar0
Copy link

pahar0 commented Nov 19, 2023

Launching WSL from a terminal with admin privs it's a workaround while we wait for a proper solution. We should be able to run it as a regular user.
@osavoskin interesting... could you try this #10793 (comment) ?
I know the problem is not related but this could be another possible solution.

@osavoskin
Copy link

osavoskin commented Nov 19, 2023

@pahar0
Doesn’t help either. I have already tried everything. The only thing that worked is uninstalling all the updates. It allows me to work, at least. But the cli becomes unresponsive when the —shutdown command executed. So, the UX is awful

@DemonPenguin
Copy link

Same issue, but I have also noticed that wslg.exe is missing and I can't seem to get it back no matter what I do

@baiciluigi
Copy link

Same issue, can only run wsl with admin rights, everything else fails. Have to manually run it on admin.
Docker Desktop fails, but when launched with admin rights, succeeds aswell.
For now I can work like this but it needs to be fixed..

@bsatts
Copy link

bsatts commented Nov 20, 2023

Yup running with admin rights is the only thing that works atm.

I wonder if this is related to the patch this latest update pushed regarding an Elevation of Privilege vulnerability. Cause i've had similar issues with other tools like powertools or autohotkey

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 20, 2023

Thanks everyone for reporting this.

To give some clarity: there are two issues with WSL 2.0.9:

  1. Wsl/CallMSI/E_ABORT

We've identified the issue and working on a fix. You can workaround it by enabling the WSL optional component and rebooting

  1. Wsl/ERROR_NOT_FOUND

We've not been able to reproduce the issue yet. We're investigating but to root cause it we'd need COM logs.

If you can reproduce the issue, please follow these instructions to collect logs:

  • Download and extract ComTrace.wprp
  • Open an elevated command prompt
  • Run: wpr -start ComTrace.wprp -filemode
  • Reproduce the issue (example: wsl.echo echo test)
  • Run wpr -stop logs.etl
  • Share logs.etl on this issue

@bsatts
Copy link

bsatts commented Nov 20, 2023

@OneBlue The problem is wsl works when the command is launched from an elevated terminal. That is the current workaround for the issue. Can we get the trace from a non-elevated terminal?

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 20, 2023

@OneBlue The problem is wsl works when the command is launched from an elevated terminal. That is the current workaround for the issue. Can we get the trace from a non-elevated terminal?

@bsatts: Yes you can start the trace from an elevated terminal and then reproduce the issue from another, non-elevated terminal. The log collection will capture that repro

@bsatts
Copy link

bsatts commented Nov 20, 2023

Thank you. I started the wpr, then opened a new command prompt and typed wls. Then ended the wpr

logs.zip

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 20, 2023

Thank a lot @bsatts. We're getting closer.

Can you try to execute: C:\Program Files\WSL\wsl.exe as non-elevated and see if that works ?

@pahar0
Copy link

pahar0 commented Nov 20, 2023

Some logs @OneBlue
logs.zip

Also:
image

If i open wsl.exe by double-clicking on the icon directly from the C:\Program Files\WSL\ folder a PowerShell opens and gets closed immediately.

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 20, 2023

Thank you @bsatts and @pahar0. We have a theory now. To validate it, could you please use regedit to export the content of HKLM\Software\Classes\PackagedCom and share the .reg file with us ?

@pahar0
Copy link

pahar0 commented Nov 21, 2023

regedit.zip
There you go @OneBlue

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 21, 2023

Thank you @pahar0. This confirms our theory: There is an old WSL installation that's conflicting with the latest package.

Can you try to:

  • Delete: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PackagedCom\ClassIndex\{A9B7A1B9-0671-405C-95F1-E0612CB4CE7E}
  • See if that solves the issue

(You can use the .reg you just captured as backup if needed)

@benhillis
Copy link
Member

Thanks for all the help on this folks. This is a strange MSIX / packaged COM issue that we have not seen in internal testing. I know this issue is causing you all a lot of pain, and I'm hopeful we will have a fix to push out before turkey day.

@pahar0
Copy link

pahar0 commented Nov 21, 2023

Issue solved deleting HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PackagedCom\ClassIndex\{A9B7A1B9-0671-405C-95F1-E0612CB4CE7E} in regedit.
Thank you guys @OneBlue @benhillis

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 21, 2023

Thank for confirming @pahar0. So this confirms that the issue is this registry key being left over by previous install. We'll update our install logic to automatically remove it in the next update.

@Alkarex
Copy link

Alkarex commented Nov 21, 2023

On Windows 10, just deleting the newest WSL entry in the list of Windows applications worked for me #10767 (comment)

@rgaiacs
Copy link

rgaiacs commented Nov 21, 2023

I also had the same issue and confirm that deleting HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PackagedCom\ClassIndex{A9B7A1B9-0671-405C-95F1-E0612CB4CE7E} in regedit resolve the issue.

@target-san
Copy link
Author

Same for me. Erasing that key solved issue permanently.

@DemonPenguin
Copy link

Deleting the key worked for me. Now to sort out the display issue on wslg which seems to have a weird overlay on top of GUI apps.

Screenshot 2023-11-21 141807

@benhillis
Copy link
Member

Thanks for the confirmation! @OneBlue is working on a fix now.

@aleluis79
Copy link

imagen

I added a dash to the old keys. That worked for me.

@AKN-CPH
Copy link

AKN-CPH commented Nov 22, 2023

Issue solved deleting HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PackagedCom\ClassIndex\{A9B7A1B9-0671-405C-95F1-E0612CB4CE7E} in regedit. Thank you guys @OneBlue @benhillis

THANK YOUUUUUUU. Deleting the reg. key also solved all WSL update problems for me.

@benhillis
Copy link
Member

Fixed with https://github.com/microsoft/WSL/releases/tag/2.0.11.

@OneBlue OneBlue closed this as completed Nov 22, 2023
@andjsouza
Copy link

Issue solved deleting HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PackagedCom\ClassIndex\{A9B7A1B9-0671-405C-95F1-E0612CB4CE7E}

Thanks :)

@lukasz-mitka
Copy link

lukasz-mitka commented Nov 24, 2023

Fixed with 2.0.11 (release).

wsl --update was unable to pick it up. Had to manually install msi from the release.

@truongleeuet
Copy link

I found a solution in: here. You can try it

@weylin-piegorsch
Copy link

For others coming here and trying to verify their registry:

I installed the .msi from an unmodified registry (I changed the name to get work done, then reverted to the stock name before installing 2.0.11). These keys appeared before the install, and no longer appear after:
{A9B7A1B9-0671-405C-95F1-E0612CB4CE7E}
{B5AEB4C3-9541-492F-AD4D-505951F6ADA4}

I'm now working fine without needing to make manual registry edits.

I think one of these (or perhaps some combination of all?) are the registry key(s) for 2.0.11:
{F122531F-326B-4514-85AE-DC99D31D8256}
{C8F673A8-4BAB-420E-94E3-BFDB19740697}
{60285AE6-AAF3-4456-B444-A6C2D0DEDA38}
{1D5CE30F-C0EF-4182-83BA-196F9DE07BB9}

At least, they exist after I installed 2.0.11; I don't know if they existed before but they're all include a subkey MicrosoftCorporationII.WindowsSubsystemForLinux_1.2.0.0_x64__8wekyb3d8bbwe

@gignsky
Copy link

gignsky commented Dec 13, 2023

Can confirm installing version 2.0.11 (pre-release) works in resolving this issue of not being able to access WSL without elevated privileges.

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