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

Frequent Crashes Reported By Elixir LS #885

Closed
apoorv-2204 opened this issue May 10, 2023 · 14 comments
Closed

Frequent Crashes Reported By Elixir LS #885

apoorv-2204 opened this issue May 10, 2023 · 14 comments

Comments

@apoorv-2204
Copy link

apoorv-2204 commented May 10, 2023

https://elixirforum.com/t/frequent-crashes-reported-by-elixir-ls/57038

Precheck

** There is frequent crashes of elixir ls ,on vscode **
Due to which cant use the features provided by elixir ls.

The standard debugging measures taken are:

  • enable ,disable , install , uninstall , elixir ls extension
  • restart vs code
  • delete .elixir_ls, _build
  • mix deps.get , mix dep.compile. mix deps.clean,etc
an exception was raised:
    ** (UndefinedFunctionError) function Proxy.Mixfile.project/0 is undefined (module Proxy.Mixfile is not available)
        Proxy.Mixfile.project()
        (mix 1.14.1) lib/mix/project.ex:838: Mix.Project.get_project_config/1
        (mix 1.14.1) lib/mix/project.ex:141: Mix.Project.push/3
        (mix 1.14.1) lib/mix/project.ex:785: Mix.Project.load_project/2
        (mix 1.14.1) lib/mix/project.ex:389: Mix.Project.in_project/4
        (elixir 1.14.1) lib/file.ex:1607: File.cd!/2
        (language_server 0.15.1) lib/language_server/build.ex:83: anonymous fn/3 in ElixirLS.LanguageServer.Build.reload_project/0
        (stdlib 4.2) maps.erl:411: :maps.fold_1/3
an exception was raised:
** (UndefinedFunctionError) function Tzdata.Mixfile.project/0 is undefined (module Tzdata.Mixfile is not available)
Tzdata.Mixfile.project()
(mix 1.14.1) lib/mix/project.ex:838: Mix.Project.get_project_config/1
(mix 1.14.1) lib/mix/project.ex:141: Mix.Project.push/3
(mix 1.14.1) lib/mix/project.ex:785: Mix.Project.load_project/2
(mix 1.14.1) lib/mix/project.ex:389: Mix.Project.in_project/4
(elixir 1.14.1) lib/file.ex:1607: File.cd!/2
(language_server 0.15.1) lib/language_server/build.ex:83: anonymous fn/3 in ElixirLS.LanguageServer.Build.reload_project/0
(stdlib 4.2) maps.erl:411: :maps.fold_1/3ElixirLS

Kernel.defmodule(alias, do_block) view on hexdocs

Defines a module given by name with the given contents.

This macro defines a module with the given alias as its name and with the given contents. It returns a tuple with four elements:

:module
the module name
the binary contents of the module
the result of evaluating the contents block
** (UndefinedFunctionError) function OpentelemetryLoggerMetadata.MixProject.project/0 is undefined (module OpentelemetryLoggerMetadata.MixProject is not available)
        OpentelemetryLoggerMetadata.MixProject.project()
        (mix 1.14.3) lib/mix/project.ex:838: Mix.Project.get_project_config/1
        (mix 1.14.3) lib/mix/project.ex:141: Mix.Project.push/3
        (mix 1.14.3) lib/mix/project.ex:785: Mix.Project.load_project/2
        (mix 1.14.3) lib/mix/project.ex:389: Mix.Project.in_project/4
        (elixir 1.14.3) lib/file.ex:1607: File.cd!/2
        (language_server 0.14.6) lib/language_server/build.ex:83: anonymous fn/3 in ElixirLS.LanguageServer.Build.reload_project/0
        (stdlib 4.2) maps.erl:411: :maps.fold_1/3

Environment

  • Elixir & Erlang versions (elixir --version):
    elixir 1.14.1-otp-25
    erlang 25.2.2

  • Elixir Language Server version:
    latest extension on vscode

  • Operating system:
    22.04

  • Editor or IDE name (e.g. Emacs/VSCode):
    VSCode

  • Editor Plugin/LSP Client name and version:

Current behavior

Expected behavior

@lukaszsamson
Copy link
Collaborator

Please post a repro steps or a project that reproduces it

@lukaszsamson
Copy link
Collaborator

ping @apoorv-2204

@apoorv-2204 apoorv-2204 closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2023
@apoorv-2204 apoorv-2204 changed the title Elixir Crashes due to :ssl_verify_fun Frequent Crashes Reported By Elixir LS Jul 13, 2023
@apoorv-2204 apoorv-2204 reopened this Jul 13, 2023
@apoorv-2204
Copy link
Author

apoorv-2204 commented Jul 13, 2023

Please post a repro steps or a project that reproduces it

If I find one I will do so! I can’t share the repo I am working on (its proprietary code)

@lukaszsamson
Copy link
Collaborator

A minimal repo and repro steps will do

@APB9785
Copy link

APB9785 commented Jul 21, 2023

I've had this issue on every single repo I've ever used ElixirLS with.

Even a brand new project with mix phx.new will reproduce this issue consistently.

@lukaszsamson
Copy link
Collaborator

I've had this issue on every single repo I've ever used ElixirLS with.

@APB9785 I can't help without repro steps. I'm not experiencing it on any of the repos I work with. Please post a minimal repo

@lukaszsamson
Copy link
Collaborator

Even a brand new project with mix phx.new will reproduce this issue consistently.

@APB9785 works for me, no crashes
Screenshot 2023-07-21 at 17 38 41

Fill out the bug template. Provide versions and detailed repro steps. Otherwise feel free to clone the repo and create a PR with a failing test

@apoorv-2204
Copy link
Author

image

@lukaszsamson
Copy link
Collaborator

lukaszsamson commented Jul 21, 2023

image

@apoorv-2204 That's not a bug. Please install OTP with doc chunks or build from source with correct flags if you want full documentation support for erlang stdlib.

@apoorv-2204
Copy link
Author

    ** (File.Error) could not set current working directory to "/home/apoorv-2204/Documents/aenode/deps/inet_cidr": no such file or directory
        (elixir 1.14.1) lib/file.ex:1580: File.cd!/1
        (elixir 1.14.1) lib/file.ex:1604: File.cd!/2
        (language_server 0.15.1) lib/language_server/build.ex:83: anonymous fn/3 in ElixirLS.LanguageServer.Build.reload_project/0
        (stdlib 4.1.1) maps.erl:411: :maps.fold_1/3
        (language_server 0.15.1) lib/language_server/build.ex:81: ElixirLS.LanguageServer.Build.reload_project/0
        (language_server 0.15.1) lib/language_server/build.ex:20: anonymous fn/3 in ElixirLS.LanguageServer.Build.build/3
        (stdlib 4.1.1) timer.erl:235: :timer.tc/1
        (language_server 0.15.1) lib/language_server/build.ex:14: anonymous fn/3 in ElixirLS.LanguageServer.Build.build/3```

@lukaszsamson
Copy link
Collaborator

@apoorv-2204 Did you delete deps directory while ElixirLS is building?

This is not getting anywhere. Either post a concrete repro steps or I'm closing that

@apoorv-2204
Copy link
Author

Yes I did several times

@lukaszsamson
Copy link
Collaborator

A crash is expected in that situation

@lukaszsamson
Copy link
Collaborator

We can add a try/rescue in that call but don't expect software to work if you delete files it's trying to read. If you delete deps during mix compile it will crash as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants