zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.03k stars 2.96k forks source link

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

Closed noozo closed 3 weeks ago

noozo commented 1 year ago

Check for existing issues

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

kwando commented 1 year ago

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

arosenb2 commented 1 year ago

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"
rkusa commented 1 year ago

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
krns commented 1 year ago

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
moomerman commented 1 year ago

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: "", 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: "", 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: "", 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": [
          ""
        ]
      }
    }
  }
joebno commented 11 months ago

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

luhc228 commented 9 months ago

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

SomeoneToIgnore commented 9 months ago

@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.

luhc228 commented 9 months ago

@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.

ForLoveOfCats commented 9 months ago

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?

jiangshuai1995 commented 9 months ago
image

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

karelbilek commented 8 months ago

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

joshrutkowski commented 8 months ago

Working on adding an LSP and running into the same issue

github-actions[bot] commented 1 month ago

Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. Are you able to reproduce this issue in the latest version of Zed? If so, please let us know by commenting on this issue and we will keep it open; otherwise, we'll close it in a week. Feel free to open a new issue if you're seeing this message after the issue has been closed. Thanks for your help!

github-actions[bot] commented 3 weeks ago

This issue was closed due to inactivity; feel free to open a new issue if you're still experiencing this problem!