Skip to content
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

First attempt at rebuild always fails (container removal already in progress) #6509

Closed
dmartin opened this issue Mar 25, 2022 · 38 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded

Comments

@dmartin
Copy link

dmartin commented Mar 25, 2022

  • VSCode Version: Version: 1.65.2 (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1)
  • Local OS Version: macOS 12.3 (21E230)
  • Remote OS Version: Ubuntu 21.04
  • Remote Extension/Connection Type: Docker
  • Logs:
[54 ms] Remote-Containers 0.224.3 in VS Code 1.65.2 (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1).
[53 ms] Start: Resolving Remote
[65 ms] Setting up container for folder or workspace: /Users/dustinm/platform
[69 ms] Start: Check Docker is running
[70 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[321 ms] Server API version: 1.41
[368 ms] Start: Run: docker-compose version --short
[1047 ms] Start: Run: docker ps -q -a --filter label=com.docker.compose.project=platform_devcontainer --filter label=com.docker.compose.service=devcontainer
[1340 ms] Start: Run: docker inspect --type container aa0f7f3bb925
[1651 ms] Start: Removing existing container.
[1651 ms] Start: Run: docker rm -f aa0f7f3bb92504765778978df1e06b8bff341b9d43fa771badf1af8505ba5808
[1936 ms] Command failed: docker rm -f aa0f7f3bb92504765778978df1e06b8bff341b9d43fa771badf1af8505ba5808
[1936 ms] Error response from daemon: removal of container aa0f7f3bb92504765778978df1e06b8bff341b9d43fa771badf1af8505ba5808 is already in progress
[1936 ms] Exit code 1
[3701 ms] Start: Run: docker stop -t 0 aa0f7f3bb92504765778978df1e06b8bff341b9d43fa771badf1af8505ba5808

Steps to Reproduce:

  1. From command palette, select Rebuild Container
  2. First attempt will fail, seemingly due to in-progress container removal
  3. Select Retry in the opened modal
  4. Second attempt will proceed to building the container

Does this issue occur when you try this locally?: N/A
Does this issue occur when you try this locally and all extensions are disabled?: Yes

@tanhakabir tanhakabir added the containers Issue in vscode-remote containers label Mar 25, 2022
@chrmarti chrmarti self-assigned this Mar 29, 2022
@chrmarti chrmarti added the bug Issue identified by VS Code Team member as probable bug label Mar 29, 2022
@chrmarti chrmarti added this to the April 2022 milestone Mar 29, 2022
@fslef
Copy link

fslef commented Apr 3, 2022

Same issue here

@marksherman
Copy link

I'm seeing a cluster of issues that seem to be based on VSCode not being able to stop and/or remove running containers. The rebuild, described above, is the most reliable one. Sometimes when I re-open the project locally, the container persists and keeps running. Containers keep running beyond VSCode being quit entirely. In all of these situations, once the error state is encountered, the only way to stop the container is to restart docker desktop entirely. Docker itself can't stop the containers.

These issues are new! Everything was rock-solid a mere couple weeks ago, when I was able to tweak and rebuild containers repeatedly without issue.

My system:

MacOS 12.3.1 Intel (21E258)
MacBook Pro (15-inch, 2018)
2.2 Ghz 6-Core Intel i7, 16 GB RAM, ~200GB free hd space

It's the same on both the regular VSCode and on Insiders, with these versions:

Version: 1.66.2
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:49:20.994Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Darwin x64 21.4.0

Version: 1.67.0-insider (Universal)
Commit: e3f21a18e2727ac37c78159ba81f2c6ee4a982cc
Date: 2022-04-13T05:17:23.764Z
Electron: 17.4.0
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: 9.8.177.13-electron.0
OS: Darwin x64 21.4.0

Docker version 20.10.14, build a224086

Here's what it looks like in action.

[31 ms] Remote-Containers 0.232.6 in VS Code 1.67.0-insider (e3f21a18e2727ac37c78159ba81f2c6ee4a982cc).
[30 ms] Start: Resolving Remote
[49 ms] Setting up container for folder or workspace: /Users/shermanm/git/programming2/python-playground
[73 ms] Start: Check Docker is running
[73 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[163 ms] Server API version: 1.41
[164 ms] Start: Run: docker volume ls -q
[252 ms] Start: Run: docker inspect --type container cf14ae6f0da31c948fb02a6e8fa81f26fb2aed8b6e3849297545688089933119
[329 ms] Start: Run: docker rm -f cf14ae6f0da31c948fb02a6e8fa81f26fb2aed8b6e3849297545688089933119
[414 ms] Command failed: docker rm -f cf14ae6f0da31c948fb02a6e8fa81f26fb2aed8b6e3849297545688089933119
[414 ms] Error response from daemon: removal of container cf14ae6f0da31c948fb02a6e8fa81f26fb2aed8b6e3849297545688089933119 is already in progress
[414 ms] Exit code 1

remoteContainers-.....log

[2022-04-13T13:59:32.018Z] Remote-Containers 0.232.6 in VS Code 1.67.0-insider (e3f21a18e2727ac37c78159ba81f2c6ee4a982cc).
[2022-04-13T13:59:32.018Z] Start: Resolving Remote
[2022-04-13T13:59:32.035Z] Setting up container for folder or workspace: /Users/shermanm/git/programming2/python-playground
[2022-04-13T13:59:32.074Z] Start: Check Docker is running
[2022-04-13T13:59:32.074Z] Start: Run: docker version --format {{.Server.APIVersion}}
[2022-04-13T13:59:32.168Z] Stop (94 ms): Run: docker version --format {{.Server.APIVersion}}
[2022-04-13T13:59:32.168Z] Server API version: 1.41
[2022-04-13T13:59:32.169Z] Stop (95 ms): Check Docker is running
[2022-04-13T13:59:32.169Z] Start: Run: docker volume ls -q
[2022-04-13T13:59:32.247Z] Stop (78 ms): Run: docker volume ls -q
[2022-04-13T13:59:32.260Z] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/Users/shermanm/git/programming2/python-playground --filter label=vsch.quality=insider
[2022-04-13T13:59:32.337Z] Stop (77 ms): Run: docker ps -q -a --filter label=vsch.local.folder=/Users/shermanm/git/programming2/python-playground --filter label=vsch.quality=insider
[2022-04-13T13:59:32.338Z] Start: Run: docker inspect --type container cf14ae6f0da3
[2022-04-13T13:59:32.413Z] Stop (75 ms): Run: docker inspect --type container cf14ae6f0da3
[2022-04-13T13:59:32.414Z] Start: Run: /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron /Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js up --container-data-folder .vscode-server-insiders/data/Machine --container-system-data-folder /var/vscode-server-insiders --workspace-folder /Users/shermanm/git/programming2/python-playground --workspace-mount-consistency cached --id-label vsch.local.folder=/Users/shermanm/git/programming2/python-playground --id-label vsch.quality=insider --log-level debug --config /Users/shermanm/git/programming2/python-playground/.devcontainer/devcontainer.json --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-04-13T13:59:32.584Z] remote-containers 0.232.6.
[2022-04-13T13:59:32.584Z] Start: Resolving Remote
[2022-04-13T13:59:32.588Z] Start: Run: git rev-parse --show-cdup
[2022-04-13T13:59:32.600Z] Stop (12 ms): Run: git rev-parse --show-cdup
[2022-04-13T13:59:32.601Z] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/Users/shermanm/git/programming2/python-playground --filter label=vsch.quality=insider
[2022-04-13T13:59:32.675Z] Stop (74 ms): Run: docker ps -q -a --filter label=vsch.local.folder=/Users/shermanm/git/programming2/python-playground --filter label=vsch.quality=insider
[2022-04-13T13:59:32.675Z] Start: Run: docker inspect --type container cf14ae6f0da3
[2022-04-13T13:59:32.754Z] Stop (79 ms): Run: docker inspect --type container cf14ae6f0da3
[2022-04-13T13:59:32.754Z] Start: Inspecting container
[2022-04-13T13:59:32.754Z] Start: Run: docker inspect --type container cf14ae6f0da31c948fb02a6e8fa81f26fb2aed8b6e3849297545688089933119
[2022-04-13T13:59:32.833Z] Stop (79 ms): Run: docker inspect --type container cf14ae6f0da31c948fb02a6e8fa81f26fb2aed8b6e3849297545688089933119
[2022-04-13T13:59:32.833Z] Stop (79 ms): Inspecting container
[2022-04-13T13:59:32.834Z] Start: Run in container: /bin/sh
[2022-04-13T13:59:32.836Z] Start: Run in container: uname -m
[2022-04-13T13:59:32.967Z] Stop (133 ms): Run in container: /bin/sh
[2022-04-13T13:59:32.968Z] Shell server terminated (code: 126, signal: null)
[2022-04-13T13:59:32.968Z] OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: process_linux.go:130: executing setns process caused: exit status 1: unknown
[2022-04-13T13:59:32.968Z] Start: Run in container: cat /etc/passwd
[2022-04-13T13:59:32.968Z] Stdin closed!
[2022-04-13T13:59:32.969Z] Error: An error occurred setting up the container.
[2022-04-13T13:59:32.969Z] at bR (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:219:986)
[2022-04-13T13:59:32.969Z] at Hw (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:219:924)
[2022-04-13T13:59:32.970Z] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-04-13T13:59:32.970Z] at async IR (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:224:2024)
[2022-04-13T13:59:32.970Z] at async Xw (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:224:3221)
[2022-04-13T13:59:32.970Z] at async kR (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:224:13925)
[2022-04-13T13:59:32.970Z] at async TR (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:224:13650)
[2022-04-13T13:59:32.973Z] Stop (559 ms): Run: /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron /Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js up --container-data-folder .vscode-server-insiders/data/Machine --container-system-data-folder /var/vscode-server-insiders --workspace-folder /Users/shermanm/git/programming2/python-playground --workspace-mount-consistency cached --id-label vsch.local.folder=/Users/shermanm/git/programming2/python-playground --id-label vsch.quality=insider --log-level debug --config /Users/shermanm/git/programming2/python-playground/.devcontainer/devcontainer.json --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-04-13T13:59:32.973Z] Exit code 1
[2022-04-13T13:59:32.977Z] Command failed: /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron /Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js up --container-data-folder .vscode-server-insiders/data/Machine --container-system-data-folder /var/vscode-server-insiders --workspace-folder /Users/shermanm/git/programming2/python-playground --workspace-mount-consistency cached --id-label vsch.local.folder=/Users/shermanm/git/programming2/python-playground --id-label vsch.quality=insider --log-level debug --config /Users/shermanm/git/programming2/python-playground/.devcontainer/devcontainer.json --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-04-13T13:59:32.977Z] Exit code 1

