You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ erl -version
Erlang (SMP,ASYNC_THREADS,HIPE) (BEAM) emulator version 11.2
Troubleshooting
Restart your editor (which will restart ElixirLS) sometimes fixes issues
Stop your editor, remove the entire .elixir_ls directory, then restart your editor
NOTE: This will cause you to have to re-run the dialyzer build for your project
If you're experiencing high CPU usage, it is most likely Dialyzer building the PLTs; after it's done the CPU usage should go back to normal. You could also disable Dialyzer in the settings.
Logs
If using a client other than VS Code, please try VSCode's "ElixirLS: Elixir support and debugger" extension. Does it reproduce your failure?
Create a new Mix project with mix new empty, then open that project with VS Code and open an Elixir file. Is your issue reproducible on the empty project? If not, please publish a repo on Github that does reproduce it.
Check the output log by opening View > Output and selecting "ElixirLS" in the dropdown. Please include any output that looks relevant. (If ElixirLS isn't in the dropdown, the server failed to launch.)
Check the developer console by opening Help > Toggle Developer Tools and include any errors that look relevant.
I have the Problem, that ElixirLS tries to build the core Dialyzer Elixir PLT but fails with following error in the output window:
Started ElixirLS v0.7.0
Elixir version: "1.11.4 (compiled with Erlang/OTP 23)"
Erlang version: "23"
ElixirLS compiled with Elixir 1.8.2 and erlang 21
MIX_ENV: test
MIX_TARGET:
Compiling 1 file (.ex)
Generated empty app
[Info - 10:14:13 PM] Compile took 290 milliseconds
[Info - 10:14:13 PM] [ElixirLS WorkspaceSymbols] Indexing...
[Info - 10:14:13 PM] [ElixirLS Dialyzer] Checking for stale beam files
[Info - 10:14:13 PM] [ElixirLS Dialyzer] Found 7 changed files in 3 milliseconds
[Info - 10:14:13 PM] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info - 10:14:13 PM] [ElixirLS WorkspaceSymbols] 54 callbacks added to index
[Info - 10:14:14 PM] [ElixirLS WorkspaceSymbols] 377 modules added to index
[Info - 10:14:14 PM] [ElixirLS WorkspaceSymbols] 414 types added to index
[Info - 10:14:16 PM] [ElixirLS WorkspaceSymbols] 6743 functions added to index
22:14:30.961 [error] Task #PID<0.124.0> started from #PID<0.123.0> terminating
** (stop) {:nocatch, {:dialyzer_error, 'Analysis failed with error:\nCould not scan the following file(s):\n Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/unicode_util.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/win32reg.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/zip.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/sys.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/uri_string.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/sofs.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/unicode.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/timer.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/supervisor_bridge.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/supervisor.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/shell.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/string.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/sets.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/slave.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/re.beam\n Recompile with +debug_info or an' ++ ...}}
dialyzer_cl.erl:699: :dialyzer_cl.cl_error/2
dialyzer_cl.erl:401: :dialyzer_cl.do_analysis/4
dialyzer.erl:160: :dialyzer.run/1
(language_server 0.7.0) lib/language_server/dialyzer/manifest.ex:146: ElixirLS.LanguageServer.Dialyzer.Manifest.build_elixir_plt/0
(language_server 0.7.0) lib/language_server/dialyzer/manifest.ex:14: anonymous fn/1 in ElixirLS.LanguageServer.Dialyzer.Manifest.build_new_manifest/0
(elixir 1.11.4) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
(stdlib 3.14.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: #Function<2.129723316/0 in ElixirLS.LanguageServer.Dialyzer.Manifest.build_new_manifest/0>
Args: []
22:14:47.162 [error] Task #PID<0.1242.0> started from #PID<0.1241.0> terminating
** (stop) {:nocatch, {:dialyzer_error, 'Analysis failed with error:\nCould not scan the following file(s):\n Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/win32reg.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/sys.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/slave.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/uri_string.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/unicode_util.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/zip.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/unicode.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/supervisor.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/sets.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/supervisor_bridge.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/string.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/sofs.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/random.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/timer.beam\n Recompile with +debug_info or analyze starting from source code Could not get Core Erlang code for: /home/jakob/.local/opt/elixir/bin/../lib/mix/tmp/Mix.Tasks.ReleaseTest/test validates compile_env/_build/dev/rel/compile_env_config/lib/stdlib-3.14.1/ebin/shell_docs.beam\n Recompile with +debug_i' ++ ...}}
dialyzer_cl.erl:699: :dialyzer_cl.cl_error/2
dialyzer_cl.erl:401: :dialyzer_cl.do_analysis/4
dialyzer.erl:160: :dialyzer.run/1
(language_server 0.7.0) lib/language_server/dialyzer/manifest.ex:146: ElixirLS.LanguageServer.Dialyzer.Manifest.build_elixir_plt/0
(language_server 0.7.0) lib/language_server/dialyzer/manifest.ex:14: anonymous fn/1 in ElixirLS.LanguageServer.Dialyzer.Manifest.build_new_manifest/0
(elixir 1.11.4) lib/task/supervised.ex:90: Task.Supervised.invoke_mfa/2
(stdlib 3.14.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Function: #Function<2.129723316/0 in ElixirLS.LanguageServer.Dialyzer.Manifest.build_new_manifest/0>
Args: []
The error repeats every 15 Seconds. I can reproduce the issue with an new Mix project. I have checked the developer console, but did not found any relevant erros.
Thanks in advance for the help!
The text was updated successfully, but these errors were encountered:
Thanks for the quick response!
After looking into my Elixir installation directory i found out, that my Elixir and Erlang installation was broken and this resulted in the error I posted.
After removing both installations and reinstalling them, now the Dialyzer works like a charm!
Environment
Erlang/OTP 23 [erts-11.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [hipe]
Elixir 1.11.4 (compiled with Erlang/OTP 23)
n/a ManjaroLinux "Manjaro Linux" 21.0.1 Ornara
CoenraadS.bracket-pair-colorizer
dbaeumer.vscode-eslint
eamodio.gitlens
formulahendry.auto-rename-tag
geeebe.duplicate
GraphQL.vscode-graphql
JakeBecker.elixir-ls
lukas-tr.materialdesignicons-intellisense
octref.vetur
vincaslt.highlight-matching-tag
Troubleshooting
Restart your editor (which will restart ElixirLS) sometimes fixes issues
Stop your editor, remove the entire
.elixir_ls
directory, then restart your editorIf you're experiencing high CPU usage, it is most likely Dialyzer building the PLTs; after it's done the CPU usage should go back to normal. You could also disable Dialyzer in the settings.
Logs
mix new empty
, then open that project with VS Code and open an Elixir file. Is your issue reproducible on the empty project? If not, please publish a repo on Github that does reproduce it.View > Output
and selecting "ElixirLS" in the dropdown. Please include any output that looks relevant. (If ElixirLS isn't in the dropdown, the server failed to launch.)Help > Toggle Developer Tools
and include any errors that look relevant.I have the Problem, that ElixirLS tries to build the core Dialyzer Elixir PLT but fails with following error in the output window:
The error repeats every 15 Seconds. I can reproduce the issue with an new Mix project. I have checked the developer console, but did not found any relevant erros.
Thanks in advance for the help!
The text was updated successfully, but these errors were encountered: