SPrio-kt

SPrio-kt

ElixirLS Keep Crashing in vs-code

Error Log Output:

Started ElixirLS v0.5.0
Elixir version: "1.10.4 (compiled with Erlang/OTP 21)"
Erlang version: "23"
ElixirLS compiled with Elixir 1.7.4 and erlang 20
MIX_ENV: test
MIX_TARGET: 
[Info  - 5:28:41 pm] Compile took 572 milliseconds
[Info  - 5:28:41 pm] [ElixirLS WorkspaceSymbols] Indexing...
[Info  - 5:28:41 pm] [ElixirLS Dialyzer] Checking for stale beam files
[Info  - 5:28:41 pm] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info  - 5:28:41 pm] [ElixirLS WorkspaceSymbols] 20 callbacks added to index
[Info  - 5:28:41 pm] [ElixirLS Dialyzer] Found 0 changed files in 62 milliseconds
[Info  - 5:28:41 pm] [ElixirLS Dialyzer] Analyzing 0 modules: []
[Info  - 5:28:41 pm] [ElixirLS Dialyzer] Analysis finished in 220 milliseconds
[Info  - 5:28:41 pm] [ElixirLS WorkspaceSymbols] 232 modules added to index
[Info  - 5:28:41 pm] Dialyzer analysis is up to date
[Info  - 5:28:42 pm] [ElixirLS Dialyzer] Writing manifest...
[Info  - 5:28:43 pm] [ElixirLS WorkspaceSymbols] 300 types added to index
[Info  - 5:28:44 pm] [ElixirLS Dialyzer] Done writing manifest in 2983 milliseconds.
[Info  - 5:28:48 pm] [ElixirLS WorkspaceSymbols] 4546 functions added to index
MIX_ENV: test
MIX_TARGET: 
[Info  - 5:28:50 pm] Compile took 238 milliseconds
[Info  - 5:28:50 pm] [ElixirLS WorkspaceSymbols] Updating index...
[Info  - 5:28:50 pm] [ElixirLS Dialyzer] Checking for stale beam files
[Info  - 5:28:50 pm] [ElixirLS WorkspaceSymbols] 0 modules need reindexing
[Info  - 5:28:50 pm] [ElixirLS WorkspaceSymbols] 0 modules added to index
[Info  - 5:28:50 pm] [ElixirLS WorkspaceSymbols] 0 functions added to index
[Info  - 5:28:50 pm] [ElixirLS WorkspaceSymbols] 0 types added to index
[Info  - 5:28:50 pm] [ElixirLS WorkspaceSymbols] 0 callbacks added to index
[Info  - 5:28:50 pm] [ElixirLS Dialyzer] Found 0 changed files in 29 milliseconds
[Info  - 5:28:50 pm] [ElixirLS Dialyzer] Analyzing 0 modules: []
[Info  - 5:28:50 pm] [ElixirLS Dialyzer] Analysis finished in 39 milliseconds
[Info  - 5:28:50 pm] Dialyzer analysis is up to date
MIX_ENV: test
MIX_TARGET: 

17:28:51.898 [error] GenServer ElixirLS.LanguageServer.Server terminating
** (Mix.Error) Unknown dependency :ecto_sql given to :import_deps in the formatter configuration. The dependency is not listed in your mix.exs for environment :test
    (mix 1.10.4) lib/mix.ex:392: Mix.raise/1
    (mix 1.10.4) lib/mix/tasks/format.ex:246: anonymous fn/3 in Mix.Tasks.Format.eval_deps_opts/2
    (elixir 1.10.4) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
    (mix 1.10.4) lib/mix/tasks/format.ex:245: Mix.Tasks.Format.eval_deps_opts/2
    (mix 1.10.4) lib/mix/tasks/format.ex:201: anonymous fn/5 in Mix.Tasks.Format.eval_deps_and_subdirectories/4
    (mix 1.10.4) lib/mix/tasks/format.ex:276: anonymous fn/2 in Mix.Tasks.Format.eval_subs_opts/3
    (elixir 1.10.4) lib/enum.ex:1094: anonymous fn/3 in Enum.flat_map_reduce/3
    (elixir 1.10.4) lib/enum.ex:3686: Enumerable.List.reduce/3
Last message: {:"$gen_cast", {:receive_packet, %{"id" => 9, "jsonrpc" => "2.0", "method" => "textDocument/completion", "params" => %{"context" => %{"triggerKind" => 3}, "position" => %{"character" => 44, "line" => 69}, "textDocument" => %{"uri" => "file:///home/supriyo/dev/phoenix_projects/crm_notification/test/crm_notification/customers_test.exs"}}}}}
State: %ElixirLS.LanguageServer.Server{analysis_ready?: false, awaiting_contracts: [{{#PID<0.470.0>, #Reference<0.2850066277.2806513666.35501>}, "file:///home/supriyo/dev/phoenix_projects/crm_notification/test/crm_notification/customers_test.exs"}, {{#PID<0.349.0>, #Reference<0.2850066277.2806513666.28787>}, "file:///home/supriyo/dev/phoenix_projects/crm_notification/test/crm_notification/customers_test.exs"}], build_diagnostics: [], build_ref: #Reference<0.2850066277.2806513666.35516>, build_running?: true, client_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}}, dialyzer_diagnostics: [], dialyzer_sup: #PID<0.125.0>, load_all_modules?: false, needs_build?: false, project_dir: "/home/supriyo/dev/phoenix_projects/crm_notification", received_shutdown?: false, requests: %{8 => #PID<0.470.0>}, root_uri: "file:///home/supriyo/dev/phoenix_projects/crm_notification", server_instance_id: "zfmoIDr4kUwoAFRNKk0HFnhqyVuLFGY-", settings: %{"dialyzerEnabled" => true, "dialyzerFormat" => "dialyxir_long", "dialyzerWarnOpts" => [], "fetchDeps" => true, "mixEnv" => "test", "mixTarget" => "", "projectDir" => "", "suggestSpecs" => true, "trace" => %{"server" => "off"}}, source_files: %{"file:///home/supriyo/dev/phoenix_projects/crm_notification/test/crm_notification/accounts_test.exs" => %ElixirLS.LanguageServer.SourceFile{dirty?: false, text: "defmodule CrmNotification.AccountsTest do\n  use CrmNotification.DataCase\n\n  alias Ecto.Changeset\n  alias CrmNotification.{Accounts, Accounts.User}\n\n  @valid_attrs %{\n    email: \"user@example.com\",\n    name: \"Example User\",\n    password: \"password\",\n    password_confirmation: \"password\",\n    role: \"staff\"\n  }\n\n  @update_attrs %{\n    email: \"test_user2@crm.com\",\n    name: \"test_user2\",\n    password: \"password1\",\n    password_confirmation: \"password1\",\n    role: \"admin\"\n  }\n\n  @invalid_attrs %{\n    email: \"invalid\",\n    name: \"\",\n    password: \"\",\n    password_confirmation: \"\",\n    role: \"invalid\"\n  }\n\n  describe \"list_user/0\" do\n    test \"returns all users\" do\n      user1 = insert!(:user)\n      user2 = insert!(:user)\n\n      user_list = Accounts.list_users()\n\n      id_list = Enum.map(user_list, fn %{id: id} -> id end)\n      assert id_list == Enum.sort(id_list)\n      assert user_list = [user1, user2]\n    end\n  end\n\n  describe \"get_user/1\" do\n    test \"returns the user with valid user id\" do\n      user = insert!(:user)\n      assert Accounts.get_user(user.id) == user\n    end\n\n    test \"returns nil with invalid user id\" do\n      refute Accounts.get_user(-1)\n    end\n  end\n\n  describe \"get_user!/1\" do\n    test \"returns the user with valid user id\" do\n      user = insert!(:user)\n      assert Accounts.get_user!(user.id) == user\n    end\n\n    test \"get_user!/1 raise Ecto.NoResultsError with invalid user id\" do\n      assert_raise Ecto.NoResultsError, fn ->\n        Accounts.get_user!(1)\n      end\n    end\n  end\n\n  describe \"get_user_by_email/1\" do\n    test \"returns the user with valid user email\" do\n      user = insert!(:user)\n      assert Accounts.get_user_by_email(user.email) == user\n    end\n\n    test \"get_user_by_email/1 returns nil with invalid user id\" do\n      refute Accounts.get_user_by_email(@invalid_attrs.email)\n    end\n  end\n\n  describe \"get_user_by_email_and_password/1\" do\n    test \"returns the user with valid user email and password combination\" do\n      user = insert!(:user)\n\n      assert Accounts.get_user_by_email_and_password(user.email, @valid_attrs.password) == user\n    end\n\n    test \"get_user_by_email_and_password/1 returns nil with invalid password\" do\n      insert!(:user, @valid_attrs)\n\n      refute Accounts.get_user_by_email_and_pa (truncated)
[Warn  - 5:28:52 pm] ** (exit) exited in: GenServer.call(ElixirLS.LanguageServer.JsonRpc, {:packet, %{"jsonrpc" => "2.0", "method" => "$/cancelRequest", "params" => %{"id" => 8}}}, 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.4) lib/gen_server.ex:1013: GenServer.call/3
    (elixir 1.10.4) lib/stream.ex:441: anonymous fn/4 in Stream.each/2
    (elixir 1.10.4) lib/stream.ex:1449: Stream.do_element_resource/6
    (elixir 1.10.4) lib/stream.ex:1609: Enumerable.Stream.do_each/4
    (elixir 1.10.4) lib/stream.ex:649: Stream.run/1
    (stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
[Error - 5:28:52 pm] Connection to server got closed. Server will not be restarted.
[Error - 5:28:52 pm] Request textDocument/codeLens failed.
Error: Connection got disposed.
    at Object.dispose (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/main.js:904:25)
    at Object.dispose (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/client.js:74:35)
    at LanguageClient.handleConnectionClosed (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/client.js:2309:42)
    at LanguageClient.handleConnectionClosed (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/main.js:155:15)
    at closeHandler (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/client.js:2296:18)
    at CallbackList.invoke (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:62:39)
    at Emitter.fire (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:121:36)
    at closeHandler (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/main.js:240:26)
    at CallbackList.invoke (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:62:39)
    at Emitter.fire (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:121:36)
    at StreamMessageWriter.fireClose (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/messageWriter.js:39:27)
    at Socket.<anonymous> (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/messageWriter.js:58:46)
    at Socket.emit (events.js:203:13)
    at Pipe.<anonymous> (net.js:588:12)
[Error - 5:28:52 pm] Request textDocument/completion failed.
Error: Connection got disposed.
    at Object.dispose (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/main.js:904:25)
    at Object.dispose (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/client.js:74:35)
    at LanguageClient.handleConnectionClosed (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/client.js:2309:42)
    at LanguageClient.handleConnectionClosed (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/main.js:155:15)
    at closeHandler (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/client.js:2296:18)
    at CallbackList.invoke (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:62:39)
    at Emitter.fire (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:121:36)
    at closeHandler (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/main.js:240:26)
    at CallbackList.invoke (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:62:39)
    at Emitter.fire (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:121:36)
    at StreamMessageWriter.fireClose (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/messageWriter.js:39:27)
    at Socket.<anonymous> (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/messageWriter.js:58:46)
    at Socket.emit (events.js:203:13)
    at Pipe.<anonymous> (net.js:588:12)
[Error - 5:28:52 pm] Request textDocument/codeLens failed.
Error: Connection got disposed.
    at Object.dispose (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/main.js:904:25)
    at Object.dispose (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/client.js:74:35)
    at LanguageClient.handleConnectionClosed (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/client.js:2309:42)
    at LanguageClient.handleConnectionClosed (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/main.js:155:15)
    at closeHandler (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-languageclient/lib/client.js:2296:18)
    at CallbackList.invoke (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:62:39)
    at Emitter.fire (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:121:36)
    at closeHandler (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/main.js:240:26)
    at CallbackList.invoke (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:62:39)
    at Emitter.fire (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/events.js:121:36)
    at StreamMessageWriter.fireClose (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/messageWriter.js:39:27)
    at Socket.<anonymous> (/home/supriyo/.vscode/extensions/jakebecker.elixir-ls-0.5.0/node_modules/vscode-jsonrpc/lib/messageWriter.js:58:46)
    at Socket.emit (events.js:203:13)
    at Pipe.<anonymous> (net.js:588:12)

Most Liked

aptinio

aptinio

I’ve fixed a lot of problems with ElixirLS by deleting the .elixir_ls folder as described here. They usually happen after ElixirLS gets updated.

factoryd

factoryd

I’m experiencing the same issue. This seems to have started with a recent update. It bites me pretty hard after switching branches with different deps. Of course, a simple rm -rf ./.elixir_ls fixes this issue. But the 3-5 minutes to rebuild the project for the “special” ElixirLS build directory is a drag.

It is definitely a hinderance. But it is something I’ve learned to live with for the immense productivity boost I get with this tool.

Aside: I hate that auto-complete stopped working with underscores.

Example:

In a guard, I used to be able to type isbin, hit tab and it would autocomplete is_binary. Now after typing is, if I don’t specify _, I lose all guidance. That is also a drag :slight_smile:

axelson

axelson

Scenic Core Team

That was changed in: Remove keywords from completions by axelson · Pull Request #259 · elixir-lsp/elixir-ls · GitHub

The reason was to avoid some very bad completions, such as:
82835207-10d99c80-9e5f-11ea-82b1-b745707ecf74

We would accept a PR that makes the isIncomplete: true setting configurable.

Where Next?

Popular in Discussions Top

PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39247 209
New
crabonature
I’m still quite new to Elixir. As I understand we got in Elixir “multi guards” as convention to simplify one large guard with or’s?: de...
New
New
jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
jsonify
So, is Heroku the only free option for hosting Phoenix/Elixir at this point? I’m not ready to commit to paying monthly and was wondering ...
New
und0ck3d
Hello everyone! A few days ago I’ve created a topic here about how people were creating CMSs with Elixir and Phoenix. I’ve been studying...
New
griffinbyatt
Sobelow Sobelow is a security-focused static analysis tool for the Phoenix framework. For security researchers, it is a useful tool for g...
New

Other popular topics Top

stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
RisingFromAshes
I've read in another post that it may be possible with a router helper - but I couldn't find an appropriate one, and tbh, I'm still just ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

We're in Beta

About us Mission Statement