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

Finding installed ssh failed: spawn ENOTDIR #4630

Closed
initial-wu opened this issue Mar 5, 2021 · 23 comments
Closed

Finding installed ssh failed: spawn ENOTDIR #4630

initial-wu opened this issue Mar 5, 2021 · 23 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release mac Issue on mac verified Verification succeeded

Comments

@initial-wu
Copy link

  • VS Code Version: 1.54.1
  • OS Version: macOS Big Sur

Steps to Reproduce:

  1. update VS Code to 1.54.1
  2. connect to the ssh remote server
[12:19:55.078] Log Level: 2
[12:19:55.079] remote-ssh@0.65.0
[12:19:55.079] darwin x64
[12:19:55.080] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a22646576436c6f7564227d", attempt 1
[12:19:55.080] "remote.SSH.useLocalServer": true
[12:19:55.080] "remote.SSH.sshPath": undefined
[12:19:55.080] "remote.SSH.sshConfigurationFile": undefined
[12:19:55.080] "remote.SSH.useFlock": true
[12:19:55.080] "remote.SSH.lockfilesInTmp": false
[12:19:55.081] "remote.SSH.localServerDownload": auto
[12:19:55.081] "remote.SSH.remoteServerListenOnSocket": false
[12:19:55.081] "remote.SSH.showLoginTerminal": false
[12:19:55.081] "remote.SSH.defaultExtensions": []
[12:19:55.081] SSH Resolver called for host: devCloud
[12:19:55.081] Setting up SSH remote "devCloud"
[12:19:55.083] Acquiring local install lock: /var/folders/33/rdh80fdx5tx9dllx9pm_rgh80000gn/T/vscode-remote-ssh-devCloud-install.lock
[12:19:55.089] Looking for existing server data file at /Users/initialwu/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-devCloud-f30a9b73e8ffc278e71575118b6bf568f04587c8-0.65.0/data.json
[12:19:55.089] Using commit id "f30a9b73e8ffc278e71575118b6bf568f04587c8" and quality "stable" for server
[12:19:55.091] Install and start server if needed
[12:19:55.094] Checking ssh with "ssh -V" /
[12:19:55.096] Finding installed ssh failed: spawn ENOTDIR
[12:19:55.099] Resolver error: Error: spawn ENOTDIR
	at ChildProcess.spawn (internal/child_process.js:407:11)
	at Object.spawn (child_process.js:557:9)
	at /Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:141963
	at new Promise (<anonymous>)
	at k (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:141856)
	at I (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:141807)
	at /Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:145955
	at _ (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:146020)
	at C (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:141586)
	at Object.t.getSshCommandPath (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:144740)
	at Function.create (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:262422)
	at async Object.t.tryInstallWithLocalServer (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:387826)
	at async /Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:293745
	at async Object.t.withShowDetailsEvent (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:407000)
	at async /Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:387151
	at async S (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:383919)
	at async Object.t.resolveWithLocalServer (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:386778)
	at async Object.t.resolve (/Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:1:297757)
	at async /Users/initialwu/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.0/out/extension.js:127:110485
[12:19:55.101] ------

Does this issue occur when all extensions are disabled?: No

@initial-wu
Copy link
Author

I got the same error when i tried to uninstall the Remote Development extension pack

image

@omeraloni
Copy link

omeraloni commented Mar 5, 2021

Got the same issue as well, macOS Big Sur 11.2.2.

VSCode

  • Version: 1.54.1
  • Commit: f30a9b73e8ffc278e71575118b6bf568f04587c8
  • Date: 2021-03-04T22:42:18.719Z
  • Electron: 11.3.0
  • Chrome: 87.0.4280.141
  • Node.js: 12.18.3
  • V8: 8.7.220.31-electron.0
  • OS: Darwin x64 20.3.0

Seems also to be affecting remote containers.

@omeraloni
Copy link

Confirming that downgrade to 1.53.2 solved the issue for both SSH and containers.

@noce2
Copy link

noce2 commented Mar 5, 2021

I'm having the same spawn ENOTDIR error when I try to open Jupyter notebooks. My setup is:

Version: 1.54.1
Commit: f30a9b73e8ffc278e71575118b6bf568f04587c8
Date: 2021-03-04T22:42:18.719Z
Electron: 11.3.0
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: 8.7.220.31-electron.0
OS: Darwin x64 19.6.0

I thought the fix that came in microsoft/vscode#118124 might fix it but it hasn't.

@brunogoossens
Copy link

I Got the same issue. Same versions as above. Fixed it with downgrading

@tamuratak
Copy link

tamuratak commented Mar 8, 2021

I cannot reproduce this issue. However, this issue might occur when the PATH environment variable includes a file, not a directory. See microsoft/pylance-release/issues/1021. Other environment variables including a file, not a directory, might be the cause.

@leandroyalet
Copy link

leandroyalet commented Mar 8, 2021

ty @tamuratak, I cleaned up my PATH variable and now the error is gone

I cannot reproduce this issue. However, this issue might occur when the PATH environment variable includes a file, not a directory. See microsoft/pylance-release/issues/1021. Other environment variables including a file, not a directory, might be the cause.

@roblourens
Copy link
Member

Can you clarify what you changed in your PATH?

@roblourens
Copy link
Member

And, can someone clarify what the error is for Remote-Containers and share whatever screenshot or log might look useful?

@roblourens roblourens transferred this issue from microsoft/vscode Mar 8, 2021
@roblourens
Copy link
Member

Can anyone check whether setting "remote.SSH.useLocalServer": false makes any difference?

@elisakreiss
Copy link

Can anyone check whether setting "remote.SSH.useLocalServer": false makes any difference?

This doesn't make a difference for me. Still the same error.

@roblourens
Copy link
Member

roblourens commented Mar 8, 2021

And to clarify, this issue is only for getting this while trying to connect with Remote-SSH, and seeing the log in the original post. Getting this while opening a Jupyter notebook: make sure you've gotten the 1.54.1 update, and if so, open a new issue or check microsoft/vscode#118124.

If you think you are seeing the same SSH issue, also please include your log from the Remote-SSH output channel

@initial-wu this line in your log: [12:19:55.094] Checking ssh with "ssh -V" / I am not sure how that slash would show up. Is it possible that was an accidental keypress from you, or does that actually appear in the log?

@roblourens roblourens added the info-needed Issue requires more information from poster label Mar 8, 2021
@deepak1556 deepak1556 self-assigned this Mar 9, 2021
@deepak1556 deepak1556 added the mac Issue on mac label Mar 9, 2021
@deepak1556
Copy link

@initial-wu or anyone on facing this issue, can you print your PATH value.

@elisakreiss
Copy link

And to clarify, this issue is only for getting this while trying to connect with Remote-SSH, and seeing the log in the original post. Getting this while opening a Jupyter notebook: make sure you've gotten the 1.54.1 update, and if so, open a new issue or check microsoft/vscode#118124.

If you think you are seeing the same SSH issue, also please include your log from the Remote-SSH output channel

@initial-wu this line in your log: [12:19:55.094] Checking ssh with "ssh -V" / I am not sure how that slash would show up. Is it possible that was an accidental keypress from you, or does that actually appear in the log?

Is this helpful?

