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

failed to start language server "next-ls" error #6351

Closed
1 task done
slashmili opened this issue Oct 27, 2023 · 4 comments · Fixed by #3181
Closed
1 task done

failed to start language server "next-ls" error #6351

slashmili opened this issue Oct 27, 2023 · 4 comments · Fixed by #3181
Labels
defect [core label] language server failure Language server doesn't work as expected language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors

Comments

@slashmili
Copy link

slashmili commented Oct 27, 2023

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I have the following settings

{
  "elixir": {
    "lsp": "next_ls"
  }
}

When I run zed, it fails to start the language server

I've checked and it seems that zed couldn't download(or extract) next-ls because this directory is empty :

ls -l -d "/Users/user/Library/Application Support/Zed/languages/next-ls"
drwxr-xr-x  3 user  staff  96 Oct 27 10:19 /Users/milad/Library/Application Support/Zed/languages/next-ls/

Environment

Zed: v0.109.2 (stable)
OS: macOS 14.0.0
Memory: 32 GiB
Architecture: x86_64

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.

2023-10-27T06:20:09 [INFO] 0 unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2023-10-27T06:20:09.040Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2023-10-27T06:20:09.040Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2023-10-27T06:20:12 [ERROR] oneshot canceled
2023-10-27T08:13:10 [INFO] ========== starting zed ==========
2023-10-27T08:13:10 [INFO] Opening main db
2023-10-27T08:13:10 [INFO] set environment variables from shell:/usr/local/bin/fish, path:/usr/local/opt/openjdk/bin:/Users/user/.asdf/shims/:/Users/user/.cargo/bin:/usr/local/bin:/Users/user/.cargo/bin:/System/Cryptexes/App/usr/bin:/Users/user/.cargo/bin:/usr/bin:/Users/user/.cargo/bin:/bin:/Users/user/.cargo/bin:/usr/sbin:/Users/user/.cargo/bin:/sbin:/Users/user/.cargo/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/Users/user/.cargo/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/Users/user/.cargo/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/user/.cargo/bin:/Library/Apple/usr/bin:/Users/user/.cargo/bin:/usr/local/share/dotnet:/Users/user/.cargo/bin:~/.dotnet/tools:/Users/user/.cargo/bin:/Users/user/Library/Application Support/Coursier/bin
2023-10-27T08:13:10 [INFO] Opening main db
2023-10-27T08:13:10 [INFO] build git repository ".git"
2023-10-27T08:13:12 [INFO] Node runtime install_if_needed
2023-10-27T08:13:12 [INFO] Opening main db
2023-10-27T08:13:13 [INFO] starting language server "next-ls", path: "/Users/user/dev/my-project", id: 1
2023-10-27T08:13:14 [ERROR] failed to start language server "next-ls": Bad CPU type in executable (os error 86)
2023-10-27T08:13:14 [INFO] About to spawn test binary
2023-10-27T08:13:14 [WARN] test binary failed to launch
2023-10-27T08:13:14 [WARN] test binary check failed
2023-10-27T08:13:14 [INFO] beginning to reinstall server
2023-10-27T08:13:14 [INFO] deleting server container
2023-10-27T08:13:14 [INFO] starting language server "next-ls", path: "/Users/user/dev/my-project", id: 2
2023-10-27T08:13:16 [ERROR] failed to start language server "next-ls": Bad CPU type in executable (os error 86)
2023-10-27T08:13:16 [INFO] About to spawn test binary
2023-10-27T08:13:16 [WARN] test binary failed to launch
2023-10-27T08:13:16 [WARN] test binary check failed
2023-10-27T08:13:16 [INFO] beginning to reinstall server
2023-10-27T08:13:16 [INFO] deleting server container
2023-10-27T08:13:16 [INFO] starting language server "next-ls", path: "/Users/user/dev/my-project", id: 3
2023-10-27T08:13:16 [ERROR] failed to start language server "next-ls": Bad CPU type in executable (os error 86)
2023-10-27T08:13:16 [INFO] About to spawn test binary
2023-10-27T08:13:16 [WARN] test binary failed to launch
2023-10-27T08:13:16 [WARN] test binary check failed
2023-10-27T08:13:16 [INFO] beginning to reinstall server
2023-10-27T08:13:16 [INFO] deleting server container
2023-10-27T08:13:17 [INFO] starting language server "next-ls", path: "/Users/user/dev/my-project", id: 4
2023-10-27T08:13:17 [INFO] 0 unhandled notification LogMessage:
@slashmili slashmili added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Oct 27, 2023
@jeregrine
Copy link

Same setup but my error is

Language server error: Elixir

error deserializing latest release

@slashmili
Copy link
Author

slashmili commented Oct 27, 2023

@jeregrine that's because for some reason you are hitting GitHub rate limit, like explain in #4445

Wait few hours and try again! It worked for after I tried the next day.

Check the log ~/Library/Logs/Zed/Zed.log

@osiewicz
Copy link
Contributor

osiewicz commented Oct 30, 2023

Hey there! Thanks for the report. The directory being empty is most likely a result, not the cause of the problems here.
When we run into issues with LSP installation, we wipe the whole directory for that LSP and try to download & install it again.
The actual problem looks to be in this line (as that's the cause of LSP startup failure):
2023-10-27T08:13:16 [ERROR] failed to start language server "next-ls": Bad CPU type in executable (os error 86)
I'll check it out.

osiewicz referenced this issue Oct 30, 2023
CPU types had to be swapped around.

Fixed zed-industries/community#2185
@osiewicz
Copy link
Contributor

The fix should be available in next Preview (01.11.2023).

osiewicz referenced this issue Oct 30, 2023
CPU types had to be swapped around.

Fixed zed-industries/community#2185

Release Notes:
- Fixed Elixir next-ls LSP installation failing due to fetching a binary
for the wrong architecture (zed-industries/community#2185).
osiewicz referenced this issue Oct 30, 2023
CPU types had to be swapped around.

Fixed zed-industries/community#2185
@JosephTLyons JosephTLyons added language An umbrella label for all programming languages syntax behaviors language server failure Language server doesn't work as expected language server An umbrella label for all language servers and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Oct 30, 2023
@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] language server failure Language server doesn't work as expected language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants