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

devcontainer cli do not open vscode window #7189

Closed
marc-spinozza opened this issue Sep 14, 2022 · 6 comments
Closed

devcontainer cli do not open vscode window #7189

marc-spinozza opened this issue Sep 14, 2022 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded

Comments

@marc-spinozza
Copy link

  • VSCode Version: 1.71.1
  • Local OS Version: 21H2
  • Remote OS Version: Ubuntu 22.04 (WSL2) - Docker installed in ubuntu (not using docker desktop)
  • Remote Extension/Connection Type: Containers

Steps to Reproduce:

  1. Start dockerd in ubuntu
  2. cd to project folder
  3. devcontainer open .

imagen

VS code windows in never opened

If I try devcontainer --help the execution do not finalise (it never returns to the prompt) I have to Ctrl+C to get the prompt back

If I do a code . in the folder then a vscode notification appears to reopen the folder in the container. This works fine as expected.

I have uninstall vscode and extensions and do a clean install but i still get the same problem.

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Sep 14, 2022
@chrmarti
Copy link
Contributor

process.argv0 in the extension host process changed to /proc/self/exe on Linux. Not sure when this changed and don't see it discussed elsewhere. @deepak1556 Do you know?

@chrmarti chrmarti self-assigned this Sep 19, 2022
@chrmarti chrmarti added the bug Issue identified by VS Code Team member as probable bug label Sep 19, 2022
@chrmarti chrmarti added this to the September 2022 milestone Sep 19, 2022
@deepak1556
Copy link

deepak1556 commented Sep 19, 2022

@chrmarti in Insiders we use the new process API from Electron to launch extension host which is backed by setting "extensions.experimental.useUtilityProcess" and this API ensures that the process is forked by chromium instead of VSCode forking it with Node.js child_process.fork API. Chromium on linux uses /proc/self/exe to be execcd in the forked process and thats what ends up in the process.argv0. You should instead rely on process.execPath to get the resolved path https://nodejs.org/dist/latest-v16.x/docs/api/process.html#processexecpath, also this will yield consistent results for both extensions.experimental.useUtilityProcess enabled and disabled.

@roblourens
Copy link
Member

Did the cli API change? Or am I looking at the wrong CLI? I installed with npm, and there is no "open" command. So I installed through the extension and that seems to be totally broken.

image

@roblourens roblourens added the verification-steps-needed Steps to verify are needed for verification label Sep 30, 2022
@mjbvz
Copy link

mjbvz commented Oct 4, 2022

@chrmarti Can you please provides steps to verify this issue

@rzhao271
Copy link

rzhao271 commented Oct 5, 2022

Reopening issue and setting it to the next milestone.
Even with @vscode/dev-container-cli, I don't get the open command anymore.
Instead, I get the following output:

devcontainer open .
Unknown arguments: open, .
devcontainer <command>

Commands:
  devcontainer build [path]  Build a dev container image

Options:
  -h, --help               Show help                                                                           [boolean]
      --disable-telemetry  Disable telemetry                                                  [boolean] [default: false]

@rzhao271 rzhao271 reopened this Oct 5, 2022
@rzhao271 rzhao271 added verification-found Issue verification failed and removed verification-steps-needed Steps to verify are needed for verification labels Oct 5, 2022
@chrmarti
Copy link
Contributor

chrmarti commented Oct 6, 2022

The fix was to remove open from the help text when installed from npm as @vscode/dev-container-cli. Closing again for verification and will open a new issue for what @roblourens reports. Thanks!

To verify: Install @vscode/dev-container-cli using npm and verify that the help text does not show open as an available command.

@chrmarti chrmarti closed this as completed Oct 6, 2022
@rzhao271 rzhao271 added verified Verification succeeded and removed verification-found Issue verification failed labels Oct 6, 2022
@rzhao271 rzhao271 modified the milestones: October 2022, September 2022 Oct 6, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 20, 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 verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants