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.67k stars 292 forks source link

Reopen in container commands fail silently #9800

Closed tmchartrand closed 6 months ago

tmchartrand commented 7 months ago

When trying to start a previously-built container from VS Code with the local workspace folder open (containing .devcontainer etc), the "Reopen in container" or rebuild and reopen commands fail silently, only adding a few docker version lines to the log. On the other hand, the "Open in container in current window" from the remote explorer context menu works fine.

In a few cases I've also noticed odd behavior after trying this several times where simply opening the Remote Explorer tab seems to get the process unstalledl. This doesn't seem to reproduce consistently, but makes me wonder if it could be related to #9663.

Tested with the latest pre-release Dev Containers and Remote explorer extensions.

Steps to Reproduce:

  1. Create a new devcontainer, build the container, then reopen folder locally.
  2. Run "Reopen folder in container" or "Rebuild and reopen in container". The only effect is the few lines added to the log shown above.
  3. In the remote explorer window, right-click the devcontainer and select "Open in container in current window" - starts as expected.
  4. The "devcontainer.json changed, do you want to rebuild?" notification appears, despite not having changed (related?)

I also noticed these lines in the previous shutdown log that could be related perhaps? shutdownMonitor-xxx.log

[2024-04-19T23:07:41.134Z] Stop (562 ms): Run: docker stop d39f849b8136a0640feda6ef07270890aa4f9db65fd9f3e653288caba2a20b51
[2024-04-19T23:07:41.134Z] Command output: {"stdout":"d39f849b8136a0640feda6ef07270890aa4f9db65fd9f3e653288caba2a20b51\n","stderr":""}
[2024-04-19T23:07:41.134Z] Done.
[2024-04-19T23:07:41.136Z] Error confirming to extension: Error: connect ENOENT /run/user/17884/vscode-remote-containers-d54ce7e0-b866-4d1d-ac1f-0836da9ef4d4.sock
    at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)

In some cases it gets further, showing the popup "Dev Container configuration already exists" and the following log:

[2024-04-19T23:45:56.397Z] {"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"25.0.4","ApiVersion":"1.44","DefaultAPIVersion":"1.44","GitCommit":"1a576c5","GoVersion":"go1.21.8","Os":"linux","Arch":"amd64","BuildTime":"Wed Mar  6 16:33:16 2024","Context":"default"},"Server":{"Platform":{"Name":"Docker Engine - Community"},"Components":[{"Name":"Engine","Version":"25.0.4","Details":{"ApiVersion":"1.44","Arch":"amd64","BuildTime":"Wed Mar  6 16:32:11 2024","Experimental":"false","GitCommit":"061aa95","GoVersion":"go1.21.8","KernelVersion":"3.10.0-1160.108.1.el7.x86_64","MinAPIVersion":"1.24","Os":"linux"}},{"Name":"containerd","Version":"1.6.28","Details":{"GitCommit":"ae07eda36dd25f8a1b98dfbf587313b99c0190bb"}},{"Name":"runc","Version":"1.1.12","Details":{"GitCommit":"v1.1.12-0-g51d5e94"}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"Version":"25.0.4","ApiVersion":"1.44","MinAPIVersion":"1.24","GitCommit":"061aa95","GoVersion":"go1.21.8","Os":"linux","Arch":"amd64","KernelVersion":"3.10.0-1160.108.1.el7.x86_64","BuildTime":"2024-03-06T16:32:11.000000000+00:00"}}
[2024-04-19T23:45:56.398Z] Stop (143 ms): Run: docker version --format {{json .}}
[2024-04-19T23:45:56.255Z] Dev Containers 0.330.0 in VS Code 1.85.2 (8b3775030ed1a69b13e4f4c628c612102e30a681).
[2024-04-19T23:45:56.255Z] Start: Run: docker version --format {{json .}}
[2024-04-19T23:46:24.150Z] Start: Run: docker version --format {{json .}}
[2024-04-19T23:46:24.235Z] {"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"25.0.4","ApiVersion":"1.44","DefaultAPIVersion":"1.44","GitCommit":"1a576c5","GoVersion":"go1.21.8","Os":"linux","Arch":"amd64","BuildTime":"Wed Mar  6 16:33:16 2024","Context":"default"},"Server":{"Platform":{"Name":"Docker Engine - Community"},"Components":[{"Name":"Engine","Version":"25.0.4","Details":{"ApiVersion":"1.44","Arch":"amd64","BuildTime":"Wed Mar  6 16:32:11 2024","Experimental":"false","GitCommit":"061aa95","GoVersion":"go1.21.8","KernelVersion":"3.10.0-1160.108.1.el7.x86_64","MinAPIVersion":"1.24","Os":"linux"}},{"Name":"containerd","Version":"1.6.28","Details":{"GitCommit":"ae07eda36dd25f8a1b98dfbf587313b99c0190bb"}},{"Name":"runc","Version":"1.1.12","Details":{"GitCommit":"v1.1.12-0-g51d5e94"}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"Version":"25.0.4","ApiVersion":"1.44","MinAPIVersion":"1.24","GitCommit":"061aa95","GoVersion":"go1.21.8","Os":"linux","Arch":"amd64","KernelVersion":"3.10.0-1160.108.1.el7.x86_64","BuildTime":"2024-03-06T16:32:11.000000000+00:00"}}
[2024-04-19T23:46:24.237Z] Stop (87 ms): Run: docker version --format {{json .}}
[2024-04-19T23:46:24.241Z] Start: Run: docker -v
[2024-04-19T23:46:24.309Z] Stop (68 ms): Run: docker -v
[2024-04-19T23:46:24.310Z] Start: Run: docker events --format {{json .}} --filter event=create --filter event=destroy --filter event=die --filter event=health-status --filter event=kill --filter event=pause --filter event=rename --filter event=resize --filter event=restart --filter event=start --filter event=stop --filter event=unpause --filter event=update --filter event=exec_create
[2024-04-19T23:46:24.340Z] Start: Run: docker ps -q -a
[2024-04-19T23:46:24.431Z] Stop (91 ms): Run: docker ps -q -a
[2024-04-19T23:46:24.437Z] Start: Run: docker inspect --type container db943761484e
[2024-04-19T23:46:24.505Z] Stop (68 ms): Run: docker inspect --type container db943761484e
[2024-04-19T23:46:24.632Z] Start: Run: git rev-parse --show-cdup
[2024-04-19T23:46:24.680Z] Stop (48 ms): Run: git rev-parse --show-cdup
[2024-04-19T23:46:24.681Z] Start: Run: git rev-parse --show-cdup
[2024-04-19T23:46:24.697Z] Stop (16 ms): Run: git rev-parse --show-cdup
[2024-04-19T23:46:24.700Z] Stop (19 ms): Run: git rev-parse --show-cdup
[2024-04-19T23:46:24.733Z] Start: Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/tom.chartrand/.vscode/extensions/ms-vscode-remote.remote-containers-0.330.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /local1/storage/localwork/codeocean_capsules/thalamus-merfish-analysis --log-level debug --log-format json --config /local1/storage/localwork/codeocean_capsules/thalamus-merfish-analysis/.devcontainer/devcontainer.json --mount-workspace-git-root
[2024-04-19T23:46:25.290Z] @devcontainers/cli 0.55.0. Node.js v18.15.0. linux 3.10.0-1160.108.1.el7.x86_64 x64.
[2024-04-19T23:46:25.290Z] Start: Run: git rev-parse --show-cdup
[2024-04-19T23:46:25.305Z] Stop (15 ms): Run: git rev-parse --show-cdup
[2024-04-19T23:46:25.307Z] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/local1/storage/localwork/codeocean_capsules/thalamus-merfish-analysis --filter label=devcontainer.config_file=/local1/storage/localwork/codeocean_capsules/thalamus-merfish-analysis/.devcontainer/devcontainer.json
[2024-04-19T23:46:25.337Z] Stop (30 ms): Run: docker ps -q -a --filter label=devcontainer.local_folder=/local1/storage/localwork/codeocean_capsules/thalamus-merfish-analysis --filter label=devcontainer.config_file=/local1/storage/localwork/codeocean_capsules/thalamus-merfish-analysis/.devcontainer/devcontainer.json
[2024-04-19T23:46:25.337Z] Start: Run: docker inspect --type container db943761484e
[2024-04-19T23:46:25.368Z] Stop (31 ms): Run: docker inspect --type container db943761484e
[2024-04-19T23:46:25.455Z] Stop (722 ms): Run: /usr/share/code/code --ms-enable-electron-run-as-node /home/tom.chartrand/.vscode/extensions/ms-vscode-remote.remote-containers-0.330.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /local1/storage/localwork/codeocean_capsules/thalamus-merfish-analysis --log-level debug --log-format json --config /local1/storage/localwork/codeocean_capsules/thalamus-merfish-analysis/.devcontainer/devcontainer.json --mount-workspace-git-root

Does this issue occur when you try this locally?: NA Does this issue occur when you try this locally and all extensions are disabled?: NA

chrmarti commented 6 months ago

Seeing Dev Containers 0.330.0 in VS Code 1.85.2 in the log. Could you update VS Code to 1.88 or later and Dev Containers to 0.363.0-pre-release or later and retry?

tmchartrand commented 6 months ago

I think the older extension is the issue - I'm running older CentOS so can't update directly, but interestingly was able to install the newer extension for vscode-server on this machine when running through remote-ssh, and the problem was not present there. More motivation to upgrade the OS I guess, closing for now.