microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.68k stars 295 forks source link

[Remote-SSH Bug]: Local server download fails on proxy #10474

Closed bitagoras closed 1 week ago

bitagoras commented 1 week ago

Is there an existing issue for this bug?

Required Troubleshooting Steps

Connect Locally

It connects successfully

Error description

Since vscode version 1.94.0 the local remote server download fails in case of a proxy and has to be done manually. In our company our local vscode runs in Windows behind a proxy and we connect remotely to Linux servers. The local vscode is able to download and update any extension without the need of specifying the proxy settings, which are provided automatically by the Chromium kernel of vscode. In the past this worked also for the local remote server download. But since October 2024 the update of the remote vscode server always fails.

Steps To Reproduce

The setting for the server download is: "remote.SSH.localServerDownload": "always"

Remote-SSH Log

Remote-SSH Log

`... [server] Error installing server: error requesting https://update.code.visualstudio.com/commit:e8653663e8840adaf45af01eab5c627a5af81807/server-linux-legacy-x64/stable: 407 ...` After `<html><head><title>` follows the page from the Proxy that says "Credentials are missing". </p> </details> <h3>Anything else?</h3> <p>Old versions of remote-ssh do not solve the issue. Therefore it is not obvious to me if this issue ticket is correctly placed at vscode-remote extension or if it is an issue of vscode.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/bitagoras"><img src="https://avatars.githubusercontent.com/u/10660123?v=4" />bitagoras</a> commented <strong> 1 week ago</strong> </div> <div class="markdown-body"> <h1>10344 gives a solution for this problem by specifying the proxy by <code>"http.proxy": "http://localhost:3128"</code> in settings.json. But this fails too with the Remote-SSH error message:</h1> <pre><code>[14:14:10.833] Downloading VS Code server locally... [14:14:13.164] Resolver error: Error: Failed to download VS Code Server (Failed to fetch)</code></pre> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/bitagoras"><img src="https://avatars.githubusercontent.com/u/10660123?v=4" />bitagoras</a> commented <strong> 1 week ago</strong> </div> <div class="markdown-body"> <p>I finally solved the issue by setting: <code>"remote.SSH.useExecServer": false</code></p> <p>I also use the default setting for <code>"remote.SSH.useLocalServer": true</code> and also unset the option for <code>"http.proxy"</code></p> <p>The option useExecServer says: "Uses the a new bootstrapping mode when connecting to a server. Can be toggled off in the event of connection issues.". It is unclear to me why this is connected to the server download. But I will close the ticket now.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>