installed pre-release of remote-container plugin and said rebuild and reopen to get this:

[33 ms] Remote-Containers 0.232.6 in VS Code 1.67.0-insider (e3f21a18e2727ac37c78159ba81f2c6ee4a982cc).
[33 ms] Start: Resolving Remote
[52 ms] Setting up container for folder or workspace: /Users/shermanm/git/programming2/python-playground
[80 ms] Start: Check Docker is running
[80 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[169 ms] Server API version: 1.41
[169 ms] Start: Run: docker volume ls -q
[258 ms] Start: Run: /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron /Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js up --container-data-folder .vscode-server-insiders/data/Machine --container-system-data-folder /var/vscode-server-insiders --workspace-folder /Users/shermanm/git/programming2/python-playground --workspace-mount-consistency cached --id-label vsch.local.folder=/Users/shermanm/git/programming2/python-playground --id-label vsch.quality=insider --log-level debug --config /Users/shermanm/git/programming2/python-playground/.devcontainer/devcontainer.json --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[431 ms] remote-containers 0.232.6.
[431 ms] Start: Resolving Remote
[434 ms] Start: Run: git rev-parse --show-cdup
[448 ms] Start: Run: docker ps -q -a --filter label=vsch.local.folder=/Users/shermanm/git/programming2/python-playground --filter label=vsch.quality=insider
[521 ms] Start: Run: docker inspect --type container cf14ae6f0da3
[595 ms] Start: Removing Existing Container
[595 ms] Start: Run: docker rm -f cf14ae6f0da31c948fb02a6e8fa81f26fb2aed8b6e3849297545688089933119
[12697 ms] Error: Command failed: docker rm -f cf14ae6f0da31c948fb02a6e8fa81f26fb2aed8b6e3849297545688089933119
[12697 ms] at bR (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:219:986)
[12697 ms] at Hw (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:219:924)
[12698 ms] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[12698 ms] at async IR (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:224:2024)
[12698 ms] at async Xw (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:224:3221)
[12698 ms] at async kR (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:224:13925)
[12698 ms] at async TR (/Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js:224:13650)
[12702 ms] Exit code 1
[12706 ms] Command failed: /Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron /Users/shermanm/.vscode-insiders/extensions/ms-vscode-remote.remote-containers-0.232.6/dist/spec-node/devContainersSpecCLI.js up --container-data-folder .vscode-server-insiders/data/Machine --container-system-data-folder /var/vscode-server-insiders --workspace-folder /Users/shermanm/git/programming2/python-playground --workspace-mount-consistency cached --id-label vsch.local.folder=/Users/shermanm/git/programming2/python-playground --id-label vsch.quality=insider --log-level debug --config /Users/shermanm/git/programming2/python-playground/.devcontainer/devcontainer.json --remove-existing-container --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[12706 ms] Exit code 1

@marksherman
Copy link

Related my last comment, there's also another NEW transient issue where the in-VSCode terminal lags, never appears, or completely hangs when connected to a container. Sometimes it never appears when reloading into the container environment. Sometimes it works fine, then after the first or second command never returns to the prompt, hanging forever.

When this happens, if I reload the project locally, the container doesn't stop running. If I try to stop it with Docker Desktop, I eventually get this nice error:

Error invoking method 'docker-stop-container': Error: (HTTP code 500) server error - cannot stop container: [big container id]: tried to kill container, but did not receive an exit event

Screen Shot 2022-04-13 at 10 20 45 AM

This makes me think it has something to do with the core control code that VSCode uses; the software that runs in the container is hung and isn't responding, preventing shutdown.

@ghost
Copy link

ghost commented Apr 15, 2022

I'm not entirely sure your issue is related @marksherman. You should open a separate issue.

Anyways, I'm also getting this issue. It almost seems like the container is eagerly removed before quitting and then when VSCode launches it wants to ensure the container is removed, but it already is.

This is happening to me inside of a docker-compose.yml configuration. I'm not even sure what made it start. Something I'm doing is causing this issue, because I was messing around with the devcontainer configuration and the issue stopped happening for a bit.

@dbargatz
Copy link

I've also been seeing this issue over the last week or so, with steps to reproduce and log output identical to what @dmartin originally posted. Try to rebuild container, fail on removing container, click Retry, second rebuild works. My config:

  • VSCode Version: Version: 1.66.2 (dfd34e8260c270da74b5c2d86d61aee4b6d56977)
  • Local OS Version: macOS 12.3.1 (21E258) (Darwin x64 21.4.0)
  • Docker Desktop for Mac Version: 4.7.0 (77141) (Engine 20.10.14)
  • Remote OS Version: Debian 11 Bullseye
  • Remote Extension/Connection Type: Docker
  • Remote Containers Extension Version: 0.231.6

Please let me know if there's any additional information you need, happy to provide!

@chrmarti chrmarti modified the milestones: April 2022, May 2022 Apr 29, 2022
@chrmarti chrmarti modified the milestones: May 2022, On Deck Jun 2, 2022
@theonlyfoxy
Copy link

same issue here. version: 1.68.0

@chrmarti
Copy link
Contributor

@theonlyfoxy Could you append your log from when this happens? (F1 > Remote-Containers: Show Container Log)

@DougPlumley
Copy link

Also experience this, I'll try to get logs next time.

@DougPlumley
Copy link

@theonlyfoxy Could you append your log from when this happens? (F1 > Remote-Containers: Show Container Log)

@chrmarti I attempted to run Remote-Containers: Show Container Log after clicking "more actions" after the failure, didn't see anything happen as far as logs. Regardless here is some of the text I can see:

[31 ms] Remote-Containers 0.241.3 in VS Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a). [31 ms] Start: Resolving Remote [37 ms] Setting up container for folder or workspace: /Users/*******/****** [49 ms] Start: Check Docker is running [49 ms] Start: Run: docker version --format {{.Server.APIVersion}} [98 ms] Server API version: 1.41 [98 ms] Start: Run: docker volume ls -q [165 ms] Start: Run: docker inspect --type container e0be6853c12020aa2724ceae02798e9b0c648b8dcb604f0fa499accd50d56442 [194 ms] Start: Run: docker rm -f e0be6853c12020aa2724ceae02798e9b0c648b8dcb604f0fa499accd50d56442 [225 ms] Command failed: docker rm -f e0be6853c12020aa2724ceae02798e9b0c648b8dcb604f0fa499accd50d56442 [225 ms] Error response from daemon: removal of container e0be6853c12020aa2724ceae02798e9b0c648b8dcb604f0fa499accd50d56442 is already in progress [225 ms] Exit code 1

