abl63
ElixirLS (VSCode extension) installation issue on WSL2, Ubuntu
Hi everyone, I am new to Elixir and to programming in general. I am still setting things up to get working whith Elixir.
When installing ElixirLS extension in VSCode (running in Ubuntu WSL2, whith WSL extension installed), I have this output :
/root/.vscode-server/extensions/jakebecker.elixir-ls-0.14.0/elixir-ls-release/launch.sh: line 77: 5504 Killed elixir "$SCRIPTPATH/quiet_install.exs" > /dev/null 2> /dev/null < /dev/zero
[Error - 6:45:20 PM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Info - 6:45:20 PM] Connection to server got closed. Server will restart.
true
[Error - 6:45:20 PM] ElixirLS - elixir client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
Environment
- Windows 11 → WSL2 → Ubuntu 22.04.2 LTS
- VSCode whith WLS extension
- Erlang/OTP 25 / Elixir 1.14.4 (installed using asdf, no problem using elixir or iex commands)
Troubleshooting
- [tried] : Restart your editor (which will restats ElixirLS) sometimes fixes issues
- [couldn’t find any directory] : Stop your editor, remove the entire
.elixir_lsdirectory, then restart your editor
To be honest I don’t understand the output and what server is involved in the process of the installation. But I saw that people managed to install this extension on WSL2 without trouble here : VSCode - Elixir LS + WSL - #15 by robert
Thanks a lot if you have insights ![]()
Marked As Solved
zachallaun
I’m experiencing the same thing. I believe it’s a bug in the brand-new v0.14.0 release. I’d recommend reverting to v0.13.0 until it’s resolved, which will hopefully be soon.
Extension settings:
Click the down arrow next to Uninstall, then Install Another Version…
Select 0.13.0. May need to reload VSCode.
Also Liked
03juan
No need to clone it like that. The LS won’t link to precompiled asdf install, but you can tell asdf to build it for you.
Edit: Cached page as original no longer available: Fixing "Go to Definition" for Elixir's standard library | Random Developer's Blog (original: Fixing “Go To Definition” for Elixir’s standard library | Random Developer’s Blog )
It turns out
asdf-elixiris using precompiled version when you executeasdf install elixir <version>which does not contain source code. However, if you take any commit reference (SHA string) from Elixir repo and useasdf install elixir ref:<commit_reference>,asdfwill actually build it from the source to which that reference points. Each Elixir release is tagged so finding a commit reference for a correct version is pretty straightforward. After that, just as with normalasdfinstallation, you have to executeasdf global elixir ref:<commit_reference>to set that version as global.After this is done, go to any project, delete
.elixir_ls,depsand_build, run VSCode again and wait for the language server finish its job. Now, “Go to Definition” should work for everything (for the standard library it actually takes a couple of seconds; others should be instant).
outlog
0.14.2 is out now with a fix - working here™
mykulyak
Ah, I’d been having the same problem for several days …
Only reverting the ElixirLS plugin to 0.13.x helped. None of 0.14.x versions worked (I’m using VSCode on Mac M1).
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance











