devpod icon indicating copy to clipboard operation
devpod copied to clipboard

Can't connect to devpod using VS Code

Open duttaoindril opened this issue 2 years ago • 1 comments

What happened?

devpod can't connect to vs code

What did you expect to happen instead?

use vscode with devpod

How can we reproduce the bug? (as minimally and precisely as possible)

I just created the python container and got the error after it launched VS Code

Local Environment:

  • DevPod Version: v0.1.10
  • Operating System: mac
  • ARCH of the OS: ARM64

DevPod Provider:

  • Local/remote provider: docker

Anything else we need to know? image

duttaoindril avatar Jul 02 '23 00:07 duttaoindril

Hi @duttaoindril, thank you for opening the issue. Can you connect to the container when you run the workspace with plain SSH instead of VSCode? devpod up $YOUR_WORKSPACE --ide none

pascalbreuninger avatar Jul 03 '23 12:07 pascalbreuninger

Hi,

I have the same problem , and through --debug options it shows the command args to launch remote vscode --disable-extension ms-vscode-remote.remote-containers. Removing this args, will launch vscode perfectly. Source code open.go, line 79. https://github.com/loft-sh/devpod/blob/e0b2eb06cefae38f415671daf0757de7103ffa56/pkg/ide/vscode/open.go#L79

cakriwut avatar Aug 06 '23 12:08 cakriwut

Hey @cakriwut, that's quite curious because devpod connects to vscode using the remote-ssh extension. We disable remote-containers because it displays a popup prompting you to restart the workspace in another devcontainer because it can't detect it's already in one started by devpod.

Would you mind pasting the full debug log of the failed attempt here?

pascalbreuninger avatar Aug 07 '23 06:08 pascalbreuninger

Maybe we can check if remote-containers is actually installed and then disable it only if found

FabianKramm avatar Aug 07 '23 07:08 FabianKramm

I'm also encountering this. I noticed that if I run the command spat out by using --debug then it launches. For example, the debug logs say:

Run vscode command code --folder-uri vscode-remote://ssh-remote+vscode-remote-try-rust.devpod//workspaces/vscode-remote-try-rust --disable-extension ms-vscode-remote.remote-containers --new-window

That never finishes, but if I run: code --disable-extension ms-vscode-remote.remote-containers --new-window --folder-uri vscode-remote://ssh-remote+vscode-remote-try-rust.devpod//workspaces/vscode-remote-try-rust

then a new VS Code window opens.

b-robey avatar Sep 12 '23 01:09 b-robey

Hi @b-robey , We already have a fix for this and it would be available in the next release which is coming very soon. BTW, just for reference may I know what OS you are using.

neogopher avatar Sep 12 '23 06:09 neogopher

@neogopher, sure, I'm on Windows 10.

b-robey avatar Sep 12 '23 07:09 b-robey

Should be fixed together with #681

pascalbreuninger avatar Sep 29 '23 05:09 pascalbreuninger