WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Object not found error / Error code: Wsl/ERROR_NOT_FOUND - wsl can be run and used only with elevated privileges ("run as admin")

Open JVsup opened this issue 3 years ago • 41 comments

Windows Version

Microsoft Windows [Version 10.0.19045.3570]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

Linux version 5.15.133.1-microsoft-standard-WSL2 (root@1c602f52c2e4) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Thu Oct 5 21:02:42 UTC 2023

Distro Version

Debian 11.8

Other Software

No response

Repro Steps

Today wsl stopped working, I cannot acces it - all i am getting is error that object doesnt exist no matter what i do. Error messages are completely unhelpful.

From standart powershell, i cant do anything, but if I run it with elevated privileges as admin, suddenly i can see the distro, run in, use it, etc.

same goes for windows terminal, launching linux apps, and so on. I need to run them as admin, or nothing works.

I have no clue what caused this deranged behavior, because until today I did not need to run anything wsl related as admin...

Expected Behavior

I should be able to use wsl with standard user privileges, not only as admin.

Actual Behavior

standart powershell (run with normal user permisions)

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\janva> wsl -l -v
Prvek nebyl nalezen.
Error code: Wsl/ERROR_NOT_FOUND
PS C:\Users\janva> wsl --install
Ubuntu je již nainstalovaný.
Spouští se Ubuntu…
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80070490
Error: 0x80070490 Prvek nebyl nalezen.

Press any key to continue...
Operace byla dokončena úspěšně.
PS C:\Users\janva> wsl
Prvek nebyl nalezen.
Error code: Wsl/ERROR_NOT_FOUND
PS C:\Users\janva> wsl.exe
Prvek nebyl nalezen.
Error code: Wsl/ERROR_NOT_FOUND
PS C:\Users\janva> wsl --version
Verze WSL: 2.0.9.0
Verze jádra: 5.15.133.1-1
Verze WSLg: 1.0.59
Verze MSRDC: 1.2.4677
Verze Direct3D: 1.611.1-81528511
Verze DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Verze Windows: 10.0.19045.3570
PS C:\Users\janva> wsl --status
Prvek nebyl nalezen.
Error code: Wsl/ERROR_NOT_FOUND


powreshell with elevated privileges

PS C:\> wsl -l -v
  NAME      STATE           VERSION
* Debian    Running         2
PS C:\> wsl --status
Výchozí distribuce: Debian
Výchozí verze: 2
PS C:\> wsl --version
Verze WSL: 2.0.9.0
Verze jádra: 5.15.133.1-1
Verze WSLg: 1.0.59
Verze MSRDC: 1.2.4677
Verze Direct3D: 1.611.1-81528511
Verze DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Verze Windows: 10.0.19045.3570

Diagnostic Logs

No response

JVsup avatar Nov 16 '23 09:11 JVsup

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.

github-actions[bot] avatar Nov 16 '23 09:11 github-actions[bot]

I'm having this exact issue since yesterday (2023-11-15).

SpeedyLom avatar Nov 16 '23 10:11 SpeedyLom

Also having similar issues since yesterday (2023-11-15) wsl has completely quit responding to commands and just hangs PowerShell

<3>WSL (82) ERROR: CreateProcessEntryCommon:502: execvpe /bin/bash failed 5

MMiller7901 avatar Nov 16 '23 16:11 MMiller7901

Same issue here, after yesterday's Windows 10 Update (2023-11-15).

aleluis79 avatar Nov 16 '23 19:11 aleluis79

Similar issue here (and X11 window corruption)

Admin

C:\Users\ME>wsl -l -v
  NAME      STATE           VERSION
* Ubuntu    Running         2

User

C:\Users\ME>wsl -l -v
Element not found.
Error code: Wsl/ERROR_NOT_FOUND

keesj-riscure avatar Nov 17 '23 09:11 keesj-riscure

I got the same issue several times since 2023-11-15. Always the same error when i try to run any wsl command or open my ubuntu distro:

Element not found.
Error code: Wsl/ERROR_NOT_FOUND

