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

Error opening vscode connecting to Docker container via linux terminal #10446

Open
juliermeSilva opened this issue Nov 5, 2024 · 0 comments
Open
Assignees
Labels
containers Issue in vscode-remote containers

Comments

@juliermeSilva
Copy link

Problem description:
I am trying to start, from an Ubuntu terminal, a VScode connected to a Docker container called test6. Whenever I run the command
code --folder-uri "vscode-remote://attached-container+test6/app/jsa"
the error described in FIGURE 1 attached is displayed when opening VScode.
If I try to access the test6 container through the VScode graphical interface (with the Docker and Dev Containers extensions) using Attach Visual Studio Code, the connection occurs correctly. The failure only exists when I try to access the VScode connected to the test6 container through the Ubuntu terminal.
FIGURE 2 shows the extensions that I currently have installed in VScode.

The question:
What command can I use to correctly open a VScode connected to a Docker container via the UBUNTU terminal?

  • VSCode Version:
    1.95.1
    65edc4939843c90c34d61f4ce11704f09d3e5cb6
    x64
  • Local OS Version: Ubuntu 24.04
  • Remote OS Version: None
  • Remote Extension/Connection Type: Containers/WSL/Server: None
  • Logs:
    Log displayed in the VScode terminal opened after running the command <code --folder-uri "vscode-remote://attached-container+test6/app/jsa"> in the Ubuntu terminal:
    [36 ms] Dev Containers 0.388.0 in VS Code 1.95.1 (65edc4939843c90c34d61f4ce11704f09d3e5cb6).
    [36 ms] Start: Resolving Remote
    [45 ms] TypeError: Cannot read properties of undefined (reading 'parentAuthority')
    at /home/jsa/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/extension/extension.js:372:2432
    at pB.d (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:32201)
    at pB.withProgress (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:155:32067)
    at Object.withProgress (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:156:47584)
    at BEe (/home/jsa/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/extension/extension.js:372:2312)
    at aZ (/home/jsa/.vscode/extensions/ms-vscode-remote.remote-containers-0.388.0/dist/extension/extension.js:372:2111)

Steps to Reproduce:

  1. Vscode installed via apt command with .deb file.
  2. Install the following extensions in VScode: Docker v1.29.3 and Dev Containers v0.388.0
  3. jsa@dellg7:/$ docker start test6 test6
  4. jsa@dellg7:/$ docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    7956bae7845c nvcr.io/nvidia/pytorch:22.01-py3 "/opt/nvidia/nvidia_…" 47 hours ago Up 4 seconds 6006/tcp, 8888/tcp, 0.0.0.0:2222->22/tcp, [::]:2222->22/tcp test6
  5. code --folder-uri "vscode-remote://attached-container+test6/app/jsa"

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

FIGURE 1 - Error in vscode window.
Image

FIGURE 2 - The my extensions, in the moment:
Image

@vs-code-engineering vs-code-engineering bot added the containers Issue in vscode-remote containers label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Issue in vscode-remote containers
Projects
None yet
Development

No branches or pull requests

2 participants