[16:52:26.116] remote-ssh@0.65.1
[16:52:26.116] darwin x64
[16:52:26.117] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a226e6f646531332d63636e636c75737465722e7374616e666f72642e656475222c2275736572223a22656b7265697373227d", attempt 1
[16:52:26.118] "remote.SSH.useLocalServer": false
[16:52:26.118] "remote.SSH.showLoginTerminal": false
[16:52:26.119] "remote.SSH.remotePlatform": {}
[16:52:26.119] "remote.SSH.sshPath": undefined
[16:52:26.119] "remote.SSH.sshConfigurationFile": undefined
[16:52:26.119] "remote.SSH.useFlock": true
[16:52:26.119] "remote.SSH.lockfilesInTmp": false
[16:52:26.119] "remote.SSH.localServerDownload": auto
[16:52:26.120] "remote.SSH.remoteServerListenOnSocket": false
[16:52:26.120] "remote.SSH.showLoginTerminal": false
[16:52:26.120] "remote.SSH.defaultExtensions": []
[16:52:26.120] SSH Resolver called for host: user@server.edu
[16:52:26.120] Setting up SSH remote "server.edu"
[16:52:26.195] Using commit id "f30a9b73e8ffc278e71575118b6bf568f04587c8" and quality "stable" for server
[16:52:26.216] Install and start server if needed
[16:52:28.807] Checking ssh with "ssh -V"
[16:52:28.810] Finding installed ssh failed: spawn ENOTDIR
[16:52:28.817] Resolver error: Error: spawn ENOTDIR
	at ChildProcess.spawn (internal/child_process.js:407:11)
	at Object.spawn (child_process.js:557:9)
	at /Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:141985
	at new Promise (<anonymous>)
	at k (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:141906)
	at I (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:141857)
	at /Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:145959
	at _ (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:146024)
	at C (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:141636)
	at R (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:141545)
	at Object.t.generateMultiLineCommand (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:143177)
	at z (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:297373)
	at /Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:294263
	at processTicksAndRejections (internal/process/task_queues.js:97:5)
	at async Object.t.withShowDetailsEvent (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:407055)
	at async Object.t.resolve (/Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:1:297912)
	at async /Users/user/.vscode/extensions/ms-vscode-remote.remote-ssh-0.65.1/out/extension.js:127:110485
[16:52:28.859] ------

@LittleMaer
Copy link

i meet the same issue

@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Mar 9, 2021
@roblourens
Copy link
Member

We are able to reproduce it - if your PATH variable includes a path to a file, then this will be triggered.

Looking into a fix, but in the meantime, check that your PATH includes only folders, not files.

@omeraloni
Copy link

omeraloni commented Mar 9, 2021

I don't have any files in my PATH, but my path looks like it got into some infinite loop.
This is how it looks in the integrated terminal:
image
As opposed to iTerm:
image

My shell is fish, but I got exactly the same behavior with zsh.
BTW, $PATH behaves the same in 1.53.2, but there I am able to connect to SSH/Docker.

@omeraloni
Copy link

omeraloni commented Mar 9, 2021

@roblourens this is the error I get when trying to attach to a container:
image
image

Obviously Docker daemon is running (connected to remote container in 1.53.2).
Docker API version is 1.40.

@omeraloni
Copy link

omeraloni commented Mar 9, 2021

Hidden my previous comment, was a fish config issue.

My $PATH DOES contains a file - /Users/omer.a/.pyenv/libexec/pyenv:

/Users/omer.a/.poetry/bin /Users/omer.a/.pyenv/libexec /Users/omer.a/.pyenv/libexec/pyenv /Users/omer.a/.pyenv/shims /Users/omer.a/.pyenv/bin /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbin

Somehow pyenv got /Users/omer.a/.pyenv/libexec/pyenv in there, still trying to figure out how but was able to remove it programmatically when loading my shell.
Once removed, both SSH and remote containers started working again!

@deepak1556 deepak1556 removed the info-needed Issue requires more information from poster label Mar 9, 2021
@roblourens roblourens modified the milestone: March 2021 Mar 10, 2021
@roblourens roblourens added this to the February 2021 Recovery milestone Mar 10, 2021
@roblourens roblourens added the candidate Issue identified as probable candidate for fixing in the next release label Mar 10, 2021
deepak1556 added a commit to microsoft/vscode that referenced this issue Mar 11, 2021
sbatten pushed a commit to microsoft/vscode that referenced this issue Mar 11, 2021
@roblourens
Copy link
Member

We just released an update to VS Code Insiders that has this fix. Please try it out and let me know how it goes.

@leandroyalet
Copy link

Can you clarify what you changed in your PATH?

@roblourens sorry for the delay, I removed old and missing paths

@roblourens roblourens added the verified Verification succeeded label Mar 11, 2021
@omeraloni
Copy link

We just released an update to VS Code Insiders that has this fix. Please try it out and let me know how it goes.

Works for me, thanks for the quick fix!

@roblourens
Copy link
Member

🎉 and we just released this to stable as well in 1.54.2

@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2021
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 candidate Issue identified as probable candidate for fixing in the next release mac Issue on mac verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

10 participants