Problem setting up dev environment on Ubuntu 22.04

Hi All - I have followed the guide to set up my development environment here:

Docker Desktop and VS Code are installed. I successfully forked the project into my own git.

But when I get to step 5 of the setup guide (dev container should be built), VS Code throws an error partway through the process and halts. It does create a Docker container, which I can see in Docker Desktop.

The error is as follows:

Command failed: node /root/.vscode-remote-containers/dist/dev-containers-cli-0.282.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-a4c11115-a190-4a4d-9cfd-ef9226eda68b1680010253921 --workspace-folder /workspaces/core --workspace-mount-consistency cached --id-label vsch.local.repository=https://github.com/jsmarion/core --id-label vsch.local.repository.volume=core-732065e45b6a7dca70d8c67f63648179 --id-label vsch.local.repository.folder=core --id-label devcontainer.config_file=/workspaces/core/.devcontainer/devcontainer.json --log-level debug --log-format json --config /workspaces/core/.devcontainer/devcontainer.json --override-config /tmp/devcontainer-9da41804-5639-4ae5-9bc7-ec8f9077670b.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=core-732065e45b6a7dca70d8c67f63648179,target=/workspaces,external=true --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default off --mount-workspace-git-root true

Can someone please give me some guidance on how to get past this? Thanks!

I think I found a solution. Maybe it will help someone.

I downgraded VS Code to version 1.69.2 and now it works. Oddly, that setup creates dev containers in the ‘default’ Docker context rather than the ‘desktop-linux’ context which is used by Docker Desktop, so I can’t see them in DD. So I am not sure why DD is even a requirement. Maybe it would use the DD context if I didn’t have Docker Compose installed? Anyway, that is not a huge hinderance, since I can manage the containers via the CLI.

There’s still the same issue on VsCode 1.79.2. Downgrading to 1.69.2 would be going a while back in the past, a clean fix would be better…

It seems that it works when downgrading only the devcontainer vscode extension to version v0.275.1, which is more acceptable to me.

Finally I noticed the error was occuring when I had the port 8123 already taken (by my production HA instance). So latest DevContainer and latest VsCode work for me.

Thanks for this. Haven’t got any updates for some reason, so just now seeing it…

1 Like

I can now get on with the old version. Thanks for the tip.

Conclusion: It’s a pity that it doesn’t work with the latest VSCode version.