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

Volar vue-language-server crashed when open vue files #6243

Closed
sun617 opened this issue Mar 10, 2023 · 2 comments
Closed

Volar vue-language-server crashed when open vue files #6243

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

Comments

@sun617
Copy link

sun617 commented Mar 10, 2023

Summary

Build latest master branch of helix to open vue file then volar of vue-language-server crashed
Maybe this is related to change of #6058

Reproduction Steps

I tried this:

  1. hx

I expected this to happen:
open vue file the vue-language-server volar started
Instead, this happened:
language server crashed

Helix log

~/.cache/helix/helix.log
2023-03-10T13:42:10.533 helix_term::application [ERROR] Language Server: Method client/registerCapability not found in request 0
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "/home/sun/.npm/_npx/8b20ff0d5db79130/node_modules/vscode-jsonrpc/lib/common/connection.js:565\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "                        responsePromise.reject(new messages_1.ResponseError(error.code, error.message, error.data));\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "                                               ^\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "ResponseError: Method not found: client/registerCapability\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "    at handleResponse (/home/sun/.npm/_npx/8b20ff0d5db79130/node_modules/vscode-jsonrpc/lib/common/connection.js:565:48)\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "    at handleMessage (/home/sun/.npm/_npx/8b20ff0d5db79130/node_modules/vscode-jsonrpc/lib/common/connection.js:345:13)\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "    at processMessageQueue (/home/sun/.npm/_npx/8b20ff0d5db79130/node_modules/vscode-jsonrpc/lib/common/connection.js:362:17)\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "    at Immediate.<anonymous> (/home/sun/.npm/_npx/8b20ff0d5db79130/node_modules/vscode-jsonrpc/lib/common/connection.js:334:13)\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "    at processImmediate (node:internal/timers:466:21) {\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "  code: -32601,\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "  data: undefined\n"
2023-03-10T13:42:10.535 helix_lsp::transport [ERROR] err <- "}\n"
2023-03-10T13:42:10.558 helix_lsp::transport [ERROR] err: <- StreamClosed

Platform

Linux

Terminal Emulator

wezterm 20221119-145034-49b9839f

Helix Version

helix part of flake.lock

    "helix": {
      "locked": {
        "lastModified": 1678334908,
        "narHash": "sha256-VUTKgrXMBr8UKl47vzWrpmc/0HmOijfJBS5QYibKpQo=",
        "owner": "helix-editor",
        "repo": "helix",
        "rev": "2cf4ce235662fcb272c684751b844b2ebc1b757f",
        "type": "github"
      },
@sun617 sun617 added the C-bug Category: This is a bug label Mar 10, 2023
@the-mikedavis
Copy link
Member

Yep this is most likely caused by #6058. The language server should not be sending us a client/registerCapability (also see #6230) and servers based on the vscode-languageserver-node dependency exit when we send a JSONRPC error for client/registerCapability requests because it doesn't handle the promise rejection. I'll look at submitting a patch upstream.

@the-mikedavis the-mikedavis added A-language-server Area: Language server client upstream labels Mar 10, 2023
@the-mikedavis
Copy link
Member

I opened up volarjs/volar.js#18 which fixes this in volar. That dependency will then need to be updated in https://github.com/vuejs/language-tools/tree/master/packages/vue-language-server but that should fix the exit here.

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

2 participants