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

VSCode fails to connect: cannot find module minimist #6340

Closed
LiveFreeAndRoam opened this issue Feb 14, 2022 · 4 comments
Closed

VSCode fails to connect: cannot find module minimist #6340

LiveFreeAndRoam opened this issue Feb 14, 2022 · 4 comments
Labels
ssh Issue in vscode-remote SSH

Comments

@LiveFreeAndRoam
Copy link

Possibly related: #6294

  • VSCode Version: 1.64.2
  • Local OS Version: Windows 10
  • Remote OS Version: Various Linux
  • Remote Extension/Connection Type: SSH
  • Logs: See full log below.
(node:18355) UnhandledPromiseRejectionWarning: Error: Cannot find module 'minimist'

Steps to Reproduce:

I started seeing this problem yesterday. If I opened a remote workspace, it would generate the error. If I opened a "naked" server connection, and then opened folders, it worked. After a reboot, it is now completely broken. I cannot start a remote server.

I have verified no vscode servers are currently running on the remote host. I've also used the Remote-SSH: Kill VS Code Server on Host... command.

I have a lot of work to do, and VS Code is down for the count. Please help.

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

[06:38:12.417] > Server did not start successfully. Full server log at /home/user/.vscode-s
> erver/.f80445acd5a3dadef24aa209168452a3d97cc326.log >>>
> (node:18355) UnhandledPromiseRejectionWarning: Error: Cannot find module 'minimi
> st'
> Require stack:
> - /home/user/.vscode-server/bin/f80445acd5a3dadef24aa209168452a3d97cc326/o
> ut/server-main.js
>     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15) 
>     at Function.Module._load (internal/modules/cjs/loader.js:725:27)
>     at Module.require (internal/modules/cjs/loader.js:952:19)
>     at require (internal/modules/cjs/helpers.js:88:18)
>     at start (/home/user/.vscode-server/bin/f80445acd5a3dadef24aa209168452
> a3d97cc326/out/server-main.js:1:292)
>     at Object.<anonymous> (/home/user/.vscode-server/bin/f80445acd5a3dadef
[06:38:12.419] > 
> 24aa209168452a3d97cc326/out/server-main.js:11:28)
>     at Module._compile (internal/modules/cjs/loader.js:1063:30)
>     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)   
>     at Module.load (internal/modules/cjs/loader.js:928:32)
>     at Function.Module._load (internal/modules/cjs/loader.js:769:14)
> (Use `node --trace-warnings ...` to show where the warning was created)
> (node:18355) 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 termin
> ate the node process on unhandled promise rejection, use the CLI flag `--unhandl
> ed-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejecti
> ons_mode). (rejection id: 1)
> (node:18355) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr
> ecated. In the future, promise rejections that are not handled will terminate th
> e Node.js process with a non-zero exit code.
> <<< End of server log
> 5a1a1065a7e6: start
> exitCode==32==
> listeningOn====
> osReleaseId==sles==
> arch==x86_64==
> tmpDir==/run/user/135011636==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
[06:38:12.427] > 
> extInstallTime====
> serverStartTime==7695==
> 5a1a1065a7e6: end
[06:38:12.427] Received install output: 
exitCode==32==
listeningOn====
osReleaseId==sles==
arch==x86_64==
tmpDir==/run/user/135011636==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime==7695==

[06:38:12.428] Resolver error: Error: The VS Code Server failed to start
	at Function.ServerInstallError (c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:430359)
	at u (c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:424682)
	at Object.t.handleInstallOutput (c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:429101)
	at Object.t.tryInstall (c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:524212)
	at processTicksAndRejections (internal/process/task_queues.js:93:5)
	at async c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:487216
	at async Object.t.withShowDetailsEvent (c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:490561)
	at async Object.t.resolve (c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:488295)
	at async c:\Users\user\.vscode\extensions\ms-vscode-remote.remote-ssh-0.70.0\out\extension.js:1:564197
[06:38:12.435] ------
@LiveFreeAndRoam
Copy link
Author

Update: With nothing to lose, I tried the option Switch to Pre-Relesae Version. After reloading, it installed the new server and it started working again. Sometihng is amiss, and I'll be glad to learn about the cause.

@github-actions github-actions bot added the ssh Issue in vscode-remote SSH label Feb 14, 2022
@francoism90
Copy link

@LiveFreeAndRoam Switching to pre-releases doesn't fix the issue for me.

@LiveFreeAndRoam
Copy link
Author

@francoism90, it's scary to know there's a bug that brings the editor to a complete halt, blocking all work.

Switching to pre-releases doesn't fix the issue for me.

I had some success by ensuring all my vscode server processess were killed on the remote host. I did that on the remote host with the "kill" command because the Remote-SSH: Kill VS Code Server on Host... was not doing the job.

Though, that didn't work for me yesterday, until I switched to the Pre-Release version.

@tanhakabir
Copy link

I had some success by ensuring all my vscode server processess were killed on the remote host. I did that on the remote host with the "kill" command because the Remote-SSH: Kill VS Code Server on Host... was not doing the job.

I believe this is due to #6260

@francoism90 for right now I'd manually go into your remote and make sure all the VS Code Server processes are gone.

Something along the lines of:

kill -9 \`ps ax | grep "out/vs/server/main.js" | grep -v grep | awk \'{print $1}\'\`
			kill -9 \`ps ax | grep "watcherService" | grep -v grep | awk \'{print $1}\'\`
			rm -rf $HOME/.vscode-server

or .vscode-server-insiders if you're using Insiders

I'm going to close this issue because I think this is a result of a stale VS Code server process. And the fix from #6260 would help clean this

@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

3 participants