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

EACCES on temporary socket #7712

Closed
lnicola opened this issue Jun 15, 2016 · 19 comments
Closed

EACCES on temporary socket #7712

lnicola opened this issue Jun 15, 2016 · 19 comments
Assignees
Labels
info-needed Issue requires more information from poster install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux

Comments

@lnicola
Copy link
Contributor

lnicola commented Jun 15, 2016

  • VSCode Version: 1.2.1 Linux x64
  • OS Version: CentOS 7

Steps to Reproduce:

  1. Run code

The following error appears. Notice the newline in the path.

Error: listen EACCES /tmp/user
/Code-333ea0.sock
    at Object.exports._errnoException (util.js:890:11)
    at exports._exceptionWithHostPort (util.js:913:20)
    at Server._listen2 (net.js:1221:19)
    at listen (net.js:1270:10)
    at Server.listen (net.js:1360:5)
    at /home/user/VSCode-linux-x64/resources/app/out/vs/code/electron-main/main.js:6:16982
    at new __dirname.undefined.t.Class.derive._oncancel (/home/user/VSCode-linux-x64/resources/app/out/vs/code/electron-main/main.js:5:11845)
    at Object.s [as serve] (/home/user/VSCode-linux-x64/resources/app/out/vs/code/electron-main/main.js:6:16912)
    at t (/home/user/VSCode-linux-x64/resources/app/out/vs/code/electron-main/main.js:10:20560)
    at x (/home/user/VSCode-linux-x64/resources/app/out/vs/code/electron-main/main.js:10:21566)

strace extract:

execve("/bin/mkdir", ["mkdir", "-p", "-m", "700", "/tmp/user"], [/* 57 vars */]) = 0
bind(58, {sa_family=AF_LOCAL, sun_path="/tmp/user\n/Code-333ea0.sock"}, 110) = -1 ENOENT (No such file or directory)

This seems to have regressed in 1.1, since 1.0.0 is working for me.

This doesn't occur on my Arch machine.

@lnicola
Copy link
Contributor Author

lnicola commented Jun 15, 2016

Update: This only seems to happen from zsh with prezto. It works if I run bin/code or ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 ./code resources/app/out/cli.js, while ./code doesn't work. Is it normal?

By the way, the 1.2.1 rpm doesn't seem to contain /usr/bin/code.

@sandy081 sandy081 added the install-update VS Code installation and upgrade system issues label Jun 16, 2016
@joaomoreno
Copy link
Member

@Tyriar any clue?

@lnicola
Copy link
Contributor Author

lnicola commented Jun 16, 2016

Regarding the /usr/bin/code symlink, it seems to get created somehow. rpm -qf /usr/bin/code doesn't recognize it as being part of the package.

@Tyriar
Copy link
Member

Tyriar commented Jun 16, 2016

@lnicola #7350 should fix the /usr/bin/code issue.

@joaomoreno nothing comes to mind really... The environments are the only things that could potentially change between shells aren't they?

@lnicola
Copy link
Contributor Author

lnicola commented Jun 16, 2016

@Tyriar I updated the environment variables to match (at least as reported by env), but it didn't have any effect. It's strange..

@joaomoreno
Copy link
Member

So, in that shell what do you get with echo $TMPDIR?

@lnicola
Copy link
Contributor Author

lnicola commented Jun 16, 2016

@joaomoreno it's not set. It works it I set it manually.

@joaomoreno
Copy link
Member

How about node -p 'require("os").tmpdir()'?

@lnicola
Copy link
Contributor Author

lnicola commented Jun 16, 2016

@joaomoreno I don't have node installed. Can somehow I test that with the code executable or do I have to install it?

@joaomoreno
Copy link
Member

Sure, maybe this will work: ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 /usr/bin/code -p 'require("os").tmpdir()'.

@lnicola
Copy link
Contributor Author

lnicola commented Jun 16, 2016

With /usr/share/code/code, both tmpdir() and tmpDir() return /tmp. As I mentioned above, /usr/bin/code works fine. I also installed nodejs and I get the same path.

@joaomoreno
Copy link
Member

OK, so the real problem seems to be the original lack of /usr/bin/code, leaving it to @Tyriar

@joaomoreno joaomoreno removed their assignment Jun 16, 2016
@lnicola
Copy link
Contributor Author

lnicola commented Jun 16, 2016

Not really, but perhaps it's my fault. I downloaded the VSCode ZIP archive, extracted it, and it failed to start. Only yesterday I noticed that running bin/code works. Is this the expected behavior?

@Tyriar
Copy link
Member

Tyriar commented Jun 16, 2016

@lnicola can you try the Insiders build and see if the problem still exists? https://code.visualstudio.com/insiders

@Tyriar Tyriar added info-needed Issue requires more information from poster linux Issues with VS Code on Linux labels Jun 16, 2016
@lnicola
Copy link
Contributor Author

lnicola commented Jun 16, 2016

@Tyriar Thanks, Insiders version works. Do you happen to know the commit that fixed it?

I'll close this soon anyway.

@lnicola lnicola changed the title EACCESS on temporary socket EACCES on temporary socket Jun 17, 2016
@lnicola
Copy link
Contributor Author

lnicola commented Jun 17, 2016

Works for me in newer Insiders builds, closing.

@lnicola lnicola closed this as completed Jun 17, 2016
@Tyriar
Copy link
Member

Tyriar commented Jun 17, 2016

@lnicola #7350 is the PR that fixed the bin command.

@lnicola
Copy link
Contributor Author

lnicola commented Jun 17, 2016

@Tyriar no, I meant the extra newline in the temporary path.

@Tyriar
Copy link
Member

Tyriar commented Jun 17, 2016

No idea on that one

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
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 install-update VS Code installation and upgrade system issues linux Issues with VS Code on Linux
Projects
None yet
Development

No branches or pull requests

4 participants