Closed drisspg closed 9 months ago
I am trying to manual install the server with
wget https://update.code.visualstudio.com/commit:b3b84b5239037a2f0ef8499306df9a3bacda4105/server-linux-x64/stable
And I am getting a 404 not found
That's an insiders commit, but the url says /stable
, where did you get that from, is it in a log?
Can you check the "Extension Host" or "Window" log for network-related errors?
Sorry that is an old wget command I have tried in the past, what is the correct path?
In Extension Host I see
2023-11-29 09:58:46.520 [error] Error: XHR failed
at k.onerror (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:2027) _workbench.downloadResource undefined
2023-11-29 09:58:46.526 [error] [resolveAuthority(ssh-remote,1)][5055ms] returned an error XHR failed
2023-11-29 09:58:46.610 [error] CodeExpectedError: ENOPRO: No file system provider found for resource
The correct one would be /insider
Seeing the same issue on the latest Insiders build:
[17:27:36.505] Resolver error: Error: XHR failed
at k.onerror (vscode-file://vscode-app/c:/Users/justinw/AppData/Local/Programs/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:95:2027)
Insiders build version:
Version: 1.85.0-insider (user setup)
Commit: 8762127fc97b8aaae5f3a0dd6a6d853d9a1b7574
Date: 2023-11-29T17:38:23.440Z
Electron: 25.9.6
ElectronBuildId: 25427645
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19044
The version of the "Remote - SSH" extension doesn't seem to matter between pre-release/stable/older versions. The workaround noted above does work (i.e. wget https://update.code.visualstudio.com/commit:8762127fc97b8aaae5f3a0dd6a6d853d9a1b7574/server-linux-x64/insider
).
My users settings set remote.SSH.useExecServer: false
as a workaround to a prior SSH issue with VS Code, but flipping to true also seems to have no impact other than changing the failing artifact from vscode-server.tar.gz
to vscode-cli-8762127fc97b8aaae5f3a0dd6a6d853d9a1b7574.tar.gz
.
Do you have anything like a corporate proxy configured? Do you have the http.proxy
setting set?
Do you have anything like a corporate proxy configured? Do you have the
http.proxy
setting set?
Yes, this is behind a corporate proxy - http.proxy
is not set
Same error
版本: 1.85.0-insider (Universal)
提交: c46c2f120b96f1d538333b263e42d1f133a200f0
日期: 2023-12-05T09:55:05.986Z
Electron: 25.9.7
ElectronBuildId: 25551756
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 23.1.0
Remote-SSH: v0.108.2023112915
[21:42:43.442] Got request to download on client for {"artifact":"cli-alpine-x64","destPath":"/root/.vscode-server-insiders/vscode-cli-c46c2f120b96f1d538333b263e42d1f133a200f0.tar.gz"}
[21:42:43.442] Downloading VS Code server locally...
[21:42:43.923] Terminating local server
[21:42:43.925] Resolver error: Error: XHR failed
at k.onerror (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:2027)
[21:42:43.932] ------
Access to XMLHttpRequest at 'https://vscode.download.prss.microsoft.com/dbazure/download/insider/c46c2f1…/vscode_cli_alpine_x64_cli.tar.gz' (redirected from 'https://update.code.visualstudio.com/commit:c46c2f1…/cli-alpine-x64/insider') from origin 'vscode-file://vscode-app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Oh, yes I forgot about this: https://code.visualstudio.com/updates/v1_85#_new-cdn
There is a new CDN that we will download from, and your sysadmin may have to allow that new hostname
Oh, yes I forgot about this: https://code.visualstudio.com/updates/v1_85#_new-cdn
There is a new CDN that we will download from, and your sysadmin may have to allow that new hostname
well,it's YOUR sysadmin not MY sysadmin.
the CORS policy: 'Access-Control-Allow-Origin' should be configured correctly at the CDN side.
I have even facing the same issue till last evening I was able to connect to the server and then it got disconnected after that when I tried its giving me XHR failed.
Tried deleting the whole vscode insiders by deleting it's dot files and installing it again but didn't help.
[13:10:31.195] Got request to download on client for {"artifact":"cli-alpine-x64","destPath":"/shared/home/v_eishkaran_singh/.vscode-server-insiders/vscode-cli-ab0520decb7284b2b2a9bbe3ababea57ac83c86b.tar.gz"} [13:10:31.196] Downloading VS Code server locally... [13:10:32.165] Terminating local server [13:10:32.166] Resolver error: Error: XHR failed at k.onerror (vscode-file://vscode-app/Applications/Visual%20Studio%20Code%20-%20Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:95:2027) [13:10:32.181] Local server exit: 15 [13:10:32.206] ------
Help out how to resolve it from the user end cause the server can't be accessed in my case.
@roblourens
@AxisRay I'm referring to the fact that some configurations only allow connections to a fixed set of allowed hosts, and I'm assuming that is part of the issue here since we have similar issues every time we connect to a new hostname. I don't think there's an issue on our end.
I roughly understand what you're saying. My server doesn't have internet access, but my local machine does (with no firewall limit). In this situation, VSCode attempts to download locally and then upload to the server. The conditions triggering this issue are as described, and you can try to replicate it. I've tested it, and the problem persists in both the insider and stable versions of VSCode. @roblourens
Access to XMLHttpRequest at 'https://vscode.download.prss.microsoft.com/dbazure/download/insider/c46c2f1…/vscode_cli_alpine_x64_cli.tar.gz' (redirected from 'https://update.code.visualstudio.com/commit:c46c2f1…/cli-alpine-x64/insider') from origin 'vscode-file://vscode-app' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
My assessment of the cause of this issue is based on the the error message. This error is caused by the Same-Origin Policy enforced by browsers, which restricts web pages from making requests to a domain different from the one that served the web page. In this case, the browser(vscode) is blocking a cross-origin request to 'https://vscode.download.prss.microsoft.com/' because the response does not include the necessary 'Access-Control-Allow-Origin' header.
To resolve this issue, one common approach is to configure CORS headers on the server. The server should include the 'Access-Control-Allow-Origin' header in the response, specifying the allowed domain(s) to access the resource. Alternatively, just set "Access-Control-Allow-Origin" to *.
Therefore, this requires the administrator to configure the CDN correctly.
@AxisRay I guess being a user I think I found a solution. At least it worked for me hoping it can work for you even.
If you are using Mac OS or Linux
Go to terminal
type in
sudo nano /etc/resolv.conf
It'll prompt you to give your password enter it and you will be directed to a file
In that file you will find the keyword "nameserver" where it is in the next line add this line
nameserver 8.8.8.8
Do this in terminal and then go to vscode and try to reconnect to server.
Hope it works
@roblourens
Oh, I can repro this. Sorry that it took me so long to get to that point. But if I force Remote-SSH to do a local download, it does fail with this new URL.
I met the same issue after upgrading the vscode from 1.84.2 to the latest version 1.85.0 last week in windows 11. I didn't find a good workaround, so just reverted to 1.84.2. And it works. Will keep using 1.84.2 till someone or VSCode team address the issue.
Should the fix be available on insiders already? I am still seeing this issue so I am curious if there is any updates I need to do with vs-code?
Should the fix be available on insiders already? I am still seeing this issue so I am curious if there is any updates I need to do with vs-code?
AFAIK it is already available in 1.85.1, just updated and everything works as expected.
with 1.85.1 the issue seems still exists?
@AxisRay I guess being a user I think I found a solution. At least it worked for me hoping it can work for you even. If you are using Mac OS or Linux Go to terminal type in
sudo nano /etc/resolv.conf
It'll prompt you to give your password enter it and you will be directed to a file In that file you will find the keyword "nameserver" where it is in the next line add this linenameserver 8.8.8.8
Do this in terminal and then go to vscode and try to reconnect to server. Hope it works @roblourens
OK, this solve my problem, since the original nameserver has only a internal server address.
when I try to connect to container on a remote machine through SSH:
Also encountered this problem, and tried the most common solution:
rm -rf ~/.vscode-server/
Whenever the connection failed i feel this procedure can resolve the problem in most cases.
Is there an existing issue for this bug?
Required Troubleshooting Steps
remote.SSH.useLocalServer
settingConnect Locally
It connects successfully
->
No response
Expected Behavior
Connects succsefully
Steps To Reproduce
I recently updated vscode-insider versions, was working prior to update
Remote-SSH Log
Anything else?
Same error when running without local_server mode