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

After Upgrading to Fedora 32 on multiple machines, ElixirLS won't start #231

Closed
1 of 2 tasks
hamptokr opened this issue May 4, 2020 · 9 comments · Fixed by #403
Closed
1 of 2 tasks

After Upgrading to Fedora 32 on multiple machines, ElixirLS won't start #231

hamptokr opened this issue May 4, 2020 · 9 comments · Fixed by #403

Comments

@hamptokr
Copy link

hamptokr commented May 4, 2020

Environment

  • Elixir & Erlang versions (elixir --version): Elixir 1.9.2 (compiled with Erlang/OTP 22)
  • Operating system: Fedora 32
  • Editor or IDE name (e.g. Emacs/VSCode): VSCode
  • LSP Client name: ElixirLS: Elixir support and debugger
    • If using VSCode, are you using "ElixirLS: Elixir support and debugger"?

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

The .elixir_ls directory never gets created, I assume because the ElixirLS application never starts.

Logs

Creating a new project with mix new empty has the same issue.

Output:

09:08:24.291 [info]  Application elixir_ls_utils exited: :stopped
Started ElixirLS Fork v0.3.3

09:08:24.291 [info]  Application erl2ex exited: :stopped

09:08:24.291 [info]  Application forms exited: :stopped
Elixir version: "1.9.2 (compiled with Erlang/OTP 22)"
Erlang version: "22"
[Warn  - 9:08:24 AM] ** (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" => 27023, "rootPath" => "/home/khampton/work/nucleus", "rootUri" => "file:///home/khampton/work/nucleus", "trace" => "off", "workspaceFolders" => [%{"name" => "nucleus", "uri" => "file:///home/khampton/work/nucleus"}]}}}, 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) lib/gen_server.ex:999: GenServer.call/3
    (elixir) lib/stream.ex:440: anonymous fn/4 in Stream.each/2
    (elixir) lib/stream.ex:1409: Stream.do_resource/5
    (elixir) lib/stream.ex:1583: Enumerable.Stream.do_each/4
    (elixir) lib/stream.ex:646: Stream.run/1
    (stdlib) erl_eval.erl:680: :erl_eval.do_apply/6
    (elixir) lib/code.ex:240: Code.eval_string/3
[Info  - 9:08:24 AM] Connection to server got closed. Server will restart.

Developer console error: The ElixirLS server crashed 5 times in the last 3 minutes. The server will not be restarted.

@axelson
Copy link
Member

axelson commented May 5, 2020

How did you install elixir and erlang? This looks like errors that people have seen with a partial installation of erlang.

@hamptokr
Copy link
Author

hamptokr commented May 5, 2020

On Fedora 31 I used sudo dnf install elixir. The problem arose when I upgraded to Fedora 32. I tried re-installing but same issue. I am able to run phoenix apps and other elixir based tools just fine, but ElixirLS just crashes.

@hamptokr
Copy link
Author

hamptokr commented May 5, 2020

The following packages get installed with that command

erlang-mnesia-22.3.2-1.fc32.x86_64
erlang-runtime_tools-22.3.2-1.fc32.x86_64
erlang-parsetools-22.3.2-1.fc32.x86_64
erlang-asn1-22.3.2-1.fc32.x86_64
erlang-public_key-22.3.2-1.fc32.x86_64
erlang-inets-22.3.2-1.fc32.x86_64
erlang-ssl-22.3.2-1.fc32.x86_64
erlang-tools-22.3.2-1.fc32.x86_64
erlang-sasl-22.3.2-1.fc32.x86_64
elixir-1.9.2-2.fc32.x86_64

@axelson
Copy link
Member

axelson commented May 5, 2020

Are there any other erlang packages available?

@axelson
Copy link
Member

axelson commented May 5, 2020

Especially any that mention dialyzer.

@hamptokr
Copy link
Author

hamptokr commented May 6, 2020

I have the dialyzer package installed as well:
Package erlang-dialyzer-22.3.2-1.fc32.x86_64 is already installed.

@hamptokr
Copy link
Author

hamptokr commented May 6, 2020

Uninstalling the fedora packaged elixir and using kiex to install elixir 1.10.3, fixed the issue. Not sure if we want to leave this issue open? It did not work with elixir 1.9.2 on fedora 32.

@chapmanjacobd
Copy link

If you do sudo dnf install erlang then it will add all the packages that ElixirLS needs

axelson added a commit to axelson/elixir-ls that referenced this issue Nov 14, 2020
axelson added a commit that referenced this issue Nov 14, 2020
@axelson
Copy link
Member

axelson commented Nov 14, 2020

Added a troubleshooting note to the README. Thanks for the report!

axelson added a commit to axelson/elixir-lang.github.com that referenced this issue Mar 11, 2021
There was a person in the Elixir slack today that had trouble trying to
use a dependency that depended on xmerl. The solution for him was `sudo
dnf install erlang-xmerl` (although `sudo dnf install erlang` would have
been better).

I've also seen Fedora users having trouble running ElixirLS if they
don't have a full installation of erlang because they don't have the
`erlang-dialyzer` package:
elixir-lsp/elixir-ls#231

Looking at the latest version of the elixir package for erlang we can
see that the "Requires" list is much smaller than the "BuildRequires"
list:
https://src.fedoraproject.org/rpms/elixir/blob/1118b2d2b1e973ba8188f7e479db174850697b2f/f/elixir.spec

Therefore, for typical Elixir development I believe it is important for
Fedora users to have a full installation of Erlang.
josevalim pushed a commit to elixir-lang/elixir-lang.github.com that referenced this issue Mar 11, 2021
There was a person in the Elixir slack today that had trouble trying to
use a dependency that depended on xmerl. The solution for him was `sudo
dnf install erlang-xmerl` (although `sudo dnf install erlang` would have
been better).

I've also seen Fedora users having trouble running ElixirLS if they
don't have a full installation of erlang because they don't have the
`erlang-dialyzer` package:
elixir-lsp/elixir-ls#231

Looking at the latest version of the elixir package for erlang we can
see that the "Requires" list is much smaller than the "BuildRequires"
list:
https://src.fedoraproject.org/rpms/elixir/blob/1118b2d2b1e973ba8188f7e479db174850697b2f/f/elixir.spec

Therefore, for typical Elixir development I believe it is important for
Fedora users to have a full installation of Erlang.
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

Successfully merging a pull request may close this issue.

3 participants