LuaLS / LuaLS/lua-language-server
Lsp error in logs Unknown response id!
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Lua
- Sterne
- 4.4k
- Forks
- 442
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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?
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die LSP-Antwort zu reproduzieren und die Logs rund um script/proto/proto.lua:67, script/proto/proto.lua:195 und script/workspace/workspace.lua:282 zu vergleichen. Verfolge, warum die Antwort eine unbekannte ID erhält und warum der Workspace-Scan die protokollierten Cache-Dateien verwendet; abgeschlossen ist die Untersuchung, wenn der Fehler reproduzierbar ist und seine Ursache sowie die Behebung verifiziert sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- lua
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100