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

"Open folder in container" fails #6029

Closed
chrmarti opened this issue Dec 10, 2021 · 9 comments
Closed

"Open folder in container" fails #6029

chrmarti opened this issue Dec 10, 2021 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers *duplicate Issue identified as a duplicate of another issue(s)

Comments

@chrmarti
Copy link
Contributor

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.

Originally posted by @maciek16180 in #6023 (comment)

@chrmarti
Copy link
Contributor Author

This might be a different problem than #6023. Tracking here.

@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 January 2022 milestone Dec 10, 2021
@daMichaelB
Copy link

same here. I added log_level = trace in the settings.

Here are the logs (hope it is helpful):

[823 ms] Stop (89 ms): Run in Host: /bin/bash -lic '/home/ec2-user/.vscode-remote-containers/bin/7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e/node' -p '"89b28e98cccec2c7ef0e50d2caee6e39" + JSON.stringify(process.env) + "89b28e98cccec2c7ef0e50d2caee6e39"'
[824 ms] Error: spawn /bin/bash 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)
[824 ms] Host server: (node:7666) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
[847 ms] Setting up container for folder or workspace: /Users/XXXXXX/...../XXXXXX/
[848 ms] Host: ssh://[email protected]
[849 ms] Start: Check Docker is running
[850 ms] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[876 ms] Host server: (node:7666) 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:7666) 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)
[901 ms] Stop (51 ms): Run in Host: docker version --format {{.Server.APIVersion}}
[904 ms] spawn docker ENOENT
[904 ms] Stop (55 ms): Check Docker is running
[909 ms] Docker returned an error code ENOENT, message: spawn docker ENOENT
[910 ms] Host server: (node:7666) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)

@chrmarti
Copy link
Contributor Author

@daMichaelB Does the EC2 VM have /bin/bash?

@cawhitworth
Copy link

I'm seeing almost the exact same thing, running VS Code on Windows 11, connecting to an Ubuntu 20.04 host running Docker. It started happening maybe an hour ago, after I restarted VS Code and it updated to 1.63. It was working immediately prior (this is my primary dev environment):

[739 ms] userEnvProbe: loginInteractiveShell (default)
[739 ms] userEnvProbe shell: /bin/bash
[785 ms] Host server: (node:353381) UnhandledPromiseRejectionWarning: Error: spawn /bin/bash 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)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:353381) 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:353381) [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.
[790 ms] Error: spawn /bin/bash 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)
[790 ms] Host server: (node:353381) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
[797 ms] Setting up container for folder or workspace: c:\workspace
[797 ms] Host: ssh://[email protected]
[798 ms] Start: Check Docker is running
[798 ms] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[804 ms] Host server: (node:353381) 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:353381) 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)
[810 ms] Host server: (node:353381) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 2)
[813 ms] spawn docker ENOENT
[817 ms] Docker returned an error code ENOENT, message: spawn docker ENOENT

@chrmarti
Copy link
Contributor Author

Does everyone seeing this have the "docker.host" setting or the DOCKER_HOST env variable set to a ssh://... URI and uses a local folder with a devcontainer.json? (This looks like #6026.)

@chrmarti
Copy link
Contributor Author

Should be fixed in Remote-Containers 0.209.5. Let me know if you still see this issue there. Thanks.

FYI: Instead of having your devcontainer.json locally, you can now also have it on your SSH server. To try that use the Remote-SSH extension to connect to the SSH server, open your workspace folder on the SSH server and then use the Reopen in Container command (F1 > Remote-Containers: Reopen in Container) to connect to the dev container. (Assuming you have your devcontainer.json in the workspace folder on the SSH server, otherwise you first need to copy it there.)

@chrmarti chrmarti removed this from the January 2022 milestone Dec 10, 2021
@chrmarti chrmarti added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 10, 2021
@maciek16180
Copy link

It works for me now, thanks!

@daMichaelB
Copy link

Hey @chrmarti . With 0.209.5 it works like a charm! THANK YOU a lot from my side for the quick fix.

@cawhitworth
Copy link

Working again here - thanks for the fast turnaround on the fix

@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 *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants