WSL UI Troubleshooting Guide
This guide documents known issues and their solutions encountered during development and usage.
Issue #1: Quick Install completes but distro doesn't appear in WSL list
Symptoms
- User clicks Quick Install for a distro (e.g., openSUSE-Leap-15.6)
- UI shows "Installing from Microsoft..." then "Installed successfully!"
- Distro does NOT appear in the app's distro list
wsl --listdoes not show the distro- No error message is displayed
Root Cause
The wsl --install <distro> --no-launch command installs the Windows Store (AppX) package but does not register the distro with WSL for some distributions. The distro needs to be launched at least once to complete WSL registration.
Technical details:
- The AppX package is installed successfully (visible via
Get-AppxPackage) - The WSL registry entry (
HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss) is NOT created - The
--no-launchflag prevents the first-launch registration from occurring - Affected distros include openSUSE and potentially others that have custom first-boot setup
Diagnosis
-
Check if AppX package is installed:
Get-AppxPackage -Name '*openSUSE*' | Select-Object Name, Version, StatusIf this shows
Status: Ok, the package is installed but not registered with WSL. -
Check WSL registry for registered distros:
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss" /s | findstr DistributionNameThe problematic distro will be missing from this list.
Solution
Fix applied in code: Removed --no-launch flag from quick install. The distro now launches for first-time setup (user creation, password, etc.), which ensures proper WSL registration.
Manual workaround (if issue occurs):
-
Remove the orphaned AppX package:
Get-AppxPackage '*openSUSE*Leap*15.6*' | Remove-AppxPackage -
Reinstall using
wsl --installWITHOUT the--no-launchflag:wsl --install openSUSE-Leap-15.6 -
Complete the first-time setup wizard that appears (create user, set password, etc.)
Files Changed
src-tauri/src/wsl/install.rs: Changedquick_install_distribution()to useno_launch: false- Added
verify_distro_installed()function to pollwsl --listand confirm registration
Related
- WSL GitHub Issues: This appears to be expected behavior for
--no-launchwith certain distros - Affects: openSUSE, potentially other distros with custom OOBE (Out-of-Box Experience)
Issue #2: WSL is not responding / Operations timeout
Symptoms
- Actions like Start, Stop, or listing distros hang indefinitely
- Error message appears: "WSL is not responding. Try 'Force Restart WSL' to recover."
- The app becomes unresponsive when interacting with WSL
- Commands eventually timeout after 30 seconds (default)
Root Cause
The WSL service or VM can become unresponsive due to:
- Terminal windows from newly installed distros - If a distro was recently installed and the terminal window opened automatically during installation is still open, it can block WSL shutdown
- A hung process inside a distro
- WSL kernel crash or deadlock
- Resource exhaustion (memory, disk)
- Corrupted WSL state
- Windows update pending restart
Diagnosis
-
Check if WSL processes are running:
Get-Process -Name wsl*, vmwp* | Format-Table Name, Id, CPU, WorkingSet -
Try a simple WSL command from terminal:
wsl --list --verboseIf this hangs, WSL is definitely unresponsive.
-
Check Windows Event Viewer for WSL errors:
- Event Viewer → Applications and Services Logs → Microsoft → Windows → WSL
Solution
Quick fix: If you recently installed a new distribution, close any terminal windows that were automatically opened during installation. These can prevent WSL from shutting down gracefully.
In-app solution: Use the "Force Shutdown WSL" button that appears in the error banner. This runs wsl --shutdown --force to immediately terminate all WSL processes.
Manual recovery:
-
Graceful shutdown:
wsl --shutdown -
If that hangs, force kill WSL processes:
# Kill WSL processes Stop-Process -Name "wsl" -Force -ErrorAction SilentlyContinue Stop-Process -Name "wslservice" -Force -ErrorAction SilentlyContinue # Kill the Hyper-V VM worker (if WSL2) Get-Process -Name "vmwp" -ErrorAction SilentlyContinue | Stop-Process -Force -
Restart WSL by launching any distro or running
wsl
Adjusting timeouts: If you frequently experience timeouts on slower systems, you can increase the timeout values in Settings → Timeouts.
Files Changed
src-tauri/src/wsl/executor/wsl_command/real.rs: Timeout handling with configurable durationssrc-tauri/src/wsl/core.rs:force_kill_wsl()implementationsrc-tauri/src/settings.rs:WslTimeoutConfigfor user-configurable timeouts
Related
- Default timeouts: Quick (10s), Default (30s), Long operations (600s)
- Settings path:
%APPDATA%\wsl-ui\settings.json
Issue #3: WSL is not installed
Symptoms
- App fails to start or shows error on launch
- Error message: "WSL is not installed"
- No distributions are listed
- All WSL operations fail
Root Cause
WSL (Windows Subsystem for Linux) is not enabled or installed on the system. This is common on:
- Fresh Windows installations
- Systems where WSL was never enabled
- After certain Windows resets
Diagnosis
-
Check if WSL is available:
wsl --versionIf this returns "not recognized" or an error, WSL is not installed.
-
Check Windows features:
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Solution
Install WSL (Windows 10 version 2004+ or Windows 11):
-
Open PowerShell or Command Prompt as Administrator
-
Run the install command:
wsl --install -
Restart your computer when prompted
-
After restart, WSL will complete setup. You may be prompted to create a Linux user account.
For older Windows 10 versions (pre-2004):
-
Enable WSL feature:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart -
Enable Virtual Machine Platform (for WSL2):
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart -
Restart your computer
-
Download and install the WSL2 kernel update from Microsoft: https://aka.ms/wsl2kernel
-
Set WSL2 as default:
wsl --set-default-version 2
Files Changed
src/utils/errors.ts: Error detection for "WSL not installed" scenario- Provides user-friendly hint: "Run wsl --install in PowerShell as administrator"
Related
- Microsoft WSL documentation: https://learn.microsoft.com/en-us/windows/wsl/install
- Minimum requirements: Windows 10 version 1903+ (build 18362+) for WSL2
- Windows 11 has WSL available by default (but may need enabling)
Issue #4: Files left behind after unregistering a WSL distribution
Symptoms
- After running
wsl --unregister <distro>, files may still exist on disk - Orphaned folders in custom install locations
- Disk space not fully reclaimed after removing a distro
- Old distro folders visible in File Explorer
Root Cause
When you run wsl --unregister <distro>, WSL removes the registration and deletes the virtual disk (ext4.vhdx) at the registered path. However, files can be left behind in these scenarios:
- Wrong uninstall order - If you uninstall the Microsoft Store app before running
--unregister, the filesystem may become orphaned - Custom install locations - Distros imported with
wsl --importto a custom path may leave the parent folder behind - Store app remnants - AppX packages keep files in
%LOCALAPPDATA%\Packages
Diagnosis
-
Check for remaining WSL filesystems:
- Open File Explorer and look in
\\wsl$\sidebar - the distro should no longer appear
- Open File Explorer and look in
-
Check for orphaned folders in common locations:
# Default WSL storage location dir "$env:LOCALAPPDATA\Packages" | Where-Object { $_.Name -like '*Linux*' -or $_.Name -like '*Ubuntu*' -or $_.Name -like '*SUSE*' -or $_.Name -like '*Debian*' } # Check custom import locations (if applicable) # e.g., wherever you specified with wsl --import -
Verify the distro is fully unregistered:
wsl --list --all
Solution
Correct order of operations:
-
First, unregister from WSL:
wsl --list --verbose wsl --unregister <DistroName> -
Then uninstall the Store app (if applicable):
- Settings → Apps → Search for the distro name → Uninstall
-
Verify cleanup and manually remove leftovers:
# Check and remove orphaned package folders $packages = Get-ChildItem "$env:LOCALAPPDATA\Packages" | Where-Object { $_.Name -match 'Linux|Ubuntu|SUSE|Debian|Kali|Fedora' } $packages | ForEach-Object { Write-Host $_.FullName } # Manually delete if confirmed orphaned -
For custom-imported distros, manually delete the install folder:
# Example: if you imported to D:\WSL\MyDistro Remove-Item -Recurse -Force "D:\WSL\MyDistro"
What --unregister removes:
- The distro registration from WSL
- The ext4.vhdx virtual disk file
- All user data, settings, and installed software inside the distro
What --unregister does NOT remove:
- The parent folder (if custom location)
- Microsoft Store app package
- AppX package data in
%LOCALAPPDATA%\Packages
Related
- Microsoft WSL FAQ: https://learn.microsoft.com/en-us/windows/wsl/faq
- Once unregistered, all data is permanently lost unless backed up first
- Use
wsl --export <distro> <filename.tar>to backup before unregistering
Issue #5: Cannot pull images from private container registries
Symptoms
- Error when trying to install a container image: "unauthorized" or "authentication required"
- Container images from private registries (e.g., GitLab Container Registry, private Docker Hub, AWS ECR) fail to download
- Public images work fine, but private/authenticated images fail
Root Cause
The built-in OCI implementation only supports public container registries. It does not have access to credentials stored in Docker or Podman configuration files.
Private registries require authentication, which the built-in implementation cannot provide.
Solution
Use Docker or Podman as the container runtime:
-
Install Docker or Podman on your Windows system if not already installed
- Docker Desktop: https://www.docker.com/products/docker-desktop/
- Podman Desktop: https://podman-desktop.io/
-
Authenticate with your private registry using the CLI:
# For Docker docker login registry.example.com # For Podman podman login registry.example.com # For GitLab Container Registry docker login registry.gitlab.com # For AWS ECR aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 123456789.dkr.ecr.us-east-1.amazonaws.com -
Change the container runtime in WSL UI:
- Go to Settings → Remote Sources
- Under Container Runtime, select Docker or Podman
- This setting persists across sessions
-
Install your private image using the Container option in the New Distribution dialog
How it works
- Built-in OCI: Downloads image layers directly from the registry. Fast and lightweight, but no authentication support.
- Docker/Podman: Uses the container runtime's credential store (
~/.docker/config.jsonor similar). Supports all authentication methods the runtime supports.
Settings location
Container runtime preference is stored in:
%LOCALAPPDATA%\wsl-ui\settings.json
Under the containerRuntime field:
"builtin"- Built-in OCI (default)"docker"- Use Docker CLI"podman"- Use Podman CLI{"custom": "command"}- Custom runtime
Related
- Docker credential helpers: https://docs.docker.com/engine/reference/commandline/login/#credential-helpers
- Podman authentication: https://docs.podman.io/en/latest/markdown/podman-login.1.html
- The runtime indicator is shown in the Container installation dialog
Issue #6: E2E tests fail with "Origin header is not a valid URL"
Symptoms
- E2E tests fail immediately in the
beforeEachhook - Error message: "WebDriverError: javascript error: Origin header is not a valid URL"
- All tests affected, not just specific ones
- The error occurs when
resetMockState()tries to invoke Tauri commands viabrowser.execute()
Root Cause
This is a WebDriver/tauri-driver infrastructure issue. The error occurs when:
- The tauri-driver or msedgedriver becomes stale or corrupted
- There are leftover processes from previous test runs
- The WebDriver session has CORS/origin validation issues with the Tauri webview
Diagnosis
-
Check for leftover processes:
Get-Process -Name "wsl-ui", "tauri-driver", "msedgedriver" -ErrorAction SilentlyContinue -
Check if port 4444 is in use:
netstat -ano | findstr :4444
Solution
Kill all related processes and retry:
-
Kill any running app instances:
taskkill /F /IM wsl-ui.exe -
Kill tauri-driver and msedgedriver:
taskkill /F /IM tauri-driver.exe taskkill /F /IM msedgedriver.exe -
Wait a few seconds for ports to clear, then retry the tests:
npm run test:e2e:dev -- --spec src/test/e2e/specs/your-test.spec.ts
If the issue persists:
- Update msedgedriver to match your Edge browser version
- Download from: https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
- Place the executable in the project root
Files Changed
- N/A - This is an infrastructure/environment issue
Related
- tauri-driver documentation: https://github.com/nicksenger/tauri-driver
- WebDriver protocol: https://www.w3.org/TR/webdriver/
- This affects all E2E tests that use
browser.execute()to invoke Tauri commands
Issue #7: "Failed to translate" warnings when opening terminal
Symptoms
- When opening a terminal for a distro, multiple warning lines appear before the shell prompt:
wsl: Failed to translate 'C:\WINDOWS\system32' wsl: Failed to translate 'C:\WINDOWS' wsl: Failed to translate 'C:\WINDOWS\System32\Wbem' wsl: Failed to translate 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\' wsl: Failed to translate 'C:\WINDOWS\System32\OpenSSH\' wsl: Failed to translate 'C:\Users\...\AppData\Local\Microsoft\WindowsApps' - The shell still works, but these warnings clutter the terminal output
- Typically occurs after disabling drive mounting for a distro
Root Cause
This happens when automount is disabled but Append Windows PATH is still enabled for the distro.
When appendWindowsPath is enabled (the default), WSL tries to add Windows PATH directories to the Linux PATH environment variable. To do this, it needs to translate Windows paths like C:\WINDOWS\system32 to their Linux equivalents (e.g., /mnt/c/WINDOWS/system32).
However, if automount is disabled, the Windows drives are not mounted at /mnt/c, so WSL cannot translate these paths and emits a warning for each one.
Diagnosis
-
Check if automount is disabled for the distro:
- In WSL UI: Open distro settings → look for "Automount" toggle (should be OFF)
- Or check
/etc/wsl.confinside the distro:
Look forcat /etc/wsl.conf[automount]section withenabled=false
-
Check if appendWindowsPath is still enabled:
- In WSL UI: Look for "Append Windows PATH" toggle (will be ON)
- Or in
/etc/wsl.conf:[interop]section,appendWindowsPathsetting
Solution
In WSL UI:
- Open the distro's settings (gear icon)
- Find the "Append Windows PATH" toggle (near the mount settings)
- Turn it OFF
- Restart the distro for changes to take effect
Manual fix via wsl.conf:
-
Edit
/etc/wsl.confinside the distro:sudo nano /etc/wsl.conf -
Add or modify the
[interop]section:[interop] appendWindowsPath=false -
Restart the distro:
wsl --terminate <distro-name>
Why This Makes Sense
When you disable automount, you're typically trying to isolate the Linux environment from Windows. The appendWindowsPath feature only works when Windows drives are mounted, so it should also be disabled for a clean, warning-free experience.
Files Changed
- N/A - This is a WSL configuration issue, not an app bug
Related
- WSL interop documentation: https://learn.microsoft.com/en-us/windows/wsl/wsl-config
- The
[interop]section in wsl.conf controls Windows/Linux integration features appendWindowsPathdefaults totrueif not specified
Issue #8: Permission denied when saving per-distribution settings (wsl.conf)
Symptoms
- Error when trying to save per-distribution settings: "Permission denied"
- The distribution's
/etc/wsl.conffile cannot be updated - Error appears in logs mentioning write permission failure
Root Cause
The /etc/wsl.conf file inside WSL distributions is typically owned by root:root with permissions 644 (read-only for non-root users). This is especially common with distributions installed from the Microsoft Store (e.g., Ubuntu).
When the app attempts to write to this file, it needs root privileges inside the distribution.
How WSL UI handles this
The app writes to /etc/wsl.conf by running a command as root inside the distribution:
wsl -d <distro> -u root -- sh -c "cat > /etc/wsl.conf << 'EOF'
[automount]
enabled=true
...
EOF"
This approach:
- Requires the distribution to be running (or will start it)
- Uses
-u rootto execute with root privileges - Safely writes the content using a heredoc
Why UNC path writing doesn't work
An alternative approach would be writing via the Windows UNC path (\\wsl$\Ubuntu\etc\wsl.conf). However, this doesn't work for root-owned files because:
- UNC path access maps to the distribution's default Linux user (not root)
- Linux file permissions still apply
- There's no "sudo" equivalent for UNC path access
Requirements
- The distribution must be running to save settings
- The app will execute a command as root inside the distro
Solution
If you see permission errors:
-
Ensure the distribution is running before saving settings
- Start the distribution from the main list if it's stopped
-
Manual workaround (if the app fails):
# Open a terminal in the distribution wsl -d <distro-name> # Edit wsl.conf as root sudo nano /etc/wsl.conf # Save and restart the distro exit wsl --terminate <distro-name> -
Check file ownership inside the distro:
ls -la /etc/wsl.conf # Should show: -rw-r--r-- 1 root root ... /etc/wsl.conf
Files Changed
src-tauri/src/settings.rs:write_wsl_conf()now useswsl_executor().exec_as_root()src-tauri/src/wsl/executor/wsl_command/mod.rs: Addedexec_as_roottrait methodsrc-tauri/src/wsl/executor/wsl_command/real.rs: Implements-u rootflag for root execution
Related
- WSL wsl.conf documentation: https://learn.microsoft.com/en-us/windows/wsl/wsl-config#wslconf
- The
/etc/wsl.conffile controls per-distribution settings like automount, network, interop, and boot options
Template for New Issues
## Issue #N: [Brief description]
### Symptoms
- What the user observes
- Error messages (if any)
- Expected vs actual behavior
### Root Cause
Technical explanation of why this happens.
### Diagnosis
Steps to confirm/diagnose the issue.
### Solution
How we fixed it or workaround steps.
### Files Changed
- List of files modified to fix the issue
### Related
- Links to external issues, documentation, etc.