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.56k stars 267 forks source link

Dev Containers: New Dev Container and Dev Containers: Add Dev Container Configuration Files don't work #9538

Open agonzaleziniguez opened 5 months ago

agonzaleziniguez commented 5 months ago

When trying to create a new dev container with the commands:

VSCode: v1.86.1 DevContainer: v0.338.1

Same problem found in Windows 10 and Ubuntu 22.04

pjfitzgibbons commented 5 months ago

Confirmed on MacOS Sonoma 14.3, Apple Silicon M1 Max Version: 1.86.1 Commit: 31c37ee8f63491495ac49e43b8544550fbae4533 Date: 2024-02-07T09:08:57.920Z Electron: 27.2.3 ElectronBuildId: 26495564 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin arm64 23.3.0

Dev Containers Extension Published 2019-05-02, 11:31:37 Last released 2024-02-09, 05:31:49 Last updated 2024-02-11, 10:28:32 Identifier ms-vscode-remote.remote-containers

odie5533 commented 5 months ago

Having the same issue here. Using the command palette for Dev Containers: New Dev Container simply closes the command palette and nothing happens or shows up. I was able to start the Try a Sample > Rust though.

AppData\Roaming\Code\logs\20240211T125330\window1\exthost\ms-vscode-remote.remote-containers\remoteContainers-2024-02-11T18-53-32.790Z.log

