You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Webviews fail with 401 on WSL when distro name has uppercase letters (remoteAuthority case mismatch) #341444
WSLIssue when using WSLbugIssue identified by VS Code Team member as probable bugregressionSomething that used to work is now brokenwebviewWebview issues
In VS Code 1.141.1, all webviews (Markdown preview, Claude Code extension panel) render blank when the window is connected to WSL via wsl+Ubuntu (distro name with an uppercase letter), e.g. after running code . from the WSL shell. Opening the same folder as wsl+ubuntu (lowercase) works.
Steps to reproduce
WSL2 with a distro named Ubuntu, Remote - WSL installed.
In the WSL shell: cd <any folder> && code . (opens authority wsl+Ubuntu).
Code.exe --folder-uri vscode-remote://wsl+ubuntu/home/<user>/<folder> (lowercase) makes webviews work.
Analysis
The service worker is registered and active (checked via remote debugging); it just forwards the 401 it receives from the window. The 401 comes from loadResource in workbench.desktop.main.js, which only resolves the remote OS when the connection authority equals the resource authority:
If os is undefined, the access check for vscode-remote resources returns AccessDenied, which becomes a 401. The resource authority is derived from the webview host name (vscode-remote+wsl-002bubuntu...), which the URL parser lowercases to wsl+ubuntu, while the connection authority is wsl+Ubuntu, so the strict comparison fails. Suggest comparing authorities case-insensitively (host names are case-insensitive).
The remote server is healthy: requesting the same file from /vscode-remote-resource with the right token returns 200, a wrong or missing token returns 403, and the server never logged the failing requests.
Environment
VS Code 1.141.1 (user setup), commit 7baac39, Electron 43.7.7
WSLIssue when using WSLbugIssue identified by VS Code Team member as probable bugregressionSomething that used to work is now brokenwebviewWebview issues
Activity
alexr00 commentedon Oct 14, 2026
duplicate of #341396