Skip to content

vscode - panic - project not found #1315

@lukpsaxo

Description

@lukpsaxo

The file in question was working fine, then I switched branch and opened another file in the editor. The file in question definitely does have a project file.. I believe tsconfig files changed between the branches.

I repeated the steps but it didn't happen the second time so it may be intermittant.

panic handling request textDocument/diagnostic project not found goroutine 1105248 [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?, 0x14dab20?})
	runtime/panic.go:792 +0x132
github.com/microsoft/typescript-go/internal/project.(*Service).EnsureDefaultProjectForFile(0xc00036a000, {0xc0553b2180?, 0x0?})
	github.com/microsoft/typescript-go/internal/project/service.go:291 +0xf4
github.com/microsoft/typescript-go/internal/project.(*Service).EnsureDefaultProjectForURI(0xc00036a000, {0xc06c62ac60?, 0xc04c001ef8?})
	github.com/microsoft/typescript-go/internal/project/service.go:274 +0x35
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleDocumentDiagnostic(0xc0000eadc0, {0x14e09d0, 0xc0548608c0}, 0xc0576b53e0)
	github.com/microsoft/typescript-go/internal/lsp/server.go:634 +0x85
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleRequestOrNotification(0x6?, {0x14e09d0?, 0xc0548608c0?}, 0xc05fbe06e0?)
	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 - 8:15:51 AM] Request textDocument/diagnostic failed.
  Message: InternalError: panic handling request textDocument/diagnostic: project not found
  Code: -32603 
[Error - 8:15:51 AM] Document pull failed for text document file:///c%3A/Projects/a/b/src/c/d/e/f.tsx
  Message: InternalError: panic handling request textDocument/diagnostic: project not found
  Code: -32603 

Metadata

Metadata

Assignees

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