LuaLS / LuaLS/lua-language-server

Lsp error in logs Unknown response id!

Đang mở
#2,302 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Lua
Star
4.4k
Fork
442
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi. I will appreciate any help.

Sometimes my server responds incorrectly. The server gives some responses eg.

{
  _closeMessage = "Request cancelled.",
  _closeReason = -32800,
  id = 35,
  jsonrpc = "2.0",
  method = "textDocument/semanticTokens/range",
  params = {
    range = {
      end = {
        character = 0,
        line = 0
      },
      start = {
        character = 0,
        line = 0
      }
    },
    textDocument = {
      uri = "---"
    }
  }
}

but the editor shows "workspace loading 0/0" or "Loading".

Even when it responds well, the same error appears in logs

[14:37:50.516][error][#0:script\proto\proto.lua:67]: Unknown response id!	0
stack traceback:
	script\proto\proto.lua:67: in function 'proto.proto.response'
	script\proto\proto.lua:195: in local 'f'
	script\utility.lua:439: in metamethod 'close'
	script\proto\proto.lua:202: in function <script\proto\proto.lua:175>

the difference is that when the server responds correctly, this appears in the logs:

[09:40:35.887][info] [#0:script\provider\diagnostic.lua:557]: Diagnostics scope ... (and here is my workspace folder)

however, when the server is working badly, the following appears in the logs:

[14:37:50.619][info] [#0:script\workspace\workspace.lua:282]: Scan files at: (and here are files from log/cache, not from my workspace I don.t know why.

Maybe someone faced such a problem?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện phản hồi LSP và so sánh các log xung quanh script/proto/proto.lua:67, script/proto/proto.lua:195 và script/workspace/workspace.lua:282. Truy tìm lý do phản hồi nhận được một ID không xác định và lý do quá trình quét workspace sử dụng các tệp bộ nhớ đệm được ghi trong log; được xem là hoàn tất khi có thể tái hiện lỗi và đã xác minh nguyên nhân cũng như cách khắc phục.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
lua
Lĩnh vực
devtools
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.