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

Relaunching insiders with custom CLI Args fails due to missing 1.39.0-insider-main.sock #81652

Closed
DonJayamanne opened this issue Sep 30, 2019 · 13 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Sep 30, 2019

Version: 1.39.0-insider
Commit: 601e3e0
Date: 2019-09-30T05:30:22.799Z
Electron: 6.0.9
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 18.7.0

Steps to Reproduce:

  1. Download VS Code Insiders
  2. Launch Insiders with custom cli args as follows:
    Each argument is in a separate line for brevity
    '<vs code dir>/Visual Studio Code - Insiders.app' --user-data-dir='<user dir>'
  3. Exit VS Code after a few seconds.
  4. Run the same command once again, and here's the error that is logged:
[main 2019-09-30T14:32:33.883Z] Could not delete obsolete instance handle Error: ENOENT: no such file or directory, unlink '<user dir>/1.39.0-insider-main.sock'
    at Object.unlinkSync (original-fs.js:976:3)
    at Object.doStartup (<vs code dir>/Contents/Resources/app/out/vs/code/electron-main/main.js:534:676)
    at processTicksAndRejections (internal/process/task_queues.js:89:5) {
  errno: -2,
  syscall: 'unlink',
  code: 'ENOENT',
  path: '<user dir>/1.39.0-insider-main.sock'
}
[main 2019-09-30T14:32:33.886Z] Error: ENOENT: no such file or directory, unlink '<user dir>/1.39.0-insider-main.sock'
    at Object.unlinkSync (original-fs.js:976:3)
    at Object.doStartup (<vs code dir>/Contents/Resources/app/out/vs/code/electron-main/main.js:534:676)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
(base) 

Does this issue occur when all extensions are disabled?: N/A

@bpasero bpasero added the bug Issue identified by VS Code Team member as probable bug label Sep 30, 2019
@bpasero bpasero added this to the September 2019 milestone Sep 30, 2019
@bpasero
Copy link
Member

bpasero commented Sep 30, 2019

@DonJayamanne does not reproduce with stable?

@bpasero bpasero added the info-needed Issue requires more information from poster label Sep 30, 2019
@DonJayamanne
Copy link
Contributor Author

No it doesn't

@bpasero bpasero removed the info-needed Issue requires more information from poster label Oct 1, 2019
@bpasero
Copy link
Member

bpasero commented Oct 1, 2019

@DonJayamanne I cannot reproduce, but I wonder how you start code from the command line. Are you literally putting in the path to the application bundle? Why not just code-insiders

@joaomoreno I wonder what could be going on here:

  • starts vscode
  • we try to connect to environmentService.mainIPCHandle because serving from that handle failed
  • this fails again
  • now we try to delete the handle and this fails too
  • from this moment on we seem to be throwing that error but the comment reads:
// it happens on Linux and OS X that the pipe is left behind
// let's delete it, since we can't connect to it and then
// retry the whole thing

But there is no retry? Did we maybe loose this code during some refactoring?

@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Oct 1, 2019

cannot reproduce, but I wonder how you start code from the command line. Are you literally putting in the path to the application bundle? Why not just code-insiders

I launch it manually, as this isn't my system wide install of insiders.

Basically these are part of our smoke tests, downloading VSCode insiders and launching it with custom args.

@bpasero
Copy link
Member

bpasero commented Oct 1, 2019

@DonJayamanne don't you have to put a open command before the .app file? What is the full command line?

@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Oct 1, 2019

Sorry, i removed that bit just to make it more readable, here's the full command line:

'/Users/donjayamanne/Desktop/Development/vsc/pythonVSCode/uitests/.vscode test/insider/Visual Studio Code - Insiders.app/Contents/MacOS/Electron' --user-data-dir='/Users/donjayamanne/Desktop/Development/vsc/pythonVSCode/uitests/.vscode test/user'

@bpasero
Copy link
Member

bpasero commented Oct 1, 2019

@DonJayamanne ok thanks, still does not reproduce for me. If it is Electron related, we just reverted back to Electron 4. Can you reproduce in todays insider?

@DonJayamanne
Copy link
Contributor Author

Still the same problem.

@joaomoreno
Copy link
Member

joaomoreno commented Oct 2, 2019

But there is no retry? Did we maybe loose this code during some refactoring?

No, still looks the same. We try to delete it. If we succeed to delete it, we were correct in assuming that the pipe was left behind, so we just retry the whole IPC setup. If we can't delete it (and we can't connect to it)... something is really wrong, so we throw hands up since we exhausted all our options to create the socket.

@joaomoreno
Copy link
Member

@DonJayamanne Does the *.sock file exist in there? What are its permissions?

@bpasero bpasero added the info-needed Issue requires more information from poster label Oct 2, 2019
@joaomoreno joaomoreno removed this from the September 2019 milestone Oct 2, 2019
@DonJayamanne
Copy link
Contributor Author

There are no *.sock files in there.

@bpasero bpasero removed the bug Issue identified by VS Code Team member as probable bug label Oct 3, 2019
@joaomoreno
Copy link
Member

joaomoreno commented Oct 7, 2019

What about another user data dir? Does that work? Is the one you're using in a special file system (eg. network drive)?

@vscodebot vscodebot bot closed this as completed Oct 14, 2019
@vscodebot
Copy link

vscodebot bot commented Oct 14, 2019

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants