WSL: WSL broken with "Class not registered" code 4294967295 (0xffffffff)

Version

Microsoft Windows [Version 10.0.22581.200]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

Ubuntu 20

Other Software

Docker desktop when the issue appeared, now uninstalled

Repro Steps

Just trying to execute WSL in any way… opening the Windows Terminal or executing wsl from PowerShell

Expected Behavior

The Linux prompt should appear, as it did earlier this morning. Or when executing wsl -l, it should list the operating systems installed (currently only Ubuntu)

Actual Behavior

When I open the terminal, I see

Class not registered

[process exited with code 4294967295 (0xffffffff)]

If I execute wsl --status from PowerShell, I only see

Class not registered

Diagnostic Logs

No response

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 3
  • Comments: 29

Most upvoted comments

DO NOT update to latest wsl version (as of 20.12.23) (in my case this happens after a fresh install of windows)

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

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\lousk> wsl
╭─ /mnt/c/Users/lousk ··············································································· ✔  22:11:02 ─╮
╰─ exit                                                                                                              ─╯
PS C:\Users\lousk> wsl.exe --update
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.
PS C:\Users\lousk> wsl --shutdown
Class not registered
Error code: Wsl/CallMsi/REGDB_E_CLASSNOTREG
PS C:\Users\lousk> wsl --shutdown

image

you can see wsl works but after updating stop working.

if so, do as @aquino-mael suggested:

To fix “Class not registered” error, I only repair WSL on “Settings > Applications > Instaled Applications > Windows Subsystem for Linux > Advanced Options > Repair”. After do that, my WSL command returned to work.

A FIX

managed to solve it:

  • DO NOT run wsl --update
  • if you did, remove wsl from apps: image
  • go manually to wsl realeases and download the latest stable msi release and install it.

To fix “Class not registered” error, I only repair WSL on “Settings > Applications > Instaled Applications > Windows Subsystem for Linux > Advanced Options > Repair”. After do that, my WSL command returned to work.

I tried most of the possible fixes from #5092 without any success. What I finally did is:

  • save the virtual disk of the Ubuntu WSL I was working on, located at C:\Users\{USER}\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState
  • Uninstall completely Ubuntu and WSL (and reboot)
  • Install WSL and Ubuntu following these steps
  • Put the virtual disk file on the original location

At the moment it looks like it’s working. Or at least I could save all the important work files. Let’s see if this continues to work when I reinstall Docker desktop and after rebooting the machine.

I repaired this problem by installing directly the latest stable version of wsl ,así de fácil lo reparé jeje, solo instala el latest version https://github.com/microsoft/WSL/releases/

Ran into this error, what worked was to do the following as the above commenter suggested: “Settings > Applications > Instaled Applications > Windows Subsystem for Linux > Advanced Options > Repair”

However, you need to select the distro (e.g. Ubuntu) in the installed apps, not Windows Subsystem for Linux Preview. Hope that helps

To fix “Class not registered” error, I only repair WSL on “Settings > Applications > Instaled Applications > Windows Subsystem for Linux > Advanced Options > Repair”. After do that, my WSL command returned to work.

I got the same error today after updating WSL. This fixed it for me too. Thanks a lot.

I had this happen today after reinstalling WSL 1.2.5 and https://github.com/microsoft/WSL/issues/8268#issuecomment-1181802550 fixed it

Same issue here. I wanted to follow the instructions from @cmmata

What I ended up doing was:

  • Saving the virtual disk
  • Uninstalling Windows Subsystem for Linux Preview
  • Without rebooting, installing Windows Subsystem for Linux Preview

And for now everything is working like before.

DO NOT update to latest wsl version (as of 20.12.23) (in my case this happens after a fresh install of windows)

@Eliav2 Holy shit… Thank you so much! The WSL install on my PC bricked after I upgraded to Windows 11 a few months ago. Doing this finally fixed it.

Spent a whole day trying to fix this issue until I found this answer. Thanks! @Eliav2

@pmartincic reopen this issue. This is issue is clearly ongoing problem.

@raymond2330 just download the wsl msi from the link I’ve provided and install it manually

For those still hitting this, and particularly for a new hits, please use FeedbackHub to get the logs we would need.

Here is a good set of instructions for using FeedbackHub (One note… please use the SubCategory “App deployment” instead of “Windows Subsystem For Linux”): https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#9-collect-wsl-logs-with-feedback-hub

wow this really sucks. I’m just using windows 11, after about a decade of not using it. It crashes constantly. WSL seemed to stop working after I disabled the terminal from starting automatically at startup. It kept automatically starting whenever I would start the machine.

I tried the above “repair” suggestion by [anubhavashok] above … this didn’t work.

Is completely uninstalling Linux then reinstalling the only answer? For the people who backed up their current install, were they able to later restore it?

I feel like I’m spending a lot of time on windows just managing the software to keep it from crashing all the time.

If this occurs again, please capture logs! I’ll close for now.

https://github.com/Microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs