-
Notifications
You must be signed in to change notification settings - Fork 685
Not planned
Labels
CrashDomain: EditorRelated to the LSP server, editor experienceRelated to the LSP server, editor experienceNeeds More Info
Description
Don't know why does an empty string ""
appear in the rootNames
filed, which keeps crashing lsp server several times.
Info 14 [15:16:38.013] Open files:
Info 14 [15:16:38.013] FileName: /Users/emosheep/projects/lvweb-tree/apps/ai-creator/src/services/digital-human-service/digital-human-service.ts ProjectRootPath:
Info 14 [15:16:38.013] Projects: /Users/emosheep/projects/lvweb-tree/apps/ai-creator/tsconfig.json
Info 14 [15:16:38.013] FileName: /Users/emosheep/projects/lvweb-tree/apps/platform-business-ssr/src/hooks/use-user/login-plugins/ms-sdk/ms-sdk.tsx ProjectRootPath:
Info 14 [15:16:38.013] Projects: /Users/emosheep/projects/lvweb-tree/apps/platform-business-ssr/tsconfig.json
Info 14 [15:16:38.014] getConfigFileNameForFile:: File: /Users/emosheep/projects/lvweb-tree/config/dist/types/constants/common/index.d.ts ProjectRootPath: :: Result: /Users/emosheep/projects/lvweb-tree/config/tsconfig.json
Info 15 [15:16:38.015] Creating KindConfiguredProject: /Users/emosheep/projects/lvweb-tree/config/tsconfig.json, currentDirectory: /Users/emosheep/projects/lvweb-tree/config
Info 16 [15:16:38.131] Config: /Users/emosheep/projects/lvweb-tree/config/tsconfig.json : {
"options": {
"allowUnreachableCode": false,
"baseUrl": "/Users/emosheep/projects/lvweb-tree/config",
"composite": true,
"emitDecoratorMetadata": true,
"declaration": true,
"declarationDir": "/Users/emosheep/projects/lvweb-tree/config/dist/types",
"declarationMap": true,
"disableSourceOfProjectReferenceRedirect": false,
"disableReferencedProjectLoad": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"lib": [
"lib.esnext.d.ts",
"lib.dom.d.ts",
"lib.dom.iterable.d.ts"
],
"module": 99,
"moduleResolution": 100,
"outDir": "/Users/emosheep/projects/lvweb-tree/config/dist",
"resolveJsonModule": true,
"rootDir": "/Users/emosheep/projects/lvweb-tree/config/src",
"skipLibCheck": true,
"strict": true,
"sourceMap": true,
"target": 99,
"useDefineForClassFields": false,
"verbatimModuleSyntax": true,
"configFilePath": "/Users/emosheep/projects/lvweb-tree/config/tsconfig.json"
},
"projectReferences": [],
"rootNames": [
"/Users/emosheep/projects/lvweb-tree/config/src/apps.ts",
"/Users/emosheep/projects/lvweb-tree/config/src/global.d.ts",
"/Users/emosheep/projects/lvweb-tree/config/src/graphic.ts",
"/Users/emosheep/projects/lvweb-tree/config/src/video-editor.ts",
"",
"/Users/emosheep/projects/lvweb-tree/config/src/config/commerce/commerce.ts",
"/Users/emosheep/projects/lvweb-tree/config/src/config/domain/default.ts",
"/Users/emosheep/projects/lvweb-tree/config/src/config/domain/ecommerce.ts",
"/Users/emosheep/projects/lvweb-tree/config/src/config/favicon/default.ts",
...etc.
]
}
panic: vfs: path "" is not absolute
goroutine 1 [running]:
github.com/microsoft/typescript-go/internal/vfs/internal.RootLength({0x0, 0x0})
/Users/emosheep/projects/typescript-go/internal/vfs/internal/internal.go:22 +0x88
github.com/microsoft/typescript-go/internal/vfs/internal.SplitPath({0x0?, 0x1?})
/Users/emosheep/projects/typescript-go/internal/vfs/internal/internal.go:29 +0x2c
github.com/microsoft/typescript-go/internal/vfs/internal.(*Common).RootAndPath(0x1038efe90, {0x0?, 0x1?})
/Users/emosheep/projects/typescript-go/internal/vfs/internal/internal.go:36 +0x2c
github.com/microsoft/typescript-go/internal/vfs/internal.(*Common).ReadFile(0x30?, {0x0?, 0x9a928255d4e1418e?})
/Users/emosheep/projects/typescript-go/internal/vfs/internal/internal.go:139 +0x20
github.com/microsoft/typescript-go/internal/vfs/osvfs.(*osFS).ReadFile(0x1038efe90, {0x0, 0x0})
/Users/emosheep/projects/typescript-go/internal/vfs/osvfs/os.go:85 +0x6c
github.com/microsoft/typescript-go/internal/project.(*Service).getOrCreateScriptInfoWorker(0x140000a42c0, {0x0, 0x0}, {0x140631399e0, 0x23}, 0x0, 0x0, {0x0, 0x0}, 0x0)
/Users/emosheep/projects/typescript-go/internal/project/service.go:301 +0x250
github.com/microsoft/typescript-go/internal/project.(*Service).getOrCreateScriptInfoNotOpenedByClient(...)
/Users/emosheep/projects/typescript-go/internal/project/service.go:284
github.com/microsoft/typescript-go/internal/project.(*Service).loadConfiguredProject(0x140000a42c0, 0x14064b4dea0)
/Users/emosheep/projects/typescript-go/internal/project/service.go:554 +0x4e4
github.com/microsoft/typescript-go/internal/project.(*Service).findCreateOrReloadConfiguredProject(0x140000a42c0, {0x1406313b840, 0x38}, 0x2, 0x0)
/Users/emosheep/projects/typescript-go/internal/project/service.go:411 +0x118
github.com/microsoft/typescript-go/internal/project.(*Service).tryFindDefaultConfiguredProjectForOpenScriptInfo(0x140000a42c0, 0x140001ec6c0?, 0x2, 0x0)
/Users/emosheep/projects/typescript-go/internal/project/service.go:423 +0x5c
github.com/microsoft/typescript-go/internal/project.(*Service).tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(...)
/Users/emosheep/projects/typescript-go/internal/project/service.go:430
github.com/microsoft/typescript-go/internal/project.(*Service).assignProjectToOpenedScriptInfo(0x140000a42c0, 0x14002383b80)
/Users/emosheep/projects/typescript-go/internal/project/service.go:437 +0x2c
github.com/microsoft/typescript-go/internal/project.(*Service).OpenFile(0x140000a42c0, {0x140752e9a47, 0x51}, {0x1405d43b980, 0x173}, 0x3, {0x0, 0x0})
/Users/emosheep/projects/typescript-go/internal/project/service.go:112 +0xe4
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleDidOpen(0x140000a4210, 0x1400002d310?)
/Users/emosheep/projects/typescript-go/internal/lsp/server.go:269 +0x19c
github.com/microsoft/typescript-go/internal/lsp.(*Server).handleMessage(0x140000a4210, 0x140746d1140)
/Users/emosheep/projects/typescript-go/internal/lsp/server.go:184 +0x1cc
github.com/microsoft/typescript-go/internal/lsp.(*Server).Run(0x140000a4210)
/Users/emosheep/projects/typescript-go/internal/lsp/server.go:120 +0xb8
main.runLSP({0x14000010170, 0x1, 0x1})
/Users/emosheep/projects/typescript-go/cmd/tsgo/lsp.go:52 +0x32c
main.main()
/Users/emosheep/projects/typescript-go/cmd/tsgo/main.go:131 +0xb4
[Error - 15:16:38] Server process exited with code 2.
[Error - 15:16:38] The typescript-go-lsp server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
429365799
Metadata
Metadata
Assignees
Labels
CrashDomain: EditorRelated to the LSP server, editor experienceRelated to the LSP server, editor experienceNeeds More Info
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
rezwanahmedsami commentedon Mar 19, 2025
Okay let me take a look on that
rezwanahmedsami commentedon Mar 19, 2025
@emosheeep You putting empty string on that ?
Or its generating empty string itself ?
emosheeep commentedon Mar 19, 2025
No, I haven't changed it. That’s what it looked like.
emosheeep commentedon Mar 19, 2025
This seems work, but only as a workaround, there're still some problems unresolved.
typescript-go/internal/tsoptions/tsconfigparsing.go
Line 1506 in f3cf27f
rezwanahmedsami commentedon Mar 19, 2025
ok let me see
Fixed: [bug/lsp]panic: vfs: path is not absolute microsoft#670
rezwanahmedsami commentedon Mar 21, 2025
@emosheeep
Why its not generating any tsconfig.json file ?
jakebailey commentedon Mar 21, 2025
That's not implemented yet. What does this have to do with your empty string panic?
rezwanahmedsami commentedon Mar 21, 2025
I want to face this empty string panic . So i can understand properly wheres the main issue
rezwanahmedsami commentedon Mar 24, 2025
@emosheeep give me your tsconfig.json, where where you getting issues
emosheeep commentedon Mar 24, 2025
Here you are, this is the tsconfig that the problem file belongs to.
emosheeep commentedon Mar 24, 2025
And this is
<root>/config/tsconfig.json
and the
<root>/config/tsconfig.browser.json
rezwanahmedsami commentedon Mar 25, 2025
I tested by this, i can't see any issue with that.
cartond commentedon May 29, 2025
@emosheeep We (@slackhq) saw this also. I narrowed this down to the fact we had 4 old files leftover after migrations. They had the same name as their new file, but a
.js
extension instead.For example:
something.js
left behindsomething.ts
is the new versionsomething.js
resolves to "" in the rootfiles.Can you confirm this is your case also? Based on your first message, it would mean you have a matching
"/Users/emosheep/projects/lvweb-tree/config/src/config/commerce/commerce.js"
fileemosheeep commentedon Jun 4, 2025
@cartond No, I checked it just now, there isn't a file you said.
jakebailey commentedon Jul 24, 2025
It's been a month and there hasn't been a repro provided. We can't really do anything without something to test.