[2024-02-11T18:53:47.706Z] Dev Containers 0.342.0 in VS Code 1.86.1 (31c37ee8f63491495ac49e43b8544550fbae4533).
[2024-02-11T18:53:47.706Z] Start: Run: docker version --format {{json .}}
[2024-02-11T18:53:47.832Z] {"Client":{"CloudIntegration":"v1.0.35+desktop.10","Version":"25.0.2","ApiVersion":"1.44","DefaultAPIVersion":"1.44","GitCommit":"29cf629","GoVersion":"go1.21.6","Os":"windows","Arch":"amd64","BuildTime":"Thu Feb  1 00:24:09 2024","Context":"default"},"Server":{"Platform":{"Name":"Docker Desktop 4.27.1 (136059)"},"Components":[{"Name":"Engine","Version":"25.0.2","Details":{"ApiVersion":"1.44","Arch":"amd64","BuildTime":"Thu Feb  1 00:23:17 2024","Experimental":"false","GitCommit":"fce6e0c","GoVersion":"go1.21.6","KernelVersion":"5.15.133.1-microsoft-standard-WSL2","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.2","ApiVersion":"1.44","MinAPIVersion":"1.24","GitCommit":"fce6e0c","GoVersion":"go1.21.6","Os":"linux","Arch":"amd64","KernelVersion":"5.15.133.1-microsoft-standard-WSL2","BuildTime":"2024-02-01T00:23:17.000000000+00:00"}}
[2024-02-11T18:53:47.835Z] Stop (129 ms): Run: docker version --format {{json .}}
[2024-02-11T18:53:47.836Z] Start: Run: docker pull alpine:3.16.3
[2024-02-11T18:53:48.057Z] No container features retrieved from index.
[2024-02-11T18:53:48.057Z] Start: Run: docker volume ls -q
[2024-02-11T18:53:48.190Z] Stop (133 ms): Run: docker volume ls -q
[2024-02-11T18:53:48.576Z] Stop (740 ms): Run: docker pull alpine:3.16.3

I tried running docker volume ls -q and it works as expected. I don't see any unusual entries or characters.

No container features retrieved from index.

Sounds bad. Is the server hosting the index down? Or returning an unexpected response?

vipranarayan14 commented 5 months ago

+1

macOS Sonoma 14.2.1
Version: 1.86.1
Commit: 31c37ee8f63491495ac49e43b8544550fbae4533
Date: 2024-02-07T09:09:01.236Z
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.86.1 Chrome/118.0.5993.159 Electron/27.2.3 Safari/537.36
fcaponetto commented 5 months ago

Same issue here

ubuntu 20.04

[1102232 ms] Start: Run: docker version --format {{json .}}
[1102262 ms] {"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"25.0.3","ApiVersion":"1.44","DefaultAPIVersion":"1.44","GitCommit":"4debf41","GoVersion":"go1.21.6","Os":"linux","Arch":"amd64","BuildTime":"Tue Feb  6 21:14:17 2024","Context":"default"},"Server":{"Platform":{"Name":"Docker Engine - Community"},"Components":[{"Name":"Engine","Version":"25.0.3","Details":{"ApiVersion":"1.44","Arch":"amd64","BuildTime":"Tue Feb  6 21:14:17 2024","Experimental":"false","GitCommit":"f417435","GoVersion":"go1.21.6","KernelVersion":"5.11.0-46-generic","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.3","ApiVersion":"1.44","MinAPIVersion":"1.24","GitCommit":"f417435","GoVersion":"go1.21.6","Os":"linux","Arch":"amd64","KernelVersion":"5.11.0-46-generic","BuildTime":"2024-02-06T21:14:17.000000000+00:00"}}
[1102263 ms] Start: Run: docker pull alpine:3.16.3
[1102737 ms] No container features retrieved from index.
[1102738 ms] Start: Run: docker volume ls -q
grant-wilson commented 5 months ago

I tried downgrading to previous versions, but no change.

eecarus commented 5 months ago

+1 Same issue on Windows 10 Pro. Pre-release version (342) and uninstall/reinstall did not work. After getting the prompt for install devcontainer in user folder or in workspace, nothing else happens.

I am also unable to try the starters due to the following error

[326 ms] Dev Containers 0.342.0 in VS Code 1.86.1 (31c37ee8f63491495ac49e43b8544550fbae4533).
[326 ms] Start: Resolving Remote
[331 ms] Start: Run: wsl -l -v
[492 ms] Start: Run: wsl -d docker-desktop-data -e /bin/sh -c echo ~
[700 ms] Could not connect to WSL.
[700 ms] Command failed: wsl -d docker-desktop-data -e /bin/sh -c echo ~
[701 ms] 
[701 ms] <3>WSL (37) ERROR: CreateProcessParseCommon:754: getpwuid(0) failed 2
<3>WSL (37) ERROR: CreateProcessEntryCommon:331: getpwuid(0) failed 2
<3>WSL (37) ERROR: CreateProcessEntryCommon:502: execvpe /bin/sh failed 2
<3>WSL (37) ERROR: CreateProcessEntryCommon:505: Create process not expected to return
[702 ms] Start: Check Docker is running
[702 ms] Start: Run: docker version
[864 ms] Client:
 Cloud integration: v1.0.35+desktop.10
 Version:           25.0.2
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        29cf629
 Built:             Thu Feb  1 00:24:09 2024
 OS/Arch:           windows/amd64
 Context:           default

This continues on, but the final error is

[5814 ms] Start: Run in container: # Test for /root/.ssh/known_hosts and ssh
[5818 ms] 
[5818 ms] 
[5818 ms] Start: Run in container: # Copy C:\Users\Papa\.ssh\known_hosts to /root/.ssh/known_hosts
[5823 ms] 
[5823 ms] 
[5935 ms] Start: Run in container: git clone --depth 1 https://github.com/Microsoft/vscode-remote-try-java .
Cloning into '.'...
fatal: unable to access 'https://github.com/Microsoft/vscode-remote-try-java/': Could not resolve host: github.com
[11350 ms] Start: Run: docker rm -f 5fd79fb121d13e6977065c9cb391ae6628e34d1eefb331419c7a5dc79d83db6e
[11636 ms] Container server terminated (code: 137, signal: null).
WELL1NGTON commented 5 months ago

Same issue.

Arch Linux DevContainer: v0.342.0 (also tried downgrading to 0.338.1 and 0.327.0, but had same problem) Version: 1.87.0-insider Commit: ec291c126878742ad640055ce604a58129cd088c Date: 2024-02-05T05:46:48.601Z Electron: 27.2.3 ElectronBuildId: 26495564 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Linux x64 6.7.4-arch1-1

[2024-02-11T19:48:34.681Z] Dev Containers 0.342.0 in VS Code 1.87.0-insider (ec291c126878742ad640055ce604a58129cd088c).
[2024-02-11T19:48:34.681Z]  -- CREATEDEVCONTAINER v2
[2024-02-11T19:48:35.201Z] No container features retrieved from index.
[2024-02-11T19:48:38.218Z]  -- CREATEDEVCONTAINER v2
[2024-02-11T19:48:38.434Z] No container features retrieved from index.
[2024-02-11T19:48:42.392Z] Start: Run: docker version --format {{json .}}
[2024-02-11T19:48:42.420Z] {"Client":{"Version":"25.0.2","ApiVersion":"1.44","DefaultAPIVersion":"1.44","GitCommit":"29cf629222","GoVersion":"go1.21.6","Os":"linux","Arch":"amd64","BuildTime":"Thu Feb  1 10:50:44 2024","Context":"default"},"Server":{"Platform":{"Name":""},"Components":[{"Name":"Engine","Version":"25.0.2","Details":{"ApiVersion":"1.44","Arch":"amd64","BuildTime":"Thu Feb  1 10:50:44 2024","Experimental":"false","GitCommit":"fce6e0ca9b","GoVersion":"go1.21.6","KernelVersion":"6.7.4-arch1-1","MinAPIVersion":"1.24","Os":"linux"}},{"Name":"containerd","Version":"v1.7.13","Details":{"GitCommit":"7c3aca7a610df76212171d200ca3811ff6096eb8.m"}},{"Name":"runc","Version":"1.1.12","Details":{"GitCommit":""}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"Version":"25.0.2","ApiVersion":"1.44","MinAPIVersion":"1.24","GitCommit":"fce6e0ca9b","GoVersion":"go1.21.6","Os":"linux","Arch":"amd64","KernelVersion":"6.7.4-arch1-1","BuildTime":"2024-02-01T10:50:44.000000000+00:00"}}
[2024-02-11T19:48:42.422Z] Stop (30 ms): Run: docker version --format {{json .}}
[2024-02-11T19:48:42.679Z] No container features retrieved from index.
[2024-02-11T19:49:24.222Z]  -- CREATEDEVCONTAINER v2
[2024-02-11T19:49:24.617Z] No container features retrieved from index.
[2024-02-11T19:49:25.572Z] Failed to find configuration.  Cannot configure container features.
grant-wilson commented 5 months ago

It's unclear where the source code for the extension is now located (if you know please share). I'm not a maintainer of this repo, but my best guess is that the root cause is that the extension hits https://[containers.dev/static/devcontainer-index.json](https://containers.dev/static/devcontainer-index.json), and will quit if the first item under collections has a zero length feature array. Currently it does, hence the error.

VEERT00X commented 5 months ago

I also have the same issue :(


when I use the command, a notification shows but besides that nothing happens. But the extension has no issues building a devcontainer in a folder which already has a devcontainer.json

grant-wilson commented 5 months ago

If you look at the previous and current versions of "https://[containers.dev/static/devcontainer-index.json](https://containers.dev/static/devcontainer-index.json)" you can see that the first item was just recently removed. The removed item is "Reference Implementation Features", the new first item is "Reference Implementation Templates" which has no features, only templates.

So it seems various functionality of the vscode extension requires this special item as the first in the collection. That item was removed and stuff broke.

mcshaman commented 5 months ago

Same here

OS: macOs Sonoma 14.3 Dev Container: v0.338.1 VS Code Version: 1.86.1 (Universal) Commit: 31c37ee8f63491495ac49e43b8544550fbae4533 Date: 2024-02-07T09:09:01.236Z (4 days ago) Electron: 27.2.3 ElectronBuildId: 26495564 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin arm64 23.3.0

odie5533 commented 5 months ago

Is there a temporary workaround?

benjaminwood commented 5 months ago

Same issue here attempting to create a new dev container (over Remote - SSH in this case.)

[2024-02-12T00:34:13.949Z] Dev Containers 0.327.0 over Remote - SSH 0.108.0 in VS Code 1.86.0 (05047486b6df5eb8d44b2ecd70ea3bdf775fd937).
[2024-02-12T00:34:13.949Z]  -- CREATEDEVCONTAINER v2
[2024-02-12T00:34:14.195Z] No container features retrieved from index.
caioverissimo commented 5 months ago

Same:

[11821 ms] Dev Containers 0.338.1 in VS Code 1.86.1 (31c37ee8f63491495ac49e43b8544550fbae4533).
[11820 ms] Start: Run: docker version --format {{json .}}
[11880 ms] {"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"20.10.19","ApiVersion":"1.41","DefaultAPIVersion":"1.41","GitCommit":"d85ef84533","GoVersion":"go1.19.2","Os":"darwin","Arch":"arm64","BuildTime":"Thu Oct 13 13:56:52 2022","Context":"desktop-linux","Experimental":true},"Server":{"Platform":{"Name":"Docker Desktop 4.22.0 (117440)"},"Components":[{"Name":"Engine","Version":"24.0.5","Details":{"ApiVersion":"1.43","Arch":"arm64","BuildTime":"Fri Jul 21 20:35:38 2023","Experimental":"false","GitCommit":"a61e2b4","GoVersion":"go1.20.6","KernelVersion":"5.15.49-linuxkit-pr","MinAPIVersion":"1.12","Os":"linux"}},{"Name":"containerd","Version":"1.6.21","Details":{"GitCommit":"3dce8eb055cbb6872793272b4f20ed16117344f8"}},{"Name":"runc","Version":"1.1.7","Details":{"GitCommit":"v1.1.7-0-g860f061"}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"Version":"24.0.5","ApiVersion":"1.43","MinAPIVersion":"1.12","GitCommit":"a61e2b4","GoVersion":"go1.20.6","Os":"linux","Arch":"arm64","KernelVersion":"5.15.49-linuxkit-pr","BuildTime":"2023-07-21T20:35:38.000000000+00:00"}}
[14989 ms] No container features retrieved from index.
[138143 ms]  -- CREATEDEVCONTAINER v2
[138212 ms] No container features retrieved from index.
[317735 ms]  -- CREATEDEVCONTAINER v2
[317927 ms] No container features retrieved from index.
[336299 ms]  -- CREATEDEVCONTAINER v2
[336362 ms] No container features retrieved from index.
[341570 ms] Start: Run: docker version --format {{json .}}
[341624 ms] {"Client":{"Platform":{"Name":"Docker Engine - Community"},"Version":"20.10.19","ApiVersion":"1.41","DefaultAPIVersion":"1.41","GitCommit":"d85ef84533","GoVersion":"go1.19.2","Os":"darwin","Arch":"arm64","BuildTime":"Thu Oct 13 13:56:52 2022","Context":"desktop-linux","Experimental":true},"Server":{"Platform":{"Name":"Docker Desktop 4.22.0 (117440)"},"Components":[{"Name":"Engine","Version":"24.0.5","Details":{"ApiVersion":"1.43","Arch":"arm64","BuildTime":"Fri Jul 21 20:35:38 2023","Experimental":"false","GitCommit":"a61e2b4","GoVersion":"go1.20.6","KernelVersion":"5.15.49-linuxkit-pr","MinAPIVersion":"1.12","Os":"linux"}},{"Name":"containerd","Version":"1.6.21","Details":{"GitCommit":"3dce8eb055cbb6872793272b4f20ed16117344f8"}},{"Name":"runc","Version":"1.1.7","Details":{"GitCommit":"v1.1.7-0-g860f061"}},{"Name":"docker-init","Version":"0.19.0","Details":{"GitCommit":"de40ad0"}}],"Version":"24.0.5","ApiVersion":"1.43","MinAPIVersion":"1.12","GitCommit":"a61e2b4","GoVersion":"go1.20.6","Os":"linux","Arch":"arm64","KernelVersion":"5.15.49-linuxkit-pr","BuildTime":"2023-07-21T20:35:38.000000000+00:00"}}
[341624 ms] 
[344299 ms] No container features retrieved from index.
devji-dwayo commented 5 months ago

Confirmed on

MacOS Ventura 13.5.2 Code: Version: 1.86.1 (Universal) Commit: 31c37ee8f63491495ac49e43b8544550fbae4533 Dev Containers: 0.338.1

barockok commented 5 months ago

Confirmed on MacOS Ventura 13.3 Code :

Version: 1.86.1
Commit: 31c37ee8f63491495ac49e43b8544550fbae4533
Date: 2024-02-07T09:08:57.920Z (4 days ago)
Electron: 27.2.3
ElectronBuildId: 26495564
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 22.4.0

Dev Container : v0.338.1

https://github.com/microsoft/vscode-remote-release/assets/474500/05651461-a44a-4b48-b9e7-5c228e4a3065

exavolt commented 5 months ago

I am pretty sure that #9537 is also caused by the same issue.

benjaminwood commented 5 months ago

Creating a new dev container is working for me again. Anyone else? Maybe just reply with a 👍🏻

grant-wilson commented 5 months ago

Yep, and the index has changed to now include the "Reference Implementation Features" entry again.

chrmarti commented 5 months ago

Apologies for the disruption. I'm fixing the check in the Dev Containers extension that bailed out and we will make the building of the index more robust.

grant-wilson commented 5 months ago

Apologies for the disruption. I'm fixing the check in the Dev Containers extension that bailed out and we will make the building of the index more robust.

Thank you.

Out of curiosity, is the Dev Containers extension closed source? Is the building of the index closed source?

chrmarti commented 5 months ago

@grant-wilson The Dev Containers extension for VS Code and the index building are indeed not OSS. (See https://code.visualstudio.com/docs/remote/faq#_license-and-privacy for more details on the extension.)

The Dev Containers CLI is OSS (https://github.com/devcontainers/cli) and the Dev Container specification it implements is discussed and developed in the open (Creative Common license, https://github.com/devcontainers/spec). (See also the Dev Containers website at https://containers.dev.)

grant-wilson commented 5 months ago

@chrmarti perfect, thank you.