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

Can't attach VS-Code to existing Docker Container via Remote-SSH #6023

Closed
afaul opened this issue Dec 9, 2021 · 25 comments
Closed

Can't attach VS-Code to existing Docker Container via Remote-SSH #6023

afaul opened this issue Dec 9, 2021 · 25 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers

Comments

@afaul
Copy link

afaul commented Dec 9, 2021

Maybe related to issue: #6021

After a upgrade this morning to VSCode Version 1.63.0 I no longer can "Attach Visual Studio Code" to an running docker container via the remote-SSH extension. I get the same behavior with the 1.64.0-insider build of today.

  • VSCode Version: 1.63.0 & 1.64.0-insider
  • Local OS Version: Windows 10
  • Remote OS Version: ArchLinux
  • Remote Extension/Connection Type: SSH + Docker
  • Logs: see below

Steps to Reproduce:

  1. Open a Folder on Remote System with the remote-SSH extension (ms-vscode-remote.remote-ssh v0.68.0 ).
  2. Open the Docker Extension (ms-azuretools.vscode-docker v1.18.0) and select the Option "Attach Visual Studio Code" in the context menu of a running docker container.
  3. A new window opens and shortly after this Error-Message is displayed:

2021-12-09_10-20-12_Error_message_01

Even the docker-container is still running.

In the Terminal of the new Window I get following Messges:
17066) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) [525 ms] Host server: (node:2117066) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [534 ms] Host server: (node:2117066) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1) [534 ms] Error: spawn /usr/bin/zsh ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19) at onErrorNT (internal/child_process.js:465:16) at processTicksAndRejections (internal/process/task_queues.js:80:21) [543 ms] Start: Run in Host: docker inspect --type container /visalf_ml-exporter-backend_1 [557 ms] Host server: (node:2117066) UnhandledPromiseRejectionWarning: Error: spawn docker ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19) at onErrorNT (internal/child_process.js:465:16) at processTicksAndRejections (internal/process/task_queues.js:80:21) [557 ms] Host server: (node:2117066) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) [566 ms] Host server: (node:2117066) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
2021-12-09_10-31-40_error_message_02

The Console of the "Developer Tools" show this errors:
log.ts:301 INFO Invoking resolveAuthority(attached-container) log.ts:313 ERR [Extension Host] (node:16868) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (Use Code - Insiders --trace-deprecation ...to show where the warning was created) console.ts:137 [Extension Host] (node:16868) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.(UseCode - Insiders --trace-deprecation ... to show where the warning was created) (at writeOut (internal/process/warning.js:43:3)) D @ console.ts:137 log.ts:313 ERR resolveAuthority(attached-container) returned an error after 6238 ms Error at ts.resolveAuthority (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1557) at processTicksAndRejections (internal/process/task_queues.js:93) at async Yl._scanAndHandleExtensions (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2985) at async Yl._initialize (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2982) extensionService.ts:384 Error at ts.resolveAuthority (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1557) at processTicksAndRejections (internal/process/task_queues.js:93) at async Yl._scanAndHandleExtensions (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2985) at async Yl._initialize (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2982) extensionService.ts:386 Error handled: Not showing a notification for the error log.ts:313 ERR Error received from starting extension host (kind: Remote) log.ts:313 ERR Error at ts.resolveAuthority (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1557) at processTicksAndRejections (internal/process/task_queues.js:93) at async Yl._scanAndHandleExtensions (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2985) at async Yl._initialize (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2982) log.ts:313 ERR [remote-connection] An error occurred in the very first connect attempt, it will be treated as a permanent error! Error: log.ts:313 ERR Error at ts.resolveAuthority (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1557) at processTicksAndRejections (internal/process/task_queues.js:93) at async Yl._scanAndHandleExtensions (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2985) at async Yl._initialize (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2982) log.ts:313 ERR Cannot register remote filesystem provider. Error while fetching remote environment. Error 2log.ts:313 ERR Error at ts.resolveAuthority (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1557) at processTicksAndRejections (internal/process/task_queues.js:93) at async Yl._scanAndHandleExtensions (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2985) at async Yl._initialize (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2982) 2log.ts:313 ERR An unknown error occurred. Please consult the log for more details.: Error at ts.resolveAuthority (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1557:9234) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Yl._scanAndHandleExtensions (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2985:7628) at async Yl._initialize (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2982:30008) log.ts:313 ERR An unknown error occurred. Please consult the log for more details.: Error at ts.resolveAuthority (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:1557:9234) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Yl._scanAndHandleExtensions (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2985:7628) at async Yl._initialize (vscode-file://vscode-app/c:/Program%20Files/Microsoft%20VS%20Code%20Insiders/resources/app/out/vs/workbench/workbench.desktop.main.js:2982:30008)
2021-12-09_10-33-22_error_message_03

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

@fehrlich
Copy link

fehrlich commented Dec 9, 2021

I have the same issue since the update:
This is the whole output for Dev container:

 was created)
[1307 ms] Host server: (node:2673181) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2673181) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[1342 ms] Host server: (node:2673181) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
[1343 ms] Error: spawn /bin/sh ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
[1378 ms] Start: Run in Host: docker inspect --type container /tsm_apptorch_run_74118ff9d231
[1402 ms] Host server: (node:2673181) UnhandledPromiseRejectionWarning: Error: spawn docker ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:2673181) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
[1425 ms] Host server: (node:2673181) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)

and following message is shown:
grafik

Maybe worth mentioning: If I click more actions and choose containers it only shows my local containers and not the remote containers anymore.

You can get it to work again by downgrading and reintalling the ssh remote and docker remote extension.

@jblanz
Copy link

jblanz commented Dec 9, 2021

I ran into exactly the same problem as described by @afaul above. Using vscode version 1.63.0 on Mac OS X (10.14.6) and running development containers on a vmware VM with ubuntu server 20.04 LTS.

If I manually stopped and removed the vscode server on the VM, it would be downloaded again next time I try to open a workspace on a development container and the vscode server (version 209.3) would start but then also result in the same errors (promise rejection when trying to spawn a bash instance or docker command).

After rolling back to 1.62.3 everything seems to work fine again.

@mapineda48
Copy link

Same problem here with Debian 10, roll back to version 1.62.3 and fine again.

@quentingllmt
Copy link

Hi, same problem here while everything was working until today. (Using a remote devcontainer with SSH host specified by docker.host property in settings.json)

@IridiumWasTaken
Copy link

Hello, exactly the same problem here.

@russellbrooks
Copy link

Same here

@mattschlosser
Copy link

mattschlosser commented Dec 9, 2021

same problem

downgrading vs code 1.62.3 resolves the issue

@ganli
Copy link

ganli commented Dec 10, 2021

Same after upgrade to 1.63.0

@PubCyBerry
Copy link

same at 1.63.0.
Downgrading to 1.62.3 solved this issue.

@maciek16180
Copy link

maciek16180 commented Dec 10, 2021

I have similar problem on 1.63. When I choose "Open folder in container" and select local folder with devcontainer config, it fails with this error:
image

The same config works on 1.62.3. I'm on Kubuntu 20.04.

@terrycmchan
Copy link

Same after upgrade to 1.63.0

@mifarse
Copy link

mifarse commented Dec 10, 2021

Exactly the same. Local OS: Windows 11, Remote OS: Ubuntu. VS Code: 1.63.0.

@0xB0000xDEAD
Copy link

Same here on Debian 11

Version: 1.63.0
Commit: 7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e
Date: 2021-12-07T05:16:45.441Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.10.0-8-amd64

@chrmarti chrmarti self-assigned this Dec 10, 2021
@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers labels Dec 10, 2021
@chrmarti chrmarti added this to the November 2021 Recovery milestone Dec 10, 2021
@chrmarti
Copy link
Contributor

Fixed in Remote-Containers 0.209.4. Let me know if you still see this or similar issues. Thanks.

@maciek16180
Copy link

maciek16180 commented Dec 10, 2021

@chrmarti My problem still exists on 0.209.4: #6023 (comment)
I have 1.63 installed from snap alongside 1.62.3 from apt. I launched 1.63, reinstalled Remote-Containers (now it's at 0.209.4) and the problem persists.

@afaul
Copy link
Author

afaul commented Dec 10, 2021

@chrmarti
For me it works.

Tested with:
Version: 1.63.0 (system setup)
Commit: 7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e
Date: 2021-12-07T06:26:56.179Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042

and
Version: 1.64.0-insider (system setup)
Commit: 065b450db9f555f177161748e8f2911ebb5677f9
Date: 2021-12-10T05:14:44.789Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19042

@daMichaelB
Copy link

Fixed in Remote-Containers 0.209.4. Let me know if you still see this or similar issues. Thanks.

for me it worked until this update came out (roughly 2 hours ago). Downgrading/Updating the Extensions does not resolve it...

image

@chrmarti
Copy link
Contributor

@daMichaelB Could you set the log level to 'trace' in the user settings and append the full log with the above error? Use the latest Remote-Containers version 0.209.4 for doing this.
image

@maciek16180 I'm tracking yours as #6029. It seems to be a different issue.

@chrmarti chrmarti reopened this Dec 10, 2021
@maciek16180
Copy link

Thanks @chrmarti

@LiNuXaDDiKt
Copy link

Just want to confirm I'm also experiencing this issue after upgrade to 1.63.00

@terroirman
Copy link

If it helps, I have the same error as ferhlich here when using rebuild and reopen in container.

@mattschlosser
Copy link

0.209.4 on VS Code 1.63.0 fixed the issue for me. Thanks!

@chrmarti
Copy link
Contributor

@LiNuXaDDiKt @terroirman Please check you are using Remote-Containers 0.209.4.

@terroirman
Copy link

@LiNuXaDDiKt @terroirman Please check you are using Remote-Containers 0.209.4.

After looking further, I'm actually experiencing this issue : #6026

@chrmarti
Copy link
Contributor

@terroirman Thanks, closing this issue again. #6026 should be fixed with Remote-Containers 0.209.5.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers
Projects
None yet
Development

No branches or pull requests