I am able to reinstall wsl and ubuntu from scratch and use it for a while but I have been able to reproduce the issue when:

  1. I try to use Docker Desktop (I am using wsl2 backend)
  2. I run "wsl --update" after wsl points out there is a new update to wsl (after the update it crashes)

This is my wsl --version print:

WSL-version: 2.0.9.0
Kernelversion: 5.15.133.1-1
WSLg-version: 1.0.59
MSRDC-version: 1.2.4677
Direct3D-version: 1.611.1-81528511
DXCore-version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows-version: 10.0.19045.3693

edddddee avatar Nov 17 '23 14:11 edddddee

Update:

I now managed to reproduce and fix my issue by uninstalling the last file (8kB) in the list below from apps & features. I got that file from running "wsl --update". My wsl doesn't crash anymore as long as I avoid running "wsl --update".

image

edddddee avatar Nov 17 '23 14:11 edddddee

I am seeing the same error, for me it started after installing the Windows update KB5032189. After rebooting WSL started to behave in the same way as the OP. Unfortunately @SinisterGaze I do not have the same set of WSL installs as you do, none are 8 KB on my system.

mhicks-cfs avatar Nov 17 '23 19:11 mhicks-cfs

I just noticed this today as well. Looks like WSL updated yesterday from the MS store (reporting version 2.0.9.0). Also installed Windows 10 KB5032189 yesterday as well.

Edit: Confirmed that it will open fine if I launch Terminal as administrator.

Ddog800 avatar Nov 17 '23 20:11 Ddog800

I am also seeing this error with WSL version 2.0.9.0 and installed Windows 10 KB5032189 yesterday.

RobertOstermann avatar Nov 17 '23 20:11 RobertOstermann

Thanks for reporting, I'm not seeing /logs in this thread, could you please collect?

benhillis avatar Nov 17 '23 23:11 benhillis

Thanks for reporting, I'm not seeing /logs in this thread, could you please collect?

Here they are, one log for stuff ran as standard user and another with elevated privileges WslLogs-2023-11-18_07-26-40_user.zip WslLogs-2023-11-18_07-28-44_admin.zip

JVsup avatar Nov 18 '23 06:11 JVsup

Update:

I now managed to reproduce and fix my issue by uninstalling the last file (8kB) in the list below from apps & features. I got that file from running "wsl --update". My wsl doesn't crash anymore as long as I avoid running "wsl --update".

image

This is works for me. Just uninstall latest app. Great!

10cheon00 avatar Nov 18 '23 07:11 10cheon00

Update: I now managed to reproduce and fix my issue by uninstalling the last file (8kB) in the list below from apps & features. I got that file from running "wsl --update". My wsl doesn't crash anymore as long as I avoid running "wsl --update". image

This is works for me. Just uninstall latest app. Great!

This worked for me also, altough mine had not 8 KByte but around 160 MByte. But after removing it, WSL2 started to work again.

frocentus avatar Nov 18 '23 09:11 frocentus

I have the same problem with WSL 2.

Maybe it's related with this problem I have when I try to start Docker Desktop :

image

ghusta avatar Nov 19 '23 16:11 ghusta

The same problem for me, work stopped, docker doesn't work, wsl doesn't work. After removing MS Updale for wsl - wsl starts working but Docker reinstalls this update on installation and everything crashes immediately.

eugenylitvinov avatar Nov 19 '23 17:11 eugenylitvinov

Just had this problem today and found this thread. As others reported, uninstalling the update has fixed the issue for me also.

Hopefully a permanent resolution will be sorted soon to allow the updates.

Alk3m1st avatar Nov 20 '23 01:11 Alk3m1st

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..

baiciluigi avatar Nov 20 '23 13:11 baiciluigi

My problem began after updating the Microsoft Store apps. Windows update shows this: image

The store shows this: image

Windows Update shows this: image

How would I roll back the updated WSL installation?

mslinn avatar Nov 20 '23 21:11 mslinn

Running a Terminal as Administrator seems to work. This is problematic for the terminal in VSCode however.

mikeputnam avatar Nov 20 '23 22:11 mikeputnam