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.63k stars 282 forks source link

[Remote-SSH Bug]: Proxy not configured when Adding container definition #10294

Open rbambrough-intel opened 1 week ago

rbambrough-intel commented 1 week ago

Logs:

Logs [383 ms] Dev Containers 0.384.0 over Remote - SSH 0.114.3 in VS Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40). [382 ms] Start: Loading environment from ExecServer [449 ms] Host OS: linux 6.1.0-25-amd64 [449 ms] Host CWD: /home/user/project [449 ms] Start: Run: /bin/sh [561 ms] Start: Run in host: echo ~ [709 ms] /home/user [710 ms] [710 ms] Start: Run in host: id -un [840 ms] user [841 ms] [841 ms] Start: Run in host: (command -v getent >/dev/null 2>&1 && getent passwd 'user' || grep -E '^user|^[^:]*:[^:]*:user:' /etc/passwd || true) [920 ms] userEnvProbe: loginInteractiveShell (default) [920 ms] userEnvProbe: not found in cache [920 ms] userEnvProbe shell: /usr/bin/zsh [1134 ms] userEnvProbe PATHs: Probe: '/home/user/bin:/usr/local/bin:/usr/bin:/bin:/usr/games' Container: None [1527 ms] Initializing configuration support... [1527 ms] Internal initialization of dev container support package... [3127 ms] Entering createDevContainerConfig_v2 [9624 ms] Preparing to apply Template 'ghcr.io/devcontainers/templates/dotnet' [9626 ms] Running Dev Containers CLI: templates apply --workspace-folder C:\Users\user\AppData\Local\Temp\tmp-output-dir-1726774943736 --template-id ghcr.io/devcontainers/templates/dotnet --template-args {"imageVariant":"8.0-bookworm"} --features [] --tmp-dir C:\Users\user\AppData\Local\Temp\tmp-dir-1726774943736 --log-level debug --omit-paths [".github/dependabot.yml"] [9634 ms] ProxyResolver#loadSystemCertificates count [9637 ms] ProxyResolver#loadSystemCertificates count filtered [9639 ms] Start: Run: C:\Users\user\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-containers-0.384.0\dist\spec-node\devContainersSpecCLI.js templates apply --workspace-folder C:\Users\user\AppData\Local\Temp\tmp-output-dir-1726774943736 --template-id ghcr.io/devcontainers/templates/dotnet --template-args {"imageVariant":"8.0-bookworm"} --features [] --tmp-dir C:\Users\user\AppData\Local\Temp\tmp-dir-1726774943736 --log-level debug --omit-paths [".github/dependabot.yml"] [9880 ms] [2024-09-19T19:42:23.988Z] @devcontainers/cli 0.69.0. Node.js v20.15.1. win32 10.0.22631 x64. [9884 ms] [2024-09-19T19:42:23.994Z] Loading 45 extra certificates from C:\Users\user\AppData\Local\Temp\vsch\certificates-cf4d0cfca8eda6ada23ef127d757c6cf21e9d9ab6174beb248396493164e5894.pem. [31021 ms] Error: connect ETIMEDOUT 140.82.113.34:443 [31021 ms] at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) { [31021 ms] errno: -4039, [31021 ms] code: 'ETIMEDOUT', [31021 ms] syscall: 'connect', [31021 ms] address: '140.82.113.34', [31021 ms] port: 443 [31021 ms] }

Steps to Reproduce:

  1. Connect to remote server with Remote - SSH
  2. Run command: Dev Container: Add Dev Container Configuration Files ...
  3. Select any configuration and let process

I'm behind a corporate proxy and the remote machine is correctly configured with proxy environment variables (both docker and shell environment).

Error appears to be occurring when fetching the manifest on the local machine. I believe the proxy is correctly configured on my local machine as VSCode is able to download and install the remote server as well as update and download extensions.

I think the problem is occurring due to @devcontainers/cli not correctly setting / inheriting the proxy config.

rbambrough-intel commented 1 week ago

Looks to be the same issue as #10224, but that was linked to a issue which doesn't seem to relate

songpola commented 1 week ago

I tried opening a project on WSL (Ubuntu) and got an error too after Dev Containers: Add Dev Container Configuration Files...:

2024-09-20 18:05:41.762 [error] Error: ENOENT: no such file or directory, open 'C:\Users\songpola\AppData\Local\Temp\tmp-output-dir-1726830338514\.devcontainer\devcontainer.json' remote-containers.createDevContainerFile {"value":"ms-vscode-remote.remote-containers","_lower":"ms-vscode-remote.remote-containers"}
songpola commented 1 week ago

Worse. I just tried with the new local project, and it resulted in the same error as the remote (Error: ENOENT: no such file or directory...)

songpola commented 1 week ago

Sorry. I just found that there's a problem with the templates-jupyter-datascience-notebooks.