Error using LSP: `Erlang error: {:erpc, :noconnection}`
Environment:
OS: Mac OS Tahoe & Sequoia (another person here next to me has the same issue)
Elixir: 1.18.4
Erlang: 27.1.2
Editor: Zed & Neovim (same error)
Installation Method: Both the gh CLI & building from source
Affected components: any call to the LSP it appears.
Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(xp_expert 0.1.0-04cd32c) lib/expert/code_intelligence/completion.ex:84: XPExpert.CodeIntelligence.Completion.completions/3
(xp_expert 0.1.0-04cd32c) lib/expert/code_intelligence/completion.ex:36: XPExpert.CodeIntelligence.Completion.complete/4
(xp_expert 0.1.0-04cd32c) lib/expert/provider/handlers/completion.ex:21: XPExpert.Provider.Handlers.Completion.handle/2
(xp_expert 0.1.0-04cd32c) lib/expert.ex:90: XPExpert.handle_request/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3
I'm aware this is a nightly build and hiccups are to be expected, so thanks once again for all your hard work, hopefully this issue is helpful! I'm at your disposal if you need any other information, and apologies if I didn't install it right, it is very possible 😆
Zed configuration:
"lsp": {
"elixir-ls": {
"binary": {
"path": "/Users/zachdaniel/dev/oss/expert/expert_darwin_arm64",
"arguments": ["start"] # tried with and without this
}
// "settings": {
// "dialyzerEnabeld": true,
// "incrementalDialyzer": true,
// "enableTestLenses": false,
// "fetchDeps": false
// }
}
},
Looks like this doesn't happen in a new small package, but it does happen in the Ash codebase (sorry).
"languages": {
"Elixir": {
"language_servers": ["expert"]
}
},
This is the setup that works now for the smaller project as of the latest elixir extension release.
Can reproduce this error when elixir 1.14.3 is used in a project (asdf set elixir 1.14.3).
With asdf set elixir 1.18.4 everything works as expected.
Erlang: 26.2.2
Same error for me. Adding some info in case this could help OS: MacOS Sequoia 15.5 Expert: compiled with Elixir 1.16.3, Erlang/OTP 26 Project: compiled with Elixir 1.16.3, Erlang/OTP 26
Using Neovim:
** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 9.2.4.6) erpc.erl:710: :erpc.call/5
(xp_expert 0.1.0) lib/expert/provider/handlers/hover.ex:27: XPExpert.Provider.Handlers.Hover.handle/2
(xp_expert 0.1.0) lib/expert.ex:94: XPExpert.handle_request/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /Users/simonricard/Dev/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_ telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4
(elixir 1.16.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2"
Thanks again for your work! ❤️
Same error with larger codebase.
Zed Preview 0.202.2 Elixir 1.18.4 (compiled with Erlang/OTP 27) Erlang/OTP 27 [erts-15.2.7] MacOS Sequoia 15.6.1 nightly build installed by Zed Extension
Configuration in Zed:
"languages": {
"Elixir": {
"language_servers": [
"expert",
"!elixir-ls",
"!next-ls",
"!lexical",
"..."
]
// "format_on_save": {
// "external": {
// "command": "mix",
// "arguments": ["format", "--stdin-filename", "{buffer_path}", "-"]
// }
// }
}
},
When I uncomment "format_on_save", it's complaining about unknown command mix. Not sure if it's issue in Zed or in expert.
Same with manual build from main, see log:
07:30:01.161 [debug] sent notification server -> client window/logMessage
07:30:01.161 [debug] handled request client -> server textDocument/definition in 182µs
07:30:01.209 [debug] sent notification server -> client window/logMessage
07:30:01.209 [debug] handled request client -> server textDocument/definition in 150µs
07:30:01.211 [debug] handled notification client -> server $/cancelRequest in 37µs
07:30:01.504 [debug] sent notification server -> client window/logMessage
07:30:01.504 [debug] handled request client -> server textDocument/definition in 178µs
07:30:01.612 [debug] handled notification client -> server $/cancelRequest in 80µs
07:30:01.713 [debug] sent notification server -> client window/logMessage
07:30:01.713 [debug] handled request client -> server textDocument/codeAction in 417µs
07:30:01.723 [debug] sent notification server -> client window/logMessage
07:30:01.723 [debug] handled request client -> server textDocument/hover in 220µs
07:30:01.847 [debug] sent notification server -> client window/logMessage
07:30:01.847 [debug] handled request client -> server textDocument/definition in 289µs
07:30:01.984 [debug] handled notification client -> server $/cancelRequest in 113µs
07:30:02.188 [debug] handled notification client -> server $/cancelRequest in 70µs
07:30:02.207 [error] ** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(elixir 1.17.3) lib/enum.ex:987: Enum."-each/2-lists^foreach/1-0-"/2
(xp_expert 0.1.0-57abaff) lib/expert/state.ex:196: XPExpert.State.apply/2
(xp_expert 0.1.0-57abaff) lib/expert.ex:200: XPExpert.apply_to_state/2
(xp_expert 0.1.0-57abaff) lib/expert.ex:139: XPExpert.handle_notification/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:528: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:524: anonymous fn/4 in XPGenLSP.loop/3
07:30:02.207 [debug] sent notification server -> client window/logMessage
07:30:02.207 [warning] client -> server notification crashed
07:30:02.208 [error] ** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(xp_expert 0.1.0-57abaff) lib/expert/state.ex:171: XPExpert.State.apply/2
(xp_expert 0.1.0-57abaff) lib/expert.ex:200: XPExpert.apply_to_state/2
(xp_expert 0.1.0-57abaff) lib/expert.ex:139: XPExpert.handle_notification/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:528: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:524: anonymous fn/4 in XPGenLSP.loop/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4
07:30:02.208 [debug] sent notification server -> client window/logMessage
07:30:02.208 [warning] client -> server notification crashed
07:30:03.846 [debug] handled notification client -> server $/cancelRequest in 230µs
07:30:03.849 [error] ** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(elixir 1.17.3) lib/enum.ex:987: Enum."-each/2-lists^foreach/1-0-"/2
(xp_expert 0.1.0-57abaff) lib/expert/state.ex:196: XPExpert.State.apply/2
(xp_expert 0.1.0-57abaff) lib/expert.ex:200: XPExpert.apply_to_state/2
(xp_expert 0.1.0-57abaff) lib/expert.ex:139: XPExpert.handle_notification/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:528: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:524: anonymous fn/4 in XPGenLSP.loop/3
07:30:03.849 [debug] sent notification server -> client window/logMessage
07:30:03.849 [warning] client -> server notification crashed
07:30:03.869 [error] ** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(xp_expert 0.1.0-57abaff) lib/expert/state.ex:171: XPExpert.State.apply/2
(xp_expert 0.1.0-57abaff) lib/expert.ex:200: XPExpert.apply_to_state/2
(xp_expert 0.1.0-57abaff) lib/expert.ex:139: XPExpert.handle_notification/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:528: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:524: anonymous fn/4 in XPGenLSP.loop/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4
07:30:03.869 [debug] sent notification server -> client window/logMessage
07:30:03.869 [warning] client -> server notification crashed
07:30:12.446 [debug] handled notification client -> server workspace/didChangeConfiguration in 144µs
07:30:12.456 [debug] handled notification client -> server workspace/didChangeConfiguration in 98µs
07:30:18.465 [debug] handled notification client -> server $/cancelRequest in 149µs
07:30:18.839 [debug] sent notification server -> client window/logMessage
07:30:18.839 [debug] handled request client -> server textDocument/codeAction in 1ms
FYI I changed manually what Zed use:
~/Library/Application Support/Zed/extensions/work/elixir/expert-nightly
❯ lsa
total 64936
drwxr-xr-x@ 6 oliverkriska staff 192B Aug 29 07:26 .
drwxr-xr-x@ 3 oliverkriska staff 96B Aug 29 06:45 ..
drwxr-xr-x@ 3 oliverkriska staff 96B Aug 29 07:26 .expert
lrwxr-xr-x@ 1 oliverkriska staff 79B Aug 29 07:26 expert -> /Users/oliverkriska/Projects/expert/apps/expert/burrito_out/expert_darwin_arm64
-rwxr-xr-x@ 1 oliverkriska staff 31M Aug 29 06:45 expert-n
expert-darwin-arm64 by just release-local from current main(b984bcbd), and I got similar error
myapp (expert): ** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.6) erpc.erl:1376: :erpc.call/5
(xp_expert 0.1.0) lib/expert/code_intelligence/completion.ex:84: XPExpert.CodeIntelligence.Completion.completions/3
(xp_expert 0.1.0) lib/expert/code_intelligence/completion.ex:36: XPExpert.CodeIntelligence.Completion.complete/4
(xp_expert 0.1.0) lib/expert/provider/handlers/completion.ex:21: XPExpert.Provider.Handlers.Completion.handle/2
(xp_expert 0.1.0) lib/expert.ex:94: XPExpert.handle_request/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /Users/falood/Codes/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3
and epmd -names returns
epmd: up and running on port 4369 with data:
name manager-myapp-5348 at port 53514
Sorry, kinda a big post,
The second time Expert invokes elixir, $PATH has been wrapped in ' quotes, which prevents it from being correctly interpreted as a PATH specification.
This wrapping removes erl from the $PATH causing a startup failure. This is probably only visible when running mise or asdf as when installing to a system path, erl is still discovered by other means (?).
I have been using b984bcb (built) and 57abaff (nightly). I have no trouble running erl directly from the shell (fish). I have tried installing a few versions of elixir and erlang.
Yes this is manually written even though I appear to have LLM subheadings.
Checking for the error
I noticed that tucked away in all the noconnection noise was a failure to run erl:
nvim lib/file.ex :LspLog and search for exec: erl: not found
or
helix -v lib/file.ex :log-open and seach for exec: erl: not found
Is everyone using mise or asdf?
Note the writing of this error was perhaps a bit sporadic? Perhaps Expert does not always log the failure depending on a race or something. To be clear, Expert would never work, but the error was not always in the log. Maybe it always gets written and I was just quitting too early.
Debugging
I edited /home/<USER>/.local/share/mise/installs/elixir/1.17.3-otp-27/bin/elixir (nvim $(which elixir) in posix) and added the following near the end, just before the exec call:
echo "INVOCATION" >> /tmp/expert-elixir-cmd
echo "which-erl: $(which erl)" >> /tmp/expert-elixir-cmd
echo "type -a erl: $(type -a erl)" >> /tmp/expert-elixir-cmd
echo "$@" >> /tmp/expert-elixir-cmd
echo "PATH is >>$PATH<<" >> /tmp/expert-elixir-cmd
echo "" >> /tmp/expert-elixir-cmd
I also edited erl (nvim (which erl)) and put this at the very start:
echo "INVOCATION $@" >> /tmp/expert-erl-cmd
# echo $(env) >> /tmp/cmd-erl-path
echo $PATH >> /tmp/expert-erl-cmd
echo "" >> /tmp/expert-erl-cmd
Then start your editor & lsp, note that /tmp/expert-elixir-cmd exists, /tmp/expert-erl-cmd does not. I could run the target commands in my shell. These all ran without issue. (Does require manually wrapping the command for -e Node.connect... in quotes.)
Bandaid
If I manually link erl into the system path via
sudo ln -s /home/<USER>/.local/share/mise/installs/erlang/27.3.4.2/bin/erl /usr/local/bin/erl
then Expert functions in neovim and helix without trouble, so that "solves" the "cant exec erl" and "noconnection" issue which is caused by the server never running, so its some kind of $PATH issue.
Thinking...
We can be sure that the mise installed elixir command is running because we see the output in /tmp/expert-elixir-cmd. So we know the editor can run expert, and expert can find elixir in the correct place, but then finding erl somehow gets disrupted.
We can also be sure that when the system path link (/usr/local/bin/erl) is installed our mise installed erl is run (via the symlink) because we see the output in /tmp/expert-erl-cmd, so there is no issue of Expert trying to run some "shipped" executable.
Again, I swear I am a human writing this and they just sound like us.
So examining /tmp/expert-elixir-cmd (Run without the erl symlink!!!) shows something weird, we have two invocations, the first runs fine, erl is picked up in the mise location (as returned by which erl), the second invocation has somehow nuked erl:
INVOCATION
which-erl: /home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin/erl
type -a erl: erl is /home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin/erl
erl -noshell -elixir_root /home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin/../lib -pa /home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin/../lib/elixir/ebin -s elixir start_cli -extra /home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/lib/xp_expert-0.1.0/priv/build_engine.exs --source-path /home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/lib/xp_expert-0.1.0/priv/engine_source/apps/engine --vsn 0.1.0
/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/erts-15.2.7.1/bin:/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/bin:/home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/.mix/escripts:/home/soup/.local/share/mise/installs/node/24.4.0/bin:/home/soup/.local/share/mise/installs/zig/0.14.1/bin:/home/soup/.local/share/mise/installs/usage/2.2.2:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/flatpak/exports/bin
INVOCATION
which-erl:
type -a erl:
erl -noshell -elixir_root /home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin/../lib -pa /home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin/../lib/elixir/ebin -s elixir start_cli -name [email protected] -setcookie expert -extra --no-halt -e Node.connect(:"[email protected]") -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/mix_install/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/patch/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_bunt/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_credo/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_elixir_sense/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_engine/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_file_system/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_forge/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_gen_lsp/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_jason/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_nimble_options/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_nimble_parsec/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_path_glob/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_refactorex/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_schematic/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_snowflake/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_sourceror/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_telemetry/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_typed_struct/ebin
'/home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/.mix/escripts:/home/soup/.local/share/mise/installs/node/24.4.0/bin:/home/soup/.local/share/mise/installs/zig/0.14.1/bin:/home/soup/.local/share/mise/installs/usage/2.2.2:/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/erts-15.2.7.1/bin:/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/flatpak/exports/bin'
Note the differences in the $PATH outputs. The first has burrito in it, and the second doesn't. And, hang on, is that a dust on my screen?
PATH is >>/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/erts-15.2.7.1/bin:/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/bin:/home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/.mix/escripts:/home/soup/.local/share/mise/installs/node/24.4.0/bin:/home/soup/.local/share/mise/installs/zig/0.14.1/bin:/home/soup/.local/share/mise/installs/usage/2.2.2:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/flatpak/exports/bin<<
PATH is >>'/home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/.mix/escripts:/home/soup/.local/share/mise/installs/node/24.4.0/bin:/home/soup/.local/share/mise/installs/zig/0.14.1/bin:/home/soup/.local/share/mise/installs/usage/2.2.2:/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/erts-15.2.7.1/bin:/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/flatpak/exports/bin'<<
The second $PATH is a has ' characters wrapping it, probably preventing correct interpretation.
We can test fixing this by removing any surrounding quotes from $PATH:
PATH=${PATH%\'}
PATH=${PATH#\'}
echo "INVOCATION" >> /tmp/expert-elixir-cmd
echo "which-erl: $(which erl)" >> /tmp/expert-elixir-cmd
echo "type -a erl: $(type -a erl)" >> /tmp/expert-elixir-cmd
echo "$@" >> /tmp/expert-elixir-cmd
echo "PATH is >>$PATH<<" >> /tmp/expert-elixir-cmd
echo "" >> /tmp/expert-elixir-cmd
exec "$@"
Now rerunning (remember, remove the /usr/local/bin symlink), we can see:
INVOCATION
which-erl: /home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin/erl
type -a erl: erl is /home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin/erl
erl -noshell -elixir_root /home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin/../lib -pa /home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin/../lib/elixir/ebin -s elixir start_cli -extra /home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/lib/xp_expert-0.1.0/priv/build_engine.exs --source-path /home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/lib/xp_expert-0.1.0/priv/engine_source/apps/engine --vsn 0.1.0
PATH is >>/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/erts-15.2.7.1/bin:/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/bin:/home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/.mix/escripts:/home/soup/.local/share/mise/installs/node/24.4.0/bin:/home/soup/.local/share/mise/installs/zig/0.14.1/bin:/home/soup/.local/share/mise/installs/usage/2.2.2:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/flatpak/exports/bin<<
INVOCATION
which-erl: /home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin/erl
type -a erl: erl is /home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin/erl
erl -noshell -elixir_root /home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin/../lib -pa /home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin/../lib/elixir/ebin -s elixir start_cli -name [email protected] -setcookie expert -extra --no-halt -e Node.connect(:"[email protected]") -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/mix_install/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/patch/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_bunt/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_credo/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_elixir_sense/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_engine/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_file_system/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_forge/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_gen_lsp/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_jason/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_nimble_options/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_nimble_parsec/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_path_glob/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_refactorex/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_schematic/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_snowflake/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_sourceror/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_telemetry/ebin -pa /home/soup/.local/share/Expert/0.1.0/elixir-1.17.3-erts-15.2.7.1/68796f60c69715a3d1164a6b83e51e36/_build/dev_ns/lib/xp_typed_struct/ebin
PATH is >>/home/soup/.local/share/mise/installs/erlang/27.3.4.2/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/bin:/home/soup/.local/share/mise/installs/elixir/1.17.3-otp-27/.mix/escripts:/home/soup/.local/share/mise/installs/node/24.4.0/bin:/home/soup/.local/share/mise/installs/zig/0.14.1/bin:/home/soup/.local/share/mise/installs/usage/2.2.2:/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/erts-15.2.7.1/bin:/home/soup/.local/share/.burrito/expert_erts-15.2.7.1_0.1.0/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/flatpak/exports/bin<<
It works!
As to where this happens, I am not sure but it's probably a dead easy mistake to make. The path is altered at some point by burrito, perhaps it does not put it back nicely?
Similar errors to above and in a large codebase, but we're running on Elixir 1.17.3:
2025-08-29T09:34:58-06:00 ERROR [project] Get definition via expert failed: ** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(xp_expert 0.1.0-57abaff) lib/expert/provider/handlers/go_to_definition.ex:17: XPExpert.Provider.Handlers.GoToDefinition.handle/2
(xp_expert 0.1.0-57abaff) lib/expert.ex:94: XPExpert.handle_request/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4
(elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
@zachdaniel @salfum can you try again with the latest main when you get a sec? I'm not able to reproduce it with Zed and ash anymore
Also for everyone, can you specify how was elixir/erlang install in your systems? asdf, mise, something else?
I’ve tried with both mise and nix on MacOS and I’ve had the same result for both. I’ll try the main branch a bit later tonight and report back
@doorgan main branch fixed it for me 🔥🔥
OS: Arch Linux, AMD64
Elixir: 1.18.4
Erlang: 28.0.2
Editor: Neovim
Installation Method: gh CLI
Nightly revision: c5cd0fc
Path/tool manager: mise
Still getting the problem, when trying to start:
** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(xp_expert 0.1.0-c5cd0fc) lib/expert/state.ex:122: XPExpert.State.apply/2
(xp_expert 0.1.0-c5cd0fc) lib/expert.ex:200: XPExpert.apply_to_state/2
(xp_expert 0.1.0-c5cd0fc) lib/expert.ex:139: XPExpert.handle_notification/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:528: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:524: anonymous fn/4 in XPGenLSP.loop/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4
This error was fixed in zed for me but is still happening in neovim, both when using lexical with a path and when using the new expert option from Mason.
Elixir installed with mise.
OS: Ubuntu, AMD64 Elixir: 1.18.3 Erlang: 27.3 Editor: Neovim Installation Method: Downloaded nightly release from GH Nightly revision: https://github.com/elixir-lang/expert/commit/3f5914a98ff6b6b28508c0329ecf8b92adc0f947
Tried to go to a function definition:
13:32:01.856 [error] ** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(xp_expert 0.1.0-3f5914a) lib/expert/provider/handlers/go_to_definition.ex:17: XPExpert.Provider.Handlers.GoToDefinition.handle/2
(xp_expert 0.1.0-3f5914a) lib/expert.ex:94: XPExpert.handle_request/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4
(elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
The updated main branch didn't solve the issue for me, neither using Zed or Neovim.
OS: MacOS Sequoia 15.5,
Elixir: 1.18.1
Erlang: 27.3
Built with: Elixir 1.16.3, Erlang/OTP 25
Editor: Neovim/Zed
Installation Method: Built locally from main branch.
Commit: https://github.com/elixir-lang/expert/commit/3f5914a98ff6b6b28508c0329ecf8b92adc0f947
Zed
"lsp": {
"expert": {
"binary": {
"path": "/Users/simonricard/Dev/expert/apps/expert/burrito_out/expert_darwin_arm64"
}
}
},
"languages": {
"Elixir": {
"language_servers": ["expert", "!elixir-ls", "!next-ls", "!lexical"]
}
},
Neovim
vim.lsp.config('expert', {
cmd = { '/Users/simonricard/Dev/expert/apps/expert/burrito_out/expert_darwin_arm64' },
root_markers = { 'mix.exs', '.git' },
filetypes = { 'elixir', 'eelixir', 'heex' },
})
vim.lsp.enable 'expert'
It seems to be intermittent. I've had the same setup work/not work. Could very easily be user error and I wish I had more info, will supply it as soon as anything concrete comes up.
Fantastic work, but unfortunately I also suffers from this, so just to chime in.
OS: macOS 15.6.1 (24G90)
Erlang/OTP 27 [erts-15.2.7] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Elixir 1.17.3 (compiled with Erlang/OTP 27)
Editor: GNU Emacs 30.1 / Doom
Installation Method: Built locally from main branch (70f34f0)
Elixir and Erlang installed with asdf
Config
(after! (lsp-mode elixir-ts-mode)
(add-hook! 'lsp-elixir-server-command '("~/.local/bin/expert_darwin_arm64")))
Error
** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.3.2) erpc.erl:1388: :erpc.call/5
(xp_expert 0.1.0) lib/expert/state.ex:171: XPExpert.State.apply/2
(xp_expert 0.1.0) lib/expert.ex:200: XPExpert.apply_to_state/2
(xp_expert 0.1.0) lib/expert.ex:139: XPExpert.handle_notification/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:528: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /Users/<username>/.local/src/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:524: anonymous fn/4 in XPGenLSP.loop/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4
Hi everyone, first of all, thank you for your effort in building this fantastic project.
Tried to use the expert LS through the Zed editor for different projects, failing due to the following errors:
** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(xp_expert 0.1.0-c5cd0fc) lib/expert/state.ex:171: XPExpert.State.apply/2
(xp_expert 0.1.0-c5cd0fc) lib/expert.ex:200: XPExpert.apply_to_state/2
(xp_expert 0.1.0-c5cd0fc) lib/expert.ex:139: XPExpert.handle_notification/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:528: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:524: anonymous fn/4 in XPGenLSP.loop/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4
** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(elixir 1.17.3) lib/enum.ex:987: Enum."-each/2-lists^foreach/1-0-"/2
(xp_expert 0.1.0-c5cd0fc) lib/expert/state.ex:196: XPExpert.State.apply/2
(xp_expert 0.1.0-c5cd0fc) lib/expert.ex:200: XPExpert.apply_to_state/2
(xp_expert 0.1.0-c5cd0fc) lib/expert.ex:139: XPExpert.handle_notification/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:528: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:524: anonymous fn/4 in XPGenLSP.loop/3
There is always this initial log:
Finding or building engine for project <project_name>
And nothing else other than the errors above, or the ignoring messages like this one:
Received request textDocument/codeAction before the engine was initialized. Ignoring.
Server Info (Extracted from Zed):
* Server: expert (id 7)
* Binary: LanguageServerBinary {
path: "/home/REDACTED/.local/share/zed/extensions/work/elixir/expert-nightly/expert",
arguments: [],
env: Some(
{
"COLORTERM": "truecolor",
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
"DEBUGINFOD_IMA_CERT_PATH": "/etc/keys/ima:",
"DEBUGINFOD_URLS": "https://debuginfod.fedoraproject.org/ ",
"DESKTOP_SESSION": "gnome",
"DESKTOP_STARTUP_ID": "REDACTED",
"DISPLAY": ":0",
"EDITOR": "/usr/bin/nano",
"ERL_AFLAGS": "-kernel shell_history enabled",
"GDMSESSION": "gnome",
"GDM_LANG": "en_US.UTF-8",
"GIO_LAUNCHED_DESKTOP_FILE": "/home/REDACTED/.local/share/applications/dev.zed.Zed-Preview.desktop",
"GIO_LAUNCHED_DESKTOP_FILE_PID": "11316",
"GJS_DEBUG_OUTPUT": "stderr",
"GJS_DEBUG_TOPICS": "JS ERROR;JS LOG",
"GNOME_SETUP_DISPLAY": ":1",
"GPG_TTY": "not a tty",
"HISTCONTROL": "ignoredups",
"HISTSIZE": "1000",
"HOME": "/home/REDACTED",
"HOMEBREW_CELLAR": "/home/linuxbrew/.linuxbrew/Cellar",
"HOMEBREW_PREFIX": "/home/linuxbrew/.linuxbrew",
"HOMEBREW_REPOSITORY": "/home/linuxbrew/.linuxbrew/Homebrew",
"HOSTNAME": "fedora",
"INFOPATH": "/home/linuxbrew/.linuxbrew/share/info:/home/linuxbrew/.linuxbrew/share/info:/home/linuxbrew/.linuxbrew/share/info:/home/linuxbrew/.linuxbrew/share/info:",
"INVOCATION_ID": "REDACTED",
"JOURNAL_STREAM": "9:34970",
"KDEDIRS": "/usr",
"KERL_BUILD_DOCS": "yes",
"LANG": "en_US.UTF-8",
"LD_LIBRARY_PATH": "",
"LESSOPEN": "||/usr/bin/lesspipe.sh %s",
"LOGNAME": "REDACTED",
"MAIL": "/var/spool/mail/REDACTED",
"MANAGERPID": "2816",
"MEMORY_PRESSURE_WATCH": "/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/[email protected]/memory.pressure",
"MEMORY_PRESSURE_WRITE": "REDACTED",
"MIX_ENV": "test",
"MOZ_GMP_PATH": "/usr/lib64/mozilla/plugins/gmp-gmpopenh264/system-installed",
"OLDPWD": "/home/REDACTED",
"PATH": "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/REDACTED/.asdf/shims:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/REDACTED/.asdf/shims:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/REDACTED/.asdf/shims:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/REDACTED/.local/bin:/home/REDACTED/bin:/home/REDACTED/.asdf/shims:/usr/local/bin:/usr/bin",
"PWD": "/home/REDACTED/Workspace/REDACTED",
"QT_IM_MODULE": "ibus",
"SESSION_MANAGER": "local/unix:@/tmp/.ICE-unix/2943,unix/unix:/tmp/.ICE-unix/2943",
"SHELL": "/bin/bash",
"SHLVL": "4",
"SSH_ASKPASS": "REDACTED",
"SSH_AUTH_SOCK": "/run/user/1000/keyring/ssh",
"SYSTEMD_EXEC_PID": "3010",
"TERM": "alacritty",
"USER": "REDACTED",
"USERNAME": "REDACTED",
"WAYLAND_DISPLAY": "wayland-0",
"XAUTHORITY": "/run/user/1000/.mutter-Xwaylandauth.6MXFC3",
"XDG_ACTIVATION_TOKEN": "REDACTED",
"XDG_CURRENT_DESKTOP": "GNOME",
"XDG_DATA_DIRS": "/home/REDACTED/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/",
"XDG_MENU_PREFIX": "gnome-",
"XDG_RUNTIME_DIR": "/run/user/1000",
"XDG_SESSION_CLASS": "user",
"XDG_SESSION_DESKTOP": "gnome",
"XDG_SESSION_TYPE": "wayland",
"XMODIFIERS": "@im=ibus",
"ZED_ENVIRONMENT": "worktree-shell",
"ZED_FORCE_CLI_MODE": "",
"_": "/home/REDACTED/.local/zed-preview.app/libexec/zed-editor",
},
),
}
* Registered workspace folders:
/home/REDACTED/Workspace/REDACTED
* Capabilities: {
"textDocumentSync": {
"openClose": true,
"change": 2,
"save": true
},
"hoverProvider": true,
"completionProvider": {
"triggerCharacters": [
".",
"@",
"&",
"%",
"^",
":",
"!",
"-",
"~"
]
},
"definitionProvider": true,
"referencesProvider": true,
"documentSymbolProvider": true,
"workspaceSymbolProvider": true,
"codeActionProvider": {
"codeActionKinds": [
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.fixAll",
"source.organizeImports"
],
"resolveProvider": false
},
"codeLensProvider": {
"resolveProvider": false
},
"documentFormattingProvider": true,
"executeCommandProvider": {
"commands": [
"Reindex"
]
}
}
* Configuration: {}
I additionally found this error message in Neovim's LSP log (~/.local/state/nvim/lsp.log):
[ERROR][2025-09-03 11:02:30] ...p/_transport.lua:36 "rpc" "/tmp/expert/apps/expert/_build/prod/rel/expert/bin/expert" "stderr" "Protocol 'inet_tcp': the name expert@gefjon seems to be in use by another Erlang node\n"
Maybe a/the reason for the failing RPC call? 🤷
I think that Zed's extension may not properly be picking up new nightly releases. You may need to download the latest nightly manually and point zed at it.
I also get the same error, even with the latest build (3f5914a)
2025-09-03T15:31:53+02:00 WARN [project::lsp_store] Get hover via expert failed: ** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(xp_expert 0.1.0-3f5914a) lib/expert/provider/handlers/hover.ex:27: XPExpert.Provider.Handlers.Hover.handle/2
(xp_expert 0.1.0-3f5914a) lib/expert.ex:94: XPExpert.handle_request/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4
(elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2
With server info (from zed)
* Server: expert (id 13)
* Binary: LanguageServerBinary {
path: "/Users/REDACTED/Library/Application Support/Zed/extensions/work/elixir/expert-nightly/expert",
arguments: [],
env: Some(
{
"ASDF_DIR": "/opt/homebrew/opt/asdf/libexec",
"COMMAND_MODE": "unix2003",
"HOME": "/Users/REDACTED",
"HOMEBREW_CELLAR": "/opt/homebrew/Cellar",
"HOMEBREW_PREFIX": "/opt/homebrew",
"HOMEBREW_REPOSITORY": "/opt/homebrew",
"INFOPATH": "/opt/homebrew/share/info:/opt/homebrew/share/info:",
"LOGNAME": "REDACTED",
"LaunchInstanceID": "3B016517-2A44-4069-9414-65644E35CA4C",
"OLDPWD": "/",
"PATH": "/Users/REDACTED/.asdf/shims:/opt/homebrew/opt/asdf/libexec/bin:/opt/homebrew/opt/postgresql@15/bin:/opt/homebrew/opt/postgresql@15/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/opt/homebrew/opt/postgresql@15/bin:/Users/REDACTED/.orbstack/bin:/Users/REDACTED/.orbstack/bin",
"PWD": "/Users/REDACTED/Documents/personal/project",
"SECURITYSESSIONID": "186ad",
"SHELL": "/bin/zsh",
"SHLVL": "0",
"SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.Vv0X7LKDl7/Listeners",
"TMPDIR": "/var/folders/kr/02b4k_kx5dxgr8df5zlnxmfr0000gn/T/",
"USER": "REDACTED",
"XPC_FLAGS": "0x0",
"XPC_SERVICE_NAME": "0",
"ZED_ENVIRONMENT": "worktree-shell",
"_": "/Applications/Zed.app/Contents/MacOS/zed",
"__CFBundleIdentifier": "dev.zed.Zed",
"__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x0",
},
),
}
* Registered workspace folders:
/Users/REDACTED/Documents/personal/project
* Capabilities: {
"textDocumentSync": {
"openClose": true,
"change": 2,
"save": true
},
"hoverProvider": true,
"completionProvider": {
"triggerCharacters": [
".",
"@",
"&",
"%",
"^",
":",
"!",
"-",
"~"
]
},
"definitionProvider": true,
"referencesProvider": true,
"documentSymbolProvider": true,
"workspaceSymbolProvider": true,
"codeActionProvider": {
"codeActionKinds": [
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.fixAll",
"source.organizeImports"
],
"resolveProvider": false
},
"codeLensProvider": {
"resolveProvider": false
},
"documentFormattingProvider": true,
"executeCommandProvider": {
"commands": [
"Reindex"
]
}
}
* Configuration: {}
using latest nightly, still getting this error in Neovim
Was wondering what's happening with my setup and found this issue. It worked for me perfectly (Emacs & eglot). I switched from asdf to mise recently (that's the only change) and it stopped working completely:
11:57:05.825 [error] ** (ErlangError) Erlang error: {:erpc, :noconnection}
(kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5
(elixir 1.18.4) lib/enum.ex:987: Enum."-each/2-lists^foreach/1-0-"/2
(xp_expert 0.1.0) lib/expert/state.ex:196: XPExpert.State.apply/2
(xp_expert 0.1.0) lib/expert.ex:200: XPExpert.apply_to_state/2
(xp_expert 0.1.0) lib/expert.ex:139: XPExpert.handle_notification/2
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:528: anonymous fn/2 in XPGenLSP.loop/3
(xp_telemetry 1.3.0) /home/zrzka/projects/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3
(xp_gen_lsp 0.11.0) lib/gen_lsp.ex:524: anonymous fn/4 in XPGenLSP.loop/3
11:57:05.825 [debug] sent notification server -> client window/logMessage
11:57:05.825 [warning] client -> server notification crashed
- Elixir 1.18.4
- Erlang 28.0.2
- Emacs GNU Emacs 30.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.2) of 2025-08-17
- Expert 6c5cbe981c96e47422307f8a195306d69d2edcdc &
release-local
Same error as above using homebrew on macOS with VS Code. Followed the VS Code config instructions and pointed Lexical at the local release of expert.
- Elixir 1.18.4
- Erlang 28.0.2
- VS Code Version: 1.103.2
- Expert e9d69dd34c49eef4061c6cc010930a99c616e908 &
release-local
I encountered the same issue with Zed and asdf on macOS.
I uninstalled asdf completely and switched to Mise. I also reinstalled Zed and cleaned my project by removing folders like _build. This resolved the problem for me.
Initially, I encountered the same Erlang error: {:erpc, :noconnection} error with Mise and the fresh Zed installation. I ran mix deps.get and started the application. Then it started to work.
- Elixir 1.18.4
- Erlang 28.0.2
- Zed 0.203.5
- Mise 2025.9.9
- Expert installed via Zed
(installed Zed and Mise via Homebrew)
Note that it works on another machine with asdf (same OS, Elixir, Erlang and Zed version). So I guess this is not related to asdf as some people using Mise encounter the same issue.
I was able to resolve my case. I had both asdf and mise installed, except only mise was activated, expert failed to parse an error message.
I removed my previous message to decrease pollution. Tip: check .expert/expert.log on the project root for more detailed diagnosis data. Here's what the exposed error messages to neovim look like ({:erpc, :noconnection}):
Lsp Log (minus timestamps and log level)
LSP logging initiated
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "** (ErlangError) Erlang error: {:erpc, :noconnection}\n (kernel 10.2.7.1) erpc.erl:1376: :erpc.call/5\n (xp_expert 0.1.0-db67ba9) lib/expert/provider/handlers/document_symbols.ex:15: XPExpert.Provider.Handlers.DocumentSymbols.handle/2\n (xp_expert 0.1.0-db67ba9) lib/expert.ex:94: XPExpert.handle_request/2\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:372: anonymous fn/2 in XPGenLSP.loop/3\n (xp_telemetry 1.3.0) /home/runner/work/expert/expert/apps/expert/deps/telemetry/src/telemetry.erl:324: :xp_telemetry.span/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:371: anonymous fn/5 in XPGenLSP.loop/3\n (xp_gen_lsp 0.11.0) lib/gen_lsp.ex:601: anonymous fn/4 in XPGenLSP.attempt/4\n (elixir 1.17.3) lib/task/supervised.ex:101: Task.Supervised.invoke_mfa/2\n"
...lsp/handlers.lua:562 "handling server specific request XPGenLSP.Requests.Shutdown"
I'm not sure if this is an issue with the version of asdf (latest at the time of writing: 0.18.0) or some issue related to asdf not being activated by my shell. But the particular issue is involved with this output that expert fails to parse:
> asdf env elixir && echo Good || echo Bad
Bad
The solution for now is to remove asdf as the current expert check does not cover this case.
I filed the following issue for the particular case of the error handling - https://github.com/elixir-lang/expert/issues/128
I ran into this issue as well and did a bit of digging. @badosu's comment was what helped me to finally get it working. It was indeed something with asdf, not really sure what
I switched to mise completely, reshimmed everything but things were still broken. Went ahead and completely unlinked asdf (brew unlink asdf), and Zed finally picked expert up
I just tried to completely remove asdf, to only have mise installed. Expert now works for me.
I ran into this issue as well and did a bit of digging. @badosu's comment was what helped me to finally get it working. It was indeed something with asdf, not really sure what
I describe it in more detail in https://github.com/elixir-lang/expert/issues/128, basically just having asdf available in the $PATH breaks it. (Edit: clarity)