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

Elixir LS fails to start. Not really sure why. #72

Open
benbot opened this issue Apr 17, 2023 · 4 comments
Open

Elixir LS fails to start. Not really sure why. #72

benbot opened this issue Apr 17, 2023 · 4 comments

Comments

@benbot
Copy link

benbot commented Apr 17, 2023

both elixir and mix are available in my path and I installed through :CocInstall coc-elixir

The LS works when using vscode, but not neovim :(

output of :CocInfo

## versions

vim version: NVIM v0.9.0
node version: v17.8.0
coc.nvim version: 0.0.82-b7375d5f 2023-01-30 05:09:03 +0800
coc.nvim directory: /home/benbot/.vim/plugged/coc.nvim
term: guake
platform: linux

## Log of coc.nvim

2023-04-17T11:17:58.925 INFO (pid:20717) [plugin] - coc.nvim initialized with node: v17.8.0 after 1923
2023-04-17T11:17:58.926 INFO (pid:20717) [services] - LanguageClient elixir state change: stopped => starting
2023-04-17T11:17:58.936 INFO (pid:20717) [language-client-index] - Language server "elixir" started with 20731
2023-04-17T11:17:59.152 INFO (pid:20717) [services] - LanguageClient elixir state change: starting => stopped
2023-04-17T11:17:59.152 INFO (pid:20717) [services] - LanguageClient elixir state change: stopped => starting
2023-04-17T11:17:59.155 ERROR (pid:20717) [language-client-client] - Server elixir initialization failed. jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:17:59.156 INFO (pid:20717) [services] - LanguageClient elixir state change: starting => stopped
2023-04-17T11:17:59.157 ERROR (pid:20717) [server] - unhandledRejection  Promise {
  <rejected> jh [Error]: Pending response rejected since connection got disposed
      at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
      at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
      at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
      at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
      at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
      at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
      at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
      at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
      at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
      at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
    code: -32097,
    data: undefined
  }
} jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:17:59.160 INFO (pid:20717) [language-client-index] - Language server "elixir" started with 20835
2023-04-17T11:17:59.374 INFO (pid:20717) [services] - LanguageClient elixir state change: stopped => starting
2023-04-17T11:17:59.374 ERROR (pid:20717) [language-client-client] - Server elixir initialization failed. jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:17:59.374 INFO (pid:20717) [services] - LanguageClient elixir state change: starting => stopped
2023-04-17T11:17:59.374 ERROR (pid:20717) [services] - Server elixir failed to start: jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:17:59.378 INFO (pid:20717) [language-client-index] - Language server "elixir" started with 20938
2023-04-17T11:17:59.598 INFO (pid:20717) [services] - LanguageClient elixir state change: stopped => starting
2023-04-17T11:17:59.598 ERROR (pid:20717) [language-client-client] - Server elixir initialization failed. jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:17:59.598 INFO (pid:20717) [services] - LanguageClient elixir state change: starting => stopped
2023-04-17T11:17:59.602 INFO (pid:20717) [language-client-index] - Language server "elixir" started with 21041
2023-04-17T11:17:59.817 ERROR (pid:20717) [language-client-client] - Server elixir initialization failed. jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/home/benbot/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/home/benbot/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/home/benbot/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/home/benbot/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/home/benbot/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-04-17T11:19:24.315 INFO (pid:20717) [attach] - receive notification: showInfo []
2023-04-17T11:20:35.569 INFO (pid:20717) [attach] - receive notification: showInfo []

@benbot
Copy link
Author

benbot commented Apr 18, 2023

Seeing the same issue on osx :(

@NeuroWinter
Copy link

I am also seeing this issue on Ubuntu 20.4 :(

@dylan-chong
Copy link

dylan-chong commented Jun 8, 2023

also same issue on macos 13.2.1, m2 macbook

i tried recompiling elixir-ls from scratch using https://github.com/elixir-lsp/coc-elixir#server-fails-to-start (making sure to git pull the latest elixir-ls first)
usually it can help when changing erl/ex/node versions but it didn't this time

EDIT: i found out the elixir ls path in my cocconfig is pointing to the wrong folder. i apparently had a second place where i had cloned elixir ls

after i had fixed the path and recompiled elixir-ls, i get an error [coc.nvim] OTP compiled without EEP48 documentation chunks in vim's message line

i still get the same error though

## versions

vim version: NVIM v0.8.2
node version: v20.2.0
coc.nvim version: 0.0.82-b7375d5f 2023-01-30 05:09:03 +0800
coc.nvim directory: /Users/Dylan/.vim/plugged/coc.nvim
term: tmux
platform: darwin

## Log of coc.nvim

2023-06-08T13:34:36.981 INFO (pid:96312) [plugin] - coc.nvim initialized with node: v20.2.0 after 86
2023-06-08T13:34:36.981 INFO (pid:96312) [services] - LanguageClient ESLint state change: stopped => starting
2023-06-08T13:34:36.981 INFO (pid:96312) [services] - LanguageClient elixir state change: stopped => starting
2023-06-08T13:34:36.985 INFO (pid:96312) [language-client-index] - Language server "eslint" started with 96488
2023-06-08T13:34:36.988 INFO (pid:96312) [language-client-index] - Language server "elixir" started with 96489
2023-06-08T13:34:37.029 INFO (pid:96312) [services] - LanguageClient ESLint state change: starting => running
2023-06-08T13:34:37.031 INFO (pid:96312) [services] - service eslint started
2023-06-08T13:34:37.064 INFO (pid:96312) [core-watchman] - watchman watching project: /Users/Dylan/Dropbox/Programming/GitHub/be-otp--code-exercise--dylan-chong
2023-06-08T13:34:37.452 INFO (pid:96312) [attach] - receive notification: highlight []
2023-06-08T13:34:38.050 INFO (pid:96312) [attach] - receive notification: highlight []
2023-06-08T13:34:39.686 INFO (pid:96312) [services] - LanguageClient elixir state change: starting => stopped
2023-06-08T13:34:39.686 INFO (pid:96312) [services] - LanguageClient elixir state change: stopped => starting
2023-06-08T13:34:39.686 ERROR (pid:96312) [language-client-client] - Server elixir initialization failed. jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-06-08T13:34:39.687 INFO (pid:96312) [services] - LanguageClient elixir state change: starting => stopped
2023-06-08T13:34:39.688 ERROR (pid:96312) [server] - unhandledRejection  Promise {
  <rejected> jh [Error]: Pending response rejected since connection got disposed
      at Object.dispose (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:51:4592)
      at Object.dispose (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:241:6209)
      at Nd.handleConnectionClosed (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:244:15575)
      at Nd.handleConnectionClosed (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:248:3561)
      at t (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:244:15224)
      at yT.invoke (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:14460)
      at lc.fire (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:15230)
      at Qe (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:25:6504)
      at yT.invoke (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:14460)
      at lc.fire (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:15230) {
    code: -32097,
    data: undefined
  }
} jh [Error]: Pending response rejected since connection got disposed
    at Object.dispose (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:51:4592)
    at Object.dispose (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:241:6209)
    at Nd.handleConnectionClosed (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:244:15575)
    at Nd.handleConnectionClosed (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:248:3561)
    at t (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:244:15224)
    at yT.invoke (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:15230)
    at Qe (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:25:6504)
    at yT.invoke (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:14460)
    at lc.fire (/Users/Dylan/.vim/plugged/coc.nvim/build/index.js:24:15230) {
  code: -32097,
  data: undefined
}
2023-06-08T13:34:39.688 INFO (pid:96312) [language-client-index] - Language server "elixir" started with 96836
2023-06-08T13:34:40.552 INFO (pid:96312) [attach] - receive notification: showInfo []

@islam-taha
Copy link

I have been facing the same issue a lot, and I finally managed to solve it using the right erlang/elixir combo according to this table: https://github.com/elixir-lsp/elixir-ls#support-matrix

I was using elixir 1.13.1 & erlang v26, and this was causing the problem, falling back to erlang v24 solved the problem after recompiling everything.

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

4 participants