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

Error trying to use on vscode Access Denied #84

Open
newton-peixoto opened this issue Mar 12, 2024 · 11 comments
Open

Error trying to use on vscode Access Denied #84

newton-peixoto opened this issue Mar 12, 2024 · 11 comments

Comments

@newton-peixoto
Copy link

Hello everyone

Any tips how to solve the following errors?

write EPIPE
Shutting down server.
[Error - 16:53:22] Client Next LS: connection to server is erroring.
write EPIPE
[Error - 16:53:22] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: starting
	at Dp.shutdown (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:52:8492)
	at Dp.stop (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:52:8071)
	at Dp.stop (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:55:37705)
	at Dp.handleConnectionError (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:54:63)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 16:53:22] Server initialization failed.
  Message: write EPIPE
  Code: -32099 
[Error - 16:53:22] Next LS client: couldn't create connection to server.
  Message: write EPIPE
  Code: -32099 
[Info  - 16:53:22] Connection to server got closed. Server will restart.
true
error: AccessDenied

trying to run it manually

 ~ ~/.cache/elixir-tools/nextls/bin/nextls --port 9000
error: AccessDenied

@mhanberg
Copy link
Contributor

Can you run the next LS uninstall command from the command palette and the restart?

I've seen an error like this in dev but I can't remember exactly what it was from, but it was a packaging issue.

@mhanberg
Copy link
Contributor

Can you also share your OS info and all that jazz

@newton-peixoto
Copy link
Author

vscode version
1.87.1
1e790d77f81672c49be070e04474901747115651
x64

Ubuntu 22.04

@newton-peixoto
Copy link
Author

Can you run the next LS uninstall command from the command palette and the restart?

I've seen an error like this in dev but I can't remember exactly what it was from, but it was a packaging issue.

Same error, unfourtunaly

@mhanberg
Copy link
Contributor

Can you run the command you ran but with strace strace path/to/nextls --port 9000

@newton-peixoto
Copy link
Author

arch_prctl(ARCH_SET_FS, 0x121bf38)      = 0
set_tid_address(0x121bed0)              = 2095571
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
prlimit64(0, RLIMIT_STACK, {rlim_cur=16384*1024, rlim_max=RLIM64_INFINITY}, NULL) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=0x12160e7, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x1207dad}, NULL, 8) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe18cb1e000
openat(AT_FDCWD, "/tmp/libc-musl-17613ec13d9aa9e5e907e6750785c5bbed3ad49472ec12281f592e2f0f2d3dbd.so", O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE|O_CLOEXEC, 0666) = 3
fchmod(3, 0754)                         = 0
write(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\263\321\5\0\0\0\0\0"..., 752696) = 752696
close(3)                                = 0
mkdirat(AT_FDCWD, "/home/newton.neto/.local/share/.burrito", 0755) = -1 EEXIST (File exists)
mkdirat(AT_FDCWD, "/home/newton.neto/.local/share/.burrito/next_ls_erts-14.2.1_0.19.2", 0755) = -1 EEXIST (File exists)
faccessat(AT_FDCWD, "/home/newton.neto/.local/share/.burrito/next_ls_erts-14.2.1_0.19.2/_metadata.json", F_OK) = 0
openat(AT_FDCWD, "/home/newton.neto/.local/share/.burrito", O_RDONLY|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = 3
mmap(0x7fe18cb1f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe18cb1f000
openat(AT_FDCWD, "/home/newton.neto/.local/share/.burrito/next_ls_erts-14.2.1_0.19.2/_metadata.json", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 4
mmap(0x7fe18cb20000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe18cb20000
read(4, "{\"options\":\"[reboot_system_after"..., 5249) = 476
read(4, "", 4773)                       = 0
close(4)                                = 0
lseek(3, 0, SEEK_SET)                   = 0
getdents64(3, 0x7fff4adb6308 /* 3 entries */, 1024) = 96
openat(AT_FDCWD, "/home/newton.neto/.local/share/.burrito/next_ls_erts-14.2.1_0.19.2/_metadata.json", O_RDONLY|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 4
read(4, "{\"options\":\"[reboot_system_after"..., 5249) = 476
read(4, "", 4773)                       = 0
close(4)                                = 0
getdents64(3, 0x7fff4adb6308 /* 0 entries */, 1024) = 0
munmap(0x7fe18cb20000, 12288)           = 0
munmap(0x7fe18cb1f000, 4096)            = 0
mmap(0x7fe18cb23000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe18cb23000
ioctl(1, TIOCGWINSZ, {ws_row=55, ws_col=211, ws_xpixel=0, ws_ypixel=0}) = 0
mmap(0x7fe18cb26000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe18cb26000
openat(AT_FDCWD, "/home/newton.neto/.local/share/.burrito/next_ls_erts-14.2.1_0.19.2/releases/COOKIE", O_RDWR|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 4
read(4, "LMJBBFYNIMQ76MZJKSM3VNA53MGVGCYK"..., 1024) = 56
read(4, "", 968)                        = 0
mmap(0x7fe18cb27000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe18cb27000
mmap(0x7fe18cb2a000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fe18cb2a000
execve("/home/newton.neto/.local/share/.burrito/next_ls_erts-14.2.1_0.19.2/erts-14.2.1/bin/erlexec", ["/home/newton.neto/.local/share/."..., "-elixir ansi_enabled true", "-noshell", "-s elixir start_cli", "-mode embedded", "-setcookie", "LMJBBFYNIMQ76MZJKSM3VNA53MGVGCYK"..., "-boot", "/home/newton.neto/.local/share/."..., "-boot_var", "RELEASE_LIB", "/home/newton.neto/.local/share/."..., "-args_file", "/home/newton.neto/.local/share/."..., "-config", "/home/newton.neto/.local/share/."..., "-extra", "--port", "9000"], 0x7fe18cb296b8 /* 54 vars */) = -1 EACCES (Permission denied)
write(2, "error: ", 7error: )                  = 7
write(2, "AccessDenied", 12AccessDenied)            = 12
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?
+++ exited with 1 +++

@mhanberg
Copy link
Contributor

can you run file /home/newton.neto/.local/share/.burrito/next_ls_erts-14.2.1_0.19.2/erts-14.2.1/bin/erlexec and ldd /home/newton.neto/.local/share/.burrito/next_ls_erts-14.2.1_0.19.2/erts-14.2.1/bin/erlexec

@mhanberg
Copy link
Contributor

also potentially uninstall nextls with rm ~/.cache/elixir-tools/nextls/bin/nextls and then rm -rf /home/newton.neto/.local/share/.burrito/ and then reopening vscode to let it reinstall

part of me suspects that it somehow downloaded the wrong architecture or something

@newton-peixoto
Copy link
Author

first command result :

/home/newton.neto/.local/share/.burrito/next_ls_erts-14.2.1_0.19.2/erts-14.2.1/bin/erlexec: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /tmp/libc-musl-17613ec13d9aa9e5e907e6750785c5bbed3ad49472ec12281f592e2f0f2d3dbd.so, with debug_info, not stripped

second command result

	linux-vdso.so.1 (0x00007fff31df4000)
	libc.musl-x86_64.so.1 => not found

After reopen vscode ->

2024-03-14 14:10:35.892 [info] activating next ls
2024-03-14 14:10:35.892 [info] value of elixir-tools-force-next-ls-download-v1: false
2024-03-14 14:10:35.893 [warning] Did not find Next LS executable at /home/newton.neto/.cache/elixir-tools/nextls/bin/nextls
2024-03-14 14:10:35.893 [info] Next LS needs to be downloaded
2024-03-14 14:10:35.901 [info] Starting download from https://github.com/elixir-tools/next-ls/releases/latest/download/next_ls_linux_amd64
2024-03-14 14:10:37.866 [info] Downloaded Next LS!
error: AccessDenied
[Error - 14:10:38] Server process exited with code 1.
[Error - 14:10:38] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Info  - 14:10:38] Connection to server got closed. Server will restart.
true
[Error - 14:10:38] Next LS client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 14:10:38] Client Next LS: connection to server is erroring.
write EPIPE
Shutting down server.
[Error - 14:10:38] Client Next LS: connection to server is erroring.
write EPIPE
[Error - 14:10:38] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: startFailed
	at Dp.shutdown (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:52:8492)
	at Dp.stop (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:52:8071)
	at Dp.stop (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:55:37705)
	at Dp.handleConnectionError (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:54:63)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 14:10:38] Server initialization failed.
  Message: write EPIPE
  Code: -32099 
[Error - 14:10:38] Next LS client: couldn't create connection to server.
  Message: write EPIPE
  Code: -32099 
[Error - 14:10:38] Restarting server failed
  Message: write EPIPE
  Code: -32099 
[Info  - 14:10:38] Connection to server got closed. Server will restart.
true
error: AccessDenied
[Error - 14:10:38] Server process exited with code 1.
[Error - 14:10:38] Server process exited with code 1.
[Error - 14:10:38] Client Next LS: connection to server is erroring.
Cannot call write after a stream was destroyed
[Error - 14:10:38] Server initialization failed.
  Message: Cannot call write after a stream was destroyed
  Code: -32099 
[Error - 14:10:38] Next LS client: couldn't create connection to server.
  Message: Cannot call write after a stream was destroyed
  Code: -32099 
[Error - 14:10:38] Restarting server failed
  Message: Cannot call write after a stream was destroyed
  Code: -32099 
[Info  - 14:10:38] Connection to server got closed. Server will restart.
true
error: AccessDenied
[Error - 14:10:38] Client Next LS: connection to server is erroring.
write EPIPE
Shutting down server.
[Error - 14:10:38] Client Next LS: connection to server is erroring.
write EPIPE
[Error - 14:10:38] Stopping server failed
Error: Client is not running and can't be stopped. It's current state is: starting
	at Dp.shutdown (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:52:8492)
	at Dp.stop (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:52:8071)
	at Dp.stop (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:55:37705)
	at Dp.handleConnectionError (/home/newton.neto/.vscode/extensions/elixir-tools.elixir-tools-0.14.1/dist/extension.js:54:63)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[Error - 14:10:38] Server initialization failed.
  Message: write EPIPE
  Code: -32099 
[Error - 14:10:38] Next LS client: couldn't create connection to server.
  Message: write EPIPE
  Code: -32099 
[Error - 14:10:38] Restarting server failed
  Message: write EPIPE
  Code: -32099 
[Info  - 14:10:38] Connection to server got closed. Server will restart.
true
error: AccessDenied
[Error - 14:10:38] Server process exited with code 1.
[Error - 14:10:38] Server process exited with code 1.
[Error - 14:10:38] Client Next LS: connection to server is erroring.
Cannot call write after a stream was destroyed
[Error - 14:10:38] Server initialization failed.
  Message: Cannot call write after a stream was destroyed
  Code: -32099 
[Error - 14:10:38] Next LS client: couldn't create connection to server.
  Message: Cannot call write after a stream was destroyed
  Code: -32099 
[Error - 14:10:38] Restarting server failed
  Message: Cannot call write after a stream was destroyed
  Code: -32099 
[Error - 14:10:38] The Next LS server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
error: AccessDenied

@mhanberg
Copy link
Contributor

mhanberg commented Mar 14, 2024

What in tarnation.

@doawoo any ideas?

@mhanberg
Copy link
Contributor

We have a hypothesis, might be related to your username having a . in it.

I'll make a new user in my Linux computer with one and try it out.

Not sure the fix if that's the case but we'll figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants