-
Notifications
You must be signed in to change notification settings - Fork 313
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
asWebviewUri: UriError - the path cannot begin with two slash characters #1643
Comments
I can't determine if this is a regression caused by the WSL extension or VS Code itself I got no problems on 1.38 of VS Code BTW |
Issue also happens in SSH, not just WSL I've verified this affects other extensions using a webView and loading resources from the extension folder i.e. using For example microsoft/vscode-extension-samples#219 Which provides a simple way to reproduce this issue. Note the cat GIF loads OK, as that's an external HTTP URL, but the JS file referenced from the extension (media directory) doesn't load due to the above error, so the line counter never goes up |
Duplicate of microsoft/vscode#82336 |
Steps to Reproduce:
Unable to read file (Error: [UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//"))
I'm using the webview API
panel.webview.asWebviewUri
to form the URLs of the components my WebView needs to load, e.g.I've been developing this extension for several weeks and work exclusively in WSL remote mode. I've never once had an issue until I updated to version 0.39.9 of the WSL extension (with VS Code 1.39).
Problem does NOT happen when working in local mode
Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No
(Note. I've put a quick fix in the latest version v0.3.2 of my extension, but it's a clumsy hack to load all resources from remote external URL, which isn't a viable solution long term)
The text was updated successfully, but these errors were encountered: