Skip to content

panic handling completionItem/resolve #2022

@pedro757

Description

@pedro757

Stack trace

[ERROR][2025-11-05 09:38:18] /usr/share/nvim/runtime/lua/vim/lsp/log.lua:151	"rpc"	"tsgo"	"stderr"	"panic handling request completionItem/resolve  goroutine 127164 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:26 +0x5e\ngithub.com/microsoft/typescript-go/internal/lsp.(*Server).recover(0xc0000f8dc0, 0xc04d6a0870)\n\tgithub.com/microsoft/typescript-go/internal/lsp/server.go:570 +0x58\npanic({0xb1bd20?, 0xea8770?})\n\truntime/panic.go:783 +0x132\ngithub.com/microsoft/typescript-go/internal/ls.(*LanguageService).getCompletionItemActions(0xc04a4a9b60, {0xeb1f80, 0xc063754410}, 0xc0486ca608, 0xc00cba3b08, 0x15df, 0xc01541f0c0, 0xc01541f180)\n\tgithub.com/microsoft/typescript-go/internal/ls/completions.go:5380 +0x5cc\ngithub.com/microsoft/typescript-go/internal/ls.(*LanguageService).getCompletionItemDetails(0xc04a4a9b60, {0xeb1f80, 0xc063754410}, 0xb?, 0x15df, 0xc00cba3b08, 0xc06b3370e0, 0xc01541f0c0, 0xc0001fe720)\n\tgithub.com/microsoft/typescript-go/internal/ls/completions.go:5109 +0x65f\ngithub.com/microsoft/typescript-go/internal/ls.(*LanguageService).ResolveCompletionItem(0xc04a4a9b60, {0xeb1f80, 0xc063754410}, 0xc06b3370e0, 0xc01541f0c0, 0xc0001fe720)\n\tgithub.com/microsoft/typescript-go/internal/ls/completions.go:5022 +0x9b\ngithub.com/microsoft/typescript-go/internal/lsp.(*Server).handleCompletionItemResolve(0xc0000f8dc0, {0xeb1f80, 0xc063754410}, 0xc06b3370e0, 0xc04d6a0870)\n\tgithub.com/microsoft/typescript-go/internal/lsp/server.go:859 +0x133\ngithub.com/microsoft/typescript-go/internal/lsp.init.func1.registerRequestHandler[...].28({0xeb1f80, 0xc063754410}, 0xc04d6a0870)\n\tgithub.com/microsoft/typescript-go/internal/lsp/server.go:532 +0xb6\ngithub.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification(0xc0000f8dc0, {0xeb1f80, 0xc063754410}, 0xc04d6a0870)\n\tgithub.com/microsoft/typescript-go/internal/lsp/server.go:451 +0x10d\ngithub.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1()\n\tgithub.com/microsoft/typescript-go/internal/lsp/server.go:356 +0x3a\ncreated by github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop in goroutine 11\n\tgithub.com/microsoft/typescript-go/internal/lsp/server.go:376 +0x9ad\n\n"
[ERROR][2025-11-05 09:38:18] /usr/share/nvim/runtime/lua/vim/lsp/log.lua:151	"No callback found for server response id 589"
[ERROR][2025-11-05 09:38:18] /usr/share/nvim/runtime/lua/vim/lsp/log.lua:151	"LSP[tsgo]"	"on_error"	{ code = "NO_RESULT_CALLBACK_FOUND", err = { id = 589, jsonrpc = "2.0", result = vim.NIL } }

Steps to reproduce

it's hard to explain, I was using ramda, and I wanted to import a function from that library so I manually triggered the completion to see if it could autoimport the module

Consider "|" as cursor position

  1. Type defaultTo()|
  2. Go back to defaultTo|()
  3. Mannually trigger the completion

Version: 7.0.0-dev.20251105.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions