Skip to content

vscode - panic - file not found #1319

@lukpsaxo

Description

@lukpsaxo

Switch to a branch where the file open has been deleted.

Vscode shows this:

Image

the extension pops up a panic error.

Info 5060 [16:20:33.001] Finishing updateGraph: Project: c:/Projects/a/b/c/ui/tsconfig.json version: 231 in 375.3709ms
panic handling request textDocument/diagnostic file not found: c:/Projects/a/b/c/compositions/z/z.tsx goroutine 145906 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:26 +0x5e
github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1.1()
	github.com/microsoft/typescript-go/internal/lsp/server.go:359 +0x5d
panic({0x11cece0?, 0xc0143455f0?})
	runtime/panic.go:792 +0x132
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).getProgramAndFile(0xc01f80c180, {0xc01756a060?, 0x1277c60?})
	github.com/microsoft/typescript-go/internal/ls/languageservice.go:39 +0x7c
github.com/microsoft/typescript-go/internal/ls.(*LanguageService).GetDocumentDiagnostics(0xc01f80c180, {0x14e09d0, 0xc0036d8230}, {0xc01756a060?, 0x1a42b80?})
	github.com/microsoft/typescript-go/internal/ls/diagnostics.go:14 +0x45
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleDocumentDiagnostic(0xc0000eadc0, {0x14e09d0, 0xc0036d8230}, 0xc029b32210)
	github.com/microsoft/typescript-go/internal/lsp/server.go:637 +0xc6
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification(0x3?, {0x14e09d0?, 0xc0036d8230?}, 0xc019657220?)
	github.com/microsoft/typescript-go/internal/lsp/server.go:482 +0x1b9
github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop.func1()
	github.com/microsoft/typescript-go/internal/lsp/server.go:372 +0x75
created by github.com/microsoft/typescript-go/internal/lsp.(*Server).dispatchLoop in goroutine 9
	github.com/microsoft/typescript-go/internal/lsp/server.go:390 +0x4d2

[Error - 4:20:33 PM] Request textDocument/diagnostic failed.
  Message: InternalError: panic handling request textDocument/diagnostic: file not found: c:/Projects/a/b/c/compositions/z/z.tsx
  Code: -32603 
[Error - 4:20:33 PM] Document pull failed for text document file:///c%3A/Projects/a/b/c/compositions/z/z.tsx
  Message: InternalError: panic handling request textDocument/diagnostic: file not found: c:/Projects/a/b/c/compositions/z/z.tsx
  Code: -32603 
[Error - 4:20:33 PM] Document pull failed for text document file:///c%3A/Projects/a/b/c/compositions/z/b.tsx
  Message: InternalError: panic handling request textDocument/diagnostic: file not found: c:/Projects/a/b/c/compositions/z/b.tsx
  Code: -32603 

Metadata

Metadata

Assignees

No one assigned

    Labels

    CrashDomain: EditorRelated to the LSP server, editor experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions