ElixirLS VSCode plugin crashing

Hi, I installed the VS Code Elixir Plugin from https://marketplace.visualstudio.com/items?itemName=JakeBecker.elixir-ls

After opening any Elixir project I get the message that the ElixirLS server has crashed 5 times in 3 minutes.

I tried seaching for the error message but nothing useful came up.

Printed in VS Code’s output is:

14:12:46.313 [info]  Application elixir_ls_utils exited: :stopped
Started ElixirLS Fork v0.3.3

14:12:46.314 [info]  Application erl2ex exited: :stopped

14:12:46.314 [info]  Application forms exited: :stopped
Elixir version: "1.10.2 (compiled with Erlang/OTP 21)"
Erlang version: "22"
[Warn  - 14:12:46] ** (exit) exited in: GenServer.call(ElixirLS.LanguageServer.JsonRpc, {:packet, %{"id" => 0, "jsonrpc" => "2.0", "method" => "initialize", "params" => %{"capabilities" => %{"textDocument" => %{"codeAction" => %{"codeActionLiteralSupport" => %{"codeActionKind" => %{"valueSet" => ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration" => true, "isPreferredSupport" => true}, "codeLens" => %{"dynamicRegistration" => true}, "colorProvider" => %{"dynamicRegistration" => true}, "completion" => %{"completionItem" => %{"commitCharactersSupport" => true, "deprecatedSupport" => true, "documentationFormat" => ["markdown", "plaintext"], "preselectSupport" => true, "snippetSupport" => true, "tagSupport" => %{"valueSet" => [1]}}, "completionItemKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]}, "contextSupport" => true, "dynamicRegistration" => true}, "declaration" => %{"dynamicRegistration" => true, "linkSupport" => true}, "definition" => %{"dynamicRegistration" => true, "linkSupport" => true}, "documentHighlight" => %{"dynamicRegistration" => true}, "documentLink" => %{"dynamicRegistration" => true, "tooltipSupport" => true}, "documentSymbol" => %{"dynamicRegistration" => true, "hierarchicalDocumentSymbolSupport" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}}, "foldingRange" => %{"dynamicRegistration" => true, "lineFoldingOnly" => true, "rangeLimit" => 5000}, "formatting" => %{"dynamicRegistration" => true}, "hover" => %{"contentFormat" => ["markdown", "plaintext"], "dynamicRegistration" => true}, "implementation" => %{"dynamicRegistration" => true, "linkSupport" => true}, "onTypeFormatting" => %{"dynamicRegistration" => true}, "publishDiagnostics" => %{"relatedInformation" => true, "tagSupport" => %{"valueSet" => [1, 2]}, "versionSupport" => false}, "rangeFormatting" => %{"dynamicRegistration" => true}, "references" => %{"dynamicRegistration" => true}, "rename" => %{"dynamicRegistration" => true, "prepareSupport" => true}, "selectionRange" => %{"dynamicRegistration" => true}, "signatureHelp" => %{"contextSupport" => true, "dynamicRegistration" => true, "signatureInformation" => %{"documentationFormat" => ["markdown", "plaintext"], "parameterInformation" => %{"labelOffsetSupport" => true}}}, "synchronization" => %{"didSave" => true, "dynamicRegistration" => true, "willSave" => true, "willSaveWaitUntil" => true}, "typeDefinition" => %{"dynamicRegistration" => true, "linkSupport" => true}}, "window" => %{"workDoneProgress" => true}, "workspace" => %{"applyEdit" => true, "configuration" => true, "didChangeConfiguration" => %{"dynamicRegistration" => true}, "didChangeWatchedFiles" => %{"dynamicRegistration" => true}, "executeCommand" => %{"dynamicRegistration" => true}, "symbol" => %{"dynamicRegistration" => true, "symbolKind" => %{"valueSet" => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26]}}, "workspaceEdit" => %{"documentChanges" => true, "failureHandling" => "textOnlyTransactional", "resourceOperations" => ["create", "rename", "delete"]}, "workspaceFolders" => true}}, "clientInfo" => %{"name" => "vscode", "version" => "1.44.2"}, "processId" => 14646, "rootPath" => "/home/martin/source/groma84@github.com/filesize-elixir-ix", "rootUri" => "file:///home/martin/source/groma84%40github.com/filesize-elixir-ix", "trace" => "off", "workspaceFolders" => [%{"name" => "filesize-elixir-ix", "uri" => "file:///home/martin/source/groma84%40github.com/filesize-elixir-ix"}]}}}, 5000)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.10.2) lib/gen_server.ex:1013: GenServer.call/3
    (elixir 1.10.2) lib/stream.ex:441: anonymous fn/4 in Stream.each/2
    (elixir 1.10.2) lib/stream.ex:1449: Stream.do_element_resource/6
    (elixir 1.10.2) lib/stream.ex:1609: Enumerable.Stream.do_each/4
    (elixir 1.10.2) lib/stream.ex:649: Stream.run/1
    (stdlib 3.12.1) erl_eval.erl:680: :erl_eval.do_apply/6
[Info  - 14:12:46] Connection to server got closed. Server will restart.

I am using Linux Mint 19.3 and I’d really appreciate a pointer in a direction I could further research to get the plugin working.

Try this one instead. I don’t think that is being maintained.

https://marketplace.visualstudio.com/items?itemName=elixir-lsp.elixir-ls

1 Like

Jake gave control over his plugin to the forks maintainers, therefore currently both vscode plugins deliver the same stuff, and one of both will eventually be deprecated officially.

Therefore, if one plugin works, while the other doesn’t, please file a bug report at https://github.com/elixir-lsp/vscode-elixir-ls

1 Like

From what I’ve read the fork has recently been “merged back” into the non-fork version.
I tried the fork just to make sure and sadly got the same error.

It seems as if a bug has already been filed:

2 Likes

Nice, thanks for the info. I only looked into the issues of the original project it seems, not the fork.
So I consider my question answered and will wait for an update.

The originals project issue tracker and repository will indeed become deprecated soon, if they aren’t already, at least thats the plan as far as I understood it.

The elixir-lsp organisation on GitHub shall become the canonical resource for elixir-ls related things.

The thing that has not yet been decided upon is, how to process with the namespaces on the VScode plugin market place.

1 Like

What OS are you using? And what versions of Elixir and Erlang? Do you get any errors in the ElixirLS output?

To followup here it seems that this was caused by an incomplete erlang install when using Erlang Solution’s repositories. Running sudo apt install esl-erlang should fix it (as described in the Ubuntu installation instructions at https://elixir-lang.org/install.html#unix-and-unix-like)

2 Likes