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

bash-language-server crashes after update #6230

Closed
AlexanderBrevig opened this issue Mar 9, 2023 · 5 comments
Closed

bash-language-server crashes after update #6230

AlexanderBrevig opened this issue Mar 9, 2023 · 5 comments
Labels
A-language-server Area: Language server client C-bug Category: This is a bug upstream

Comments

@AlexanderBrevig
Copy link
Contributor

Summary

Using latest from branch Helix and latest from AUR bash-language-server 4.8.2 I get no LSP for bash.

I am not sure if this is an issue with Helix or the LSP, but maybe we could be more graceful about the issue?

Let me know if this is somehow better suited as an issue against the upstream LSP.

Reproduction Steps

I tried this: Updated bash-language-server to latest version

I expected this to happen: Still get LSP for bash

Instead, this happened: No LSP for bash, since it crashes

Helix log

~/.cache/helix/helix.log
2023-03-09T11:11:21.175 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","result":[null],"id":1}
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "/usr/lib/bash-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:531\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "                        responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "                                               ^\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "ResponseError: Method not found: client/registerCapability\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "    at handleResponse (/usr/lib/bash-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:531:48)\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "    at processMessageQueue (/usr/lib/bash-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:327:17)\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "    at Immediate.<anonymous> (/usr/lib/bash-language-server/node_modules/vscode-jsonrpc/lib/common/connection.js:311:13)\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "    at processImmediate (node:internal/timers:466:21) {\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "  code: -32601,\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "  data: undefined\n"
2023-03-09T11:11:21.178 helix_lsp::transport [ERROR] err <- "}\n"
2023-03-09T11:11:21.220 mio::poll [TRACE] deregistering event source from poller
2023-03-09T11:11:21.220 helix_term::application [DEBUG] received editor event: LanguageServerMessage((0, Notification(Notification { jsonrpc: None, method: "exit", params: None })))
2023-03-09T11:11:21.220 helix_lsp::transport [ERROR] err: <- StreamClosed
2023-03-09T11:11:21.220 mio::poll [TRACE] deregistering event source from poller
2023-03-09T11:11:21.220 helix_view::editor [DEBUG] editor status: Language server exited

Platform

Linux 6.2.2-arch1-1

Terminal Emulator

kitty 0.27.1

Helix Version

22.05-1430-g2cf4ce23

@AlexanderBrevig AlexanderBrevig added the C-bug Category: This is a bug label Mar 9, 2023
@kirawi kirawi added the A-language-server Area: Language server client label Mar 9, 2023
@the-mikedavis
Copy link
Member

the-mikedavis commented Mar 9, 2023

This might be the same issue as pyright had (microsoft/pyright#4666) since they both use the vscode-languageserver dependency. I can look at submitting the same patch to bash-language-server.

(The change in Helix that causes this is #6058. We now send a MethodNotHandled error for the client/registerCapability message instead of ignoring it. That causes a promise to be rejected in vscode-languageserver which is fatal.)

@the-mikedavis
Copy link
Member

Should be fixed by bash-lsp/bash-language-server#763

@AlexanderBrevig
Copy link
Contributor Author

Amazing!

@AlexanderBrevig
Copy link
Contributor Author

Should I close now or wait until the patch is available?

@the-mikedavis
Copy link
Member

Looks like that was just merged and it should be released with the server version 4.8.3 so I'll close this out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client C-bug Category: This is a bug upstream
Projects
None yet
Development

No branches or pull requests

3 participants