Cannot Attach Visual Studio Code: Error running command remote-containers.attachToRunningContainerFromViewlet
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, vscode
- Domain
- developer-experience, devops
Research direction
Start by reproducing the failure when attaching to a running container through the remote-SSH and Dev Containers combination, then review the Extension Host and Remote-SSH logs around the aborted command, socket timeout, and forwarding connections. Done means the same remote-SSH plus Dev Containers workflow can attach Visual Studio Code successfully without the reported errors.
Written by the indexing model from the issue text.
Description
VSCode version: 1.83.0
Local OS: macOS 13.5.1 (22G90)
Remote OS: Cent OS 7
Remote Docker version: Docker version 24.0.2, build cb74dfc
Previously, the remote-ssh and devcontainer works fine. I could attach vs-code through docker plugin successfully. However, right now when I try to "Attach Visual Studio Code", I will get the following error:
Error running command remote-containers.attachToRunningContainerFromViewlet: The operation was aborted. This is likely caused by the extension that contributes remote-containers.attachToRunningContainerFromViewlet.
I check the output logs and will see following messages in Extension Host
2023-10-05 17:22:03.792 [info] ExtensionService#_doActivateExtension ms-vscode-remote.remote-containers, startup: false, activationEvent: 'onStartupFinished'
2023-10-05 17:22:41.908 [error] Error: The operation was aborted
at Socket.<anonymous> (/Users/xuwenhao/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.4/out/extension.js:2:137555)
at Object.onceWrapper (node:events:628:26)
at Socket.emit (node:events:525:35)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) remote-containers.attachToRunningContainerFromViewlet {"value":"ms-vscode-remote.remote-containers","_lower":"ms-vscode-remote.remote-containers"}
2023-10-05 17:22:42.911 [error] TypeError: Cannot use 'in' operator to search for 'result' in 72
at /Users/xuwenhao/.vscode/extensions/ms-vscode-remote.remote-ssh-0.106.4/out/extension.js:2:137281
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-10-05 17:22:45.222 [info] [resolveAuthority(ssh-remote,2)][0ms] activating remote resolvers ssh-remote+124.220.41.13
And following logs in Remote -SSH
[17:22:45.842] Remote server is listening on port 33109
[17:22:45.842] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":33109},"osReleaseId":"tencentos","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"","display":"","tmpDir":"/run/user/1000","platform":"linux","connectionToken":"1aa11a11-a111-11aa-11aa-111111aaa1a1"},"installUnpackCode":""}
[17:22:45.843] Persisting server connection details to /Users/xuwenhao/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-5fa0150d-e7e037083ff4455cf320e344325dacb480062c3c-0.106.4/data.json
[17:22:45.844] Starting forwarding server. local port 53505 -> socksPort 53367 -> remotePort 33109
[17:22:45.844] Forwarding server listening on port 53505
[17:22:45.844] Waiting for ssh tunnel to be ready
[17:22:45.845] [Forwarding server port 53505] Got connection 0
[17:22:45.845] Tunneled port 33109 to local port 53505
[17:22:45.845] Resolved "ssh-remote+124.220.41.13" to "port 53505"
[17:22:45.849] ------
[17:22:45.871] [Forwarding server port 53505] Got connection 1
[17:22:48.785] > local-server-2> Timed out
[17:22:48.789] Local server exit: 0
[17:23:20.281] [Forwarding server port 53505] Got connection 2
I could still remote-ssh the host server successfully, and can also "Attach Shell" successfully.
And I could also using ssh tunnel to connect to the docker image.
The only thing didn't work is the combination of remote-ssh + devcontainer.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 470
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode-remote-release
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/vscode-remote-release#11650 ·
-
ssh
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/vscode-remote-release#11583 ·
-
ssh
Difficulty 4/5 3-5 days Newbie friendliness 38/100
microsoft/vscode-remote-release#11861 ·
-
microsoft/vscode-remote-release#11860 · 1 comment · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
microsoft/vscode-remote-release#11859 ·
All issues in microsoft/vscode-remote-release
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
bancolombia/sentinel#20 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
alunduil/woodland-generators#669 ·
-
area: tooling
Difficulty 2/5 1-3 hours Newbie friendliness 86/100