I couldn't copy the text from this error, but here's a screenshot with the tail end of the path cropped.

image

@JamesHutchisonCarta
Copy link

I've found that if VS Code is, for any reason, delayed then you don't get this issue. Seems like it is not waiting entirely for the container to shut down before reopening it. On Mac OS 12

@JohnRoesler
Copy link

I'm seeing this as well, just about every time I rebuild the container on an M1 mac. If i click the retry button too fast I often get the error again so I usually wait a couple seconds. It'd be nice to introduce either a delay or wait for the container termination command to complete before trying to start the new build.

@mikekosulin
Copy link

mikekosulin commented Oct 7, 2022

Trying to reopen project in Container and got this error message:

Command 'Dev Containers: Reopen in Container' resulted in an error (Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/someuser/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /Users/someuser/Projects/someteam/sko/composer/packages/sko-fin-api --log-level debug --log-format json --config /Users/someuser/Projects/someteam/sko/composer/packages/sko-fin-api/.devcontainer/devcontainer.json --include-merged-configuration --mount-workspace-git-root true)

Env:
MacOS 12.6 on Apple M2

Docker:
Engine: 20.10.17
Compose: v2.10.2

VS Code:
Version: 1.72.0 (Universal)
Commit: 64bbfbf67ada9953918d72e1df2f4d8e537d340e
Date: 2022-10-04T23:21:58.256Z (2 days ago)
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin arm64 21.6.0
Sandboxed: No

Log:

[2022-10-07T21:49:40.025Z] Error: Command failed: docker-compose -f /Users/someuser/Projects/someteam/sko/composer/docker-compose.yml --profile * config
[2022-10-07T21:49:40.025Z]     at no (/Users/someuser/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:288:900)
[2022-10-07T21:49:40.025Z]     at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-10-07T21:49:40.025Z]     at async ZF (/Users/someuser/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:259:1393)
[2022-10-07T21:49:40.025Z]     at async XF (/Users/someuser/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:241:2391)
[2022-10-07T21:49:40.025Z]     at async bD (/Users/someuser/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:303:2193)
[2022-10-07T21:49:40.025Z]     at async ys (/Users/someuser/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:303:3182)
[2022-10-07T21:49:40.025Z]     at async UL (/Users/someuser/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:423:10319)
[2022-10-07T21:49:40.025Z]     at async ML (/Users/someuser/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js:423:10075)
[2022-10-07T21:49:40.027Z] Stop (425 ms): Run: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/someuser/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/someuser/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /Users/someuser/Projects/someteam/sko/composer/packages/sko-fin-api --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/someuser/Projects/someteam/sko/composer/packages/sko-fin-api --log-level debug --log-format json --config /Users/someuser/Projects/someteam/sko/composer/packages/sko-fin-api/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-10-07T21:49:40.027Z] Exit code 1
[2022-10-07T21:49:40.030Z] Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper.app/Contents/MacOS/Code Helper --ms-enable-electron-run-as-node /Users/someuser/.vscode/extensions/ms-vscode-remote.remote-containers-0.255.2/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/someuser/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --workspace-folder /Users/someuser/Projects/someteam/sko/composer/packages/sko-fin-api --workspace-mount-consistency cached --id-label devcontainer.local_folder=/Users/someuser/Projects/someteam/sko/composer/packages/sko-fin-api --log-level debug --log-format json --config /Users/someuser/Projects/someteam/sko/composer/packages/sko-fin-api/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2022-10-07T21:49:40.030Z] Exit code 1

@chrmarti
Copy link
Contributor

Could you append the full log?

@DougPlumley
Copy link

Could you append the full log?

I wasn't able to get the full log previously, is there a different process we could follow to get the full logs you're looking for?

@JohnRoesler
Copy link

Here are the logs I get:

Env:
MacOS 12.4 on Apple M1

Docker:
Engine: 20.10.17

VS Code:
Version: 1.72.0
Commit: 64bbfbf67ada9953918d72e1df2f4d8e537d340e
Date: 2022-10-04T23:19:55.212Z (6 days ago)
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin arm64 21.5.0
Sandboxed: No

VS Code Terminal logs:

[19 ms] Dev Containers 0.255.2 in VS Code 1.72.0 (64bbfbf67ada9953918d72e1df2f4d8e537d340e).
[18 ms] Start: Resolving Remote
[25 ms] Setting up container for folder or workspace: /Users/foo/bar
[33 ms] Start: Check Docker is running
[33 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[83 ms] Server API version: 1.41
[84 ms] Start: Run: docker volume ls -q
[141 ms] Start: Run: docker inspect --type container 8461fbcc767445530878e846e6b27d6678767015f0d6d00168d65f1319eade92
[186 ms] Start: Run: docker rm -f 8461fbcc767445530878e846e6b27d6678767015f0d6d00168d65f1319eade92
[223 ms] Command failed: docker rm -f 8461fbcc767445530878e846e6b27d6678767015f0d6d00168d65f1319eade92
[224 ms] Error response from daemon: removal of container 8461fbcc767445530878e846e6b27d6678767015f0d6d00168d65f1319eade92 is already in progress
[224 ms] Exit code 1

Are there other logs I should be looking to grab for you?

@chrmarti
Copy link
Contributor

@JohnRoesler That's all I need, thanks.

@chrmarti chrmarti modified the milestones: On Deck, October 2022 Oct 11, 2022
@nimpy
Copy link

nimpy commented Oct 14, 2022

Same error here as @DougPlumley, I am on M1 mac. @JamesHutchisonCarta, what do you mean "delayed"? I am struggling to avoid getting this error.

@mikekosulin
Copy link

@nimpy do you have any errors running your docker-compose file without cache(docker-compose up --build -d)?

@rebornix rebornix modified the milestones: October 2022, November 2022 Oct 25, 2022
@chrmarti chrmarti modified the milestones: January 2023, On Deck Jan 23, 2023
@felixdivo
Copy link

If it had a retry mechanism that waited up to 10 seconds

I may case, about a second would probably already be enough.

@andreujuanc
Copy link

A retry would be a good workaround, but there must be some effort in understanding why is it happening and how to prevent the extension into getting in that state.

@Igetin
Copy link

Igetin commented Mar 22, 2023

Still reproducible on 1.76.2.

@jnak
Copy link

jnak commented May 13, 2023

+1 with DockerDesktop on Mac. On a remote Linux machine, it seems fine.

@iownbey
Copy link

iownbey commented Jul 20, 2023

Still reproducible on 1.80.1, running devcontainer in wsl

@dcantemir
Copy link

Same error with VSCode 1.83.1 + colima 0.5.5 as container runtime (on MacOS Monterey 12.7)

@DonnyVerduijn
Copy link

Reproducible Pop_OS 22.04 + VSCode 1.83.1. Is there anything we can do to solve this. Some pointers in the right direction? Can we delay the removal of the container to verify our assumptions?

@alanmaciel
Copy link

alanmaciel commented Nov 18, 2023

Still happens in M1 with Sonoma 14.0 (23A344) + VSCode Version: 1.84.2

@DanCorvesor
Copy link

Same issue on VSCode version 1.85.2, Mac M1. Come on guys, this has been going on years. Please fix up.

@daulis
Copy link

daulis commented Feb 8, 2024

Still an issue with 1.86.0. But, this seems to happen less frequently for me vs previous versions
(I'm running my devcontainer inside of WSL)

@Barben360
Copy link

Same issue for years now, and still present in 1.86.2.

When you work on everyday basis in dev containers, this is a very frustrating issue.

When stopping dev containers, VS Code should just wait for the docker compose resource removal to be over before starting a new instance.

@chrmarti
Copy link
Contributor

chrmarti commented Sep 4, 2024

Fixed for the next pre-release.

@chrmarti chrmarti closed this as completed Sep 4, 2024
@andreujuanc
Copy link

Fixed for the next pre-release.

Brilliant! Out of curiosity, when it will be on GA?

@DougPlumley
Copy link

Fixed for the next pre-release.

Awesome thank you @chrmarti!

@chrmarti
Copy link
Contributor

chrmarti commented Sep 4, 2024

Please give it a try in Dev Containers 0.385.0-pre-release and let me know if that fixes it for you. Thanks!

This fix will be in the September release which is about 1 month out (it will release alongside VS Code 1.94).

@fetzig
Copy link

fetzig commented Sep 18, 2024

thx for the fix ❤️

this bug was incredibly annoying. for years this didn't work reliably or at all.

to me one thing still remains an issue:
the container(s) stay up after closing vscode.
when starting the container(s) manually and then starting vscode, it attaches to that running container. that running container didn't use .devcontainer/docker-compose.yml. thus this leads to all kinds of issues.

from my POV it looks like we will keep run into bugs like these until vscode-remote leaves the starting/stopping of the container(s) to the user.

kindly request feedback/clarification. happy to create a separate issue for this.

@chrmarti
Copy link
Contributor

@fetzig Could you open a new issue for this? (There is an issue for the containers staying up when connecting through SSH.) Thanks.

@chrmarti chrmarti added the verified Verification succeeded label Sep 24, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Oct 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Projects
None yet
Development

No branches or pull requests