Issue Type: Bug
Using the rebuild container command consistently fails.
It reloads the window and immediately complains that the operation failed.
The logs indicate that it's trying to perform docker exec commands on a container that is not running.
VS Code version: Code - Insiders 1.34.0-insider (473af338e1bd9ad4d9853933da1cd9d5d9e07dc9, 2019-05-01T05:15:04.403Z)
OS version: Linux x64 4.19.26-03278-g71dc68f9c9d0
Fetching remote diagnostics for 'Dev Container: Node.js (current) & TypeScript' failed.
System Info
|Item|Value|
|---|---|
|CPUs|06/8e (4 x 1607)|
|GPU Status|2d_canvas: unavailable_software
checker_imaging: disabled_off
flash_3d: unavailable_off
flash_stage3d: unavailable_off
flash_stage3d_baseline: unavailable_off
gpu_compositing: unavailable_off
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: unavailable_off
surface_synchronization: enabled_on
video_decode: unavailable_off
webgl: enabled_readback
webgl2: unavailable_off|
|Load (avg)|2, 1, 0|
|Memory (System)|4.84GB (2.26GB free)|
|Process Argv|--unity-launch|
|Screen Reader|no|
|VM|100%|
Fetching remote diagnostics for 'Dev Container: Node.js (current) & TypeScript' failed.
Extensions: none
After manually reloading the window the container rebuilds properly.
@mhofman please provide more information for how we can reproduce the problem, e.g, share your devcontainer.json/Dockerfile.
Any container I've tried really, including the example ones.
One thing I forgot to mention, the failure happens when I make a change to either the devcontainer.json or Dockerfile, and want to recreate the container based on those changes.
git clone https://github.com/Microsoft/vscode-remote-try-node
code-insider vscode-remote-try-node
This also fails as described above: https://github.com/mhofman/tc39-weakrefs-shim/tree/master/.devcontainer
@mhofman
The logs indicate that it's trying to perform docker exec commands on a container that is not running.
Can you please attach the logs and also what is shown in the Dev Containers terminal.
I think I have seen this, logs would be great. This could be the old container still being around when the resolver starts.
This could be the old container still being around when the resolver starts.
Good hint. @mhofman can you make sure you remove the container manually using the Docker command line before you rebuild.
Yeah I'm editing the container files from within the container, so it'd make sense that the container is still around. For the same reason I can't remove it since VSCode is currently using it.
I realize now this is more of a feature request: "be able to update dev container config from VSCode in remote mode".
Can repro this. It looks like the VSCode extension doesn't do a good enough job of checking that the debug container actually runs.
@trondhindenes can you provide steps for how you can reproduce this?
I've just tried to rebuild the container of the vscode-remote-try-node example and it worked for me.
@chrmarti could we check that the container has really shutdown once you removed it, before you start the rebuild?
Sometimes Docker for Windows ends up in a state where it's unable to set up the required publishing rules for publishing ports in a Docker container (this happens quite often on both mine and colleagues' computers). In this situation the container crashes so it doesn't run, but it still exists. I'll try and grab some logs/screenshots next time it happens.
@trondhindenes That's a separate problem, I'll open an issue for it.
@mhofman When you see this, can you check if the container (the id is usually logged to the Dev Container terminal) is still around when you check manually?
@mhofman Could you retry with 0.51.0 of the Remote Containers extension? We have refined the checks during startup a bit.
Updated to the latest versions and rebuilding the container now seem to work fine :)
Thanks! Closing as fixed.