zed icon indicating copy to clipboard operation
zed copied to clipboard

[Zed Preview] Elixir language server - failed to deserialize latest release

Open noozo opened this issue 2 years ago • 13 comments

Check for existing issues

  • [X] Completed

Describe the bug / provide steps to reproduce it

When updating to latest zed preview 0.106.0, got this while downloading the Elixir language server.

NOTE: Happens for both elixir-ls and the new experimental next-ls.

Language server error: Elixir

error deserializing latest release

Environment

Zed: v0.106.0 (preview) OS: macOS 14.0.0 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

If you only need the most recent lines, you can run the zed: open log command palette action to see the last 1000.

No response

noozo avatar Sep 28 '23 11:09 noozo

I saw that too with next-ls but it fixed itself somehow, maybe I restarted zed or something like that. 🤷🏻

kwando avatar Sep 28 '23 17:09 kwando

This just happened to me as well. Looks like rate limiting from Github on downloading the release.

2023-10-05T01:12:54 [INFO] starting language server "elixir-ls", path: "/**/*", id: 1
2023-10-05T01:12:54 [ERROR] Error deserializing Github API response text: "{\"message\":\"API rate limit exceeded for {redacted IPv4}. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)\",\"documentation_url\":\"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting\"}\n"

arosenb2 avatar Oct 05 '23 01:10 arosenb2

Same for Rust due to rate limiting:

2023-10-06T08:50:52 [ERROR] Error deserializing Github API response text: "{\"message\":\"API rate limit exceeded for 31.19.74.205. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)\",\"documentation_url\":\"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting\"}\n"
2023-10-06T08:50:52 [ERROR] crates/zed/src/languages/rust.rs:280: no cached binary
2023-10-06T08:50:52 [ERROR] crates/language/src/language.rs:964: error deserializing latest release

rkusa avatar Oct 06 '23 08:10 rkusa

Same for me (elixir-ls). I see multiple occurrences of this:

2023-10-10T10:27:50 [INFO] About to spawn test binary
2023-10-10T10:27:50 [WARN] test binary failed to launch
2023-10-10T10:27:50 [WARN] test binary check failed
2023-10-10T10:27:50 [INFO] beginning to reinstall server
2023-10-10T10:27:50 [INFO] deleting server container
2023-10-10T10:27:50 [INFO] starting language server "elixir-ls", path: "/redacted-path", id: 58
2023-10-10T10:27:50 [ERROR] invalid LSP message header ""
2023-10-10T10:27:50 [ERROR] failed to start language server "elixir-ls": oneshot canceled
2023-10-10T10:27:50 [ERROR] Broken pipe (os error 32)
2023-10-10T10:27:50 [ERROR] server shut down

And finally:

2023-10-10T10:27:52 [ERROR] server shut down
2023-10-10T10:27:52 [ERROR] Broken pipe (os error 32)
2023-10-10T10:27:52 [INFO] About to spawn test binary
2023-10-10T10:27:52 [WARN] test binary failed to launch
2023-10-10T10:27:52 [WARN] test binary check failed
2023-10-10T10:27:52 [INFO] beginning to reinstall server
2023-10-10T10:27:52 [INFO] deleting server container
2023-10-10T10:27:52 [INFO] starting language server "elixir-ls", path: "/redacted-path", id: 61
2023-10-10T10:27:52 [ERROR] Error deserializing Github API response text: "{\"message\":\"API rate limit exceeded for 86.103.57.237. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)\",\"documentation_url\":\"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting\"}\n"
2023-10-10T10:27:52 [ERROR] crates/zed/src/languages/elixir.rs:301: no cached binary
2023-10-10T10:27:52 [ERROR] crates/language/src/language.rs:964: error deserializing latest release

krns avatar Oct 10 '23 10:10 krns

I'm seeing the same as @krns today, I think this might be a different issue to the rate limiting since v1.17.0 was released yesterday it is likely related to that.

When I started Zed this morning I saw it was repeatedly trying to install elixir-ls, here's a snippet of the logs:

View log
2023-10-11T09:43:21 [ERROR] invalid LSP message header ""
2023-10-11T09:43:21 [ERROR] failed to start language server "elixir-ls": oneshot canceled
2023-10-11T09:43:21 [ERROR] server shut down
2023-10-11T09:43:21 [ERROR] Broken pipe (os error 32)
2023-10-11T09:43:21 [INFO] About to spawn test binary
2023-10-11T09:43:21 [WARN] test binary failed to launch
2023-10-11T09:43:21 [WARN] test binary check failed
2023-10-11T09:43:21 [INFO] beginning to reinstall server
2023-10-11T09:43:21 [INFO] deleting server container
2023-10-11T09:43:21 [INFO] starting language server "elixir-ls", path: "<redacted>", id: 7
2023-10-11T09:43:23 [ERROR] invalid LSP message header ""
2023-10-11T09:43:23 [ERROR] failed to start language server "elixir-ls": oneshot canceled
2023-10-11T09:43:23 [ERROR] Broken pipe (os error 32)
2023-10-11T09:43:23 [ERROR] server shut down
2023-10-11T09:43:23 [INFO] About to spawn test binary
2023-10-11T09:43:23 [WARN] test binary failed to launch
2023-10-11T09:43:23 [WARN] test binary check failed
2023-10-11T09:43:23 [INFO] beginning to reinstall server
2023-10-11T09:43:23 [INFO] deleting server container
2023-10-11T09:43:23 [INFO] starting language server "elixir-ls", path: "<redacted>", id: 8
2023-10-11T09:43:24 [ERROR] invalid LSP message header ""
2023-10-11T09:43:24 [ERROR] failed to start language server "elixir-ls": oneshot canceled
2023-10-11T09:43:24 [ERROR] Broken pipe (os error 32)
2023-10-11T09:43:24 [ERROR] server shut down
2023-10-11T09:43:24 [INFO] About to spawn test binary
2023-10-11T09:43:24 [WARN] test binary failed to launch
2023-10-11T09:43:24 [WARN] test binary check failed
2023-10-11T09:43:24 [INFO] beginning to reinstall server
2023-10-11T09:43:24 [INFO] deleting server container

Now I'm getting the rate limited error because it tried so many times I believe.

The logs finish with:

View log
2023-10-11T09:43:55 [ERROR] failed to start language server "elixir-ls": oneshot canceled
2023-10-11T09:43:55 [ERROR] Broken pipe (os error 32)
2023-10-11T09:43:55 [ERROR] server shut down
2023-10-11T09:43:55 [INFO] About to spawn test binary
2023-10-11T09:43:55 [WARN] test binary failed to launch
2023-10-11T09:43:55 [WARN] test binary check failed
2023-10-11T09:43:55 [INFO] beginning to reinstall server
2023-10-11T09:43:55 [INFO] deleting server container
2023-10-11T09:43:55 [INFO] starting language server "elixir-ls", path: "<redacted>", id: 31
2023-10-11T09:43:55 [ERROR] Error deserializing Github API response text: "{\"message\":\"API rate limit exceeded for 157.231.67.161. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)\",\"documentation_url\":\"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting\"}\n"
2023-10-11T09:43:55 [ERROR] crates/zed/src/languages/elixir.rs:301: no cached binary
2023-10-11T09:43:55 [ERROR] crates/language/src/language.rs:964: error deserializing latest release
2023-10-11T09:48:35 [ERROR] unexpected item event after pane was dropped
2023-10-11T09:48:38 [ERROR] oneshot canceled
2023-10-11T09:48:38 [ERROR] oneshot canceled
2023-10-11T09:48:38 [ERROR] oneshot canceled
2023-10-11T09:48:38 [ERROR] oneshot canceled

Workaround for now is to download the latest elixir-ls release somewhere on your machine and add this to your Zed settings:

"elixir": {
    "lsp": {
      "local": {
        "path": "/path/to/elixir-ls/language_server.sh",
        "arguments": [
          ""
        ]
      }
    }
  }

moomerman avatar Oct 11 '23 09:10 moomerman

I've hit rate limit issue for both elixir-ls and next-ls as well. Details:

  1. Opened a different project which uses an older version of Elixir in a new Zed window
  2. Both Zed windows raced through trying to download/install the ElixirLS
  3. Hit the rate limit.
  4. Tried with next-ls and am rate limited there as well.

MacBook Pro M1, Sonoma 14.1

Temp fix by @moomerman has at least got it working for the moment

joebno avatar Nov 08 '23 16:11 joebno

When will this issue fix? I can not develop my rust project now. @JosephTLyons

luhc228 avatar Jan 28 '24 11:01 luhc228

@luhc228 what has Rust project to do with Elixir LSP issues from 2023? Please share more details, and if it's indeed related to Rust, in another issue.

SomeoneToIgnore avatar Jan 28 '24 11:01 SomeoneToIgnore

@luhc228 what has Rust project to do with Elixir LSP issues from 2023? Please share more details, and if it's indeed related to Rust, in another issue.

I am sorry. But I think my problem is like this issue. My error is:

image

I will comment in another issue. Thanks.

luhc228 avatar Jan 28 '24 13:01 luhc228

We made a change a few months ago to avoid re-attempting to install a language server too many times so I'm surprised to see we're still getting rate limited. What Zed version are you running? Did multiple language servers fail to install?

ForLoveOfCats avatar Jan 29 '24 16:01 ForLoveOfCats

image

This is my first time using zed, same error with golang.

jiangshuai1995 avatar Jan 30 '24 02:01 jiangshuai1995

First time using zed, having same issue with golang LSP server.

karelbilek avatar Feb 20 '24 09:02 karelbilek

Working on adding an LSP and running into the same issue

joshrutkowski avatar Feb 25 '24 05:02 joshrutkowski