Skip to content

vscode extension crash #6637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wanlwanl opened this issue Mar 24, 2025 · 3 comments
Closed

vscode extension crash #6637

wanlwanl opened this issue Mar 24, 2025 · 3 comments
Assignees
Labels
ide Issues for VS, VSCode, Monaco, etc.

Comments

@wanlwanl
Copy link
Member

repro

open folder typespec-e2e-demo\todoApp\spec\main.tsp

Image

2025-03-24 17:43:40.719 [info] Recreating TypeSpec LSP server...
2025-03-24 17:43:40.720 [info] Server path loaded from TypeSpec extension configuration: ${workspaceFolder}/node_modules/@typespec/compiler/cmd
2025-03-24 17:43:40.906 [error] Server initialization failed.
2025-03-24 17:43:40.906 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:40.906 [info] Connection to server got closed. Server will restart.
2025-03-24 17:43:40.906 [info] true
2025-03-24 17:43:40.907 [error] TypeSpec client: couldn't create connection to server.
2025-03-24 17:43:40.907 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:40.907 [error] Server process exited with code 1.
2025-03-24 17:43:40.990 [error] node:internal/modules/cjs/loader:1146
  throw err;
  ^

Error: Cannot find module 'c:\Users\wanl\workspace\bugbash-vsc\typespec-e2e-demo\todoApp\spec\node_modules\@typespec\compiler\cmd\cmd\tsp-server.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.12.1

2025-03-24 17:43:40.995 [error] Server initialization failed.
2025-03-24 17:43:40.995 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:40.995 [info] Connection to server got closed. Server will restart.
2025-03-24 17:43:40.995 [info] true
2025-03-24 17:43:40.995 [error] TypeSpec client: couldn't create connection to server.
2025-03-24 17:43:40.995 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:41.002 [error] Unexpected error when starting TypeSpec server Pending response rejected since connection got disposed
2025-03-24 17:43:41.003 [info] Sent 0 delayed telemetry events
2025-03-24 17:43:41.015 [error] Server process exited with code 1.
2025-03-24 17:43:41.128 [error] Server process exited with code 1.
2025-03-24 17:43:41.128 [error] node:internal/modules/cjs/loader:1146
  throw err;
  ^

Error: Cannot find module 'c:\Users\wanl\workspace\bugbash-vsc\typespec-e2e-demo\todoApp\spec\node_modules\@typespec\compiler\cmd\cmd\tsp-server.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.12.1

2025-03-24 17:43:41.132 [error] Server initialization failed.
2025-03-24 17:43:41.132 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:41.132 [info] Connection to server got closed. Server will restart.
2025-03-24 17:43:41.132 [info] true
2025-03-24 17:43:41.132 [error] TypeSpec client: couldn't create connection to server.
2025-03-24 17:43:41.132 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:41.132 [error] Restarting server failed
2025-03-24 17:43:41.132 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:41.274 [error] node:internal/modules/cjs/loader:1146
  throw err;
  ^

Error: Cannot find module 'c:\Users\wanl\workspace\bugbash-vsc\typespec-e2e-demo\todoApp\spec\node_modules\@typespec\compiler\cmd\cmd\tsp-server.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.12.1

2025-03-24 17:43:41.275 [error] Server initialization failed.
2025-03-24 17:43:41.276 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:41.276 [info] Connection to server got closed. Server will restart.
2025-03-24 17:43:41.276 [info] true
2025-03-24 17:43:41.276 [error] TypeSpec client: couldn't create connection to server.
2025-03-24 17:43:41.276 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:41.277 [error] Restarting server failed
2025-03-24 17:43:41.277 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:41.285 [error] Server process exited with code 1.
2025-03-24 17:43:42.709 [error] node:internal/modules/cjs/loader:1146
  throw err;
  ^

Error: Cannot find module 'c:\Users\wanl\workspace\bugbash-vsc\typespec-e2e-demo\todoApp\spec\node_modules\@typespec\compiler\cmd\cmd\tsp-server.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.12.1

2025-03-24 17:43:42.710 [error] Server process exited with code 1.
2025-03-24 17:43:42.712 [error] Server initialization failed.
2025-03-24 17:43:42.712 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:42.712 [error] The TypeSpec server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
2025-03-24 17:43:42.712 [error] TypeSpec client: couldn't create connection to server.
2025-03-24 17:43:42.712 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:42.712 [error] Restarting server failed
2025-03-24 17:43:42.713 [error]   Message: Pending response rejected since connection got disposed
  Code: -32097 
2025-03-24 17:43:48.442 [info] Providing tsp tasks
2025-03-24 17:43:49.702 [info] Found 1 main.tsp files
2025-03-24 17:43:49.733 [info] Provided 2 tsp tasks

@wanlwanl wanlwanl added the ide Issues for VS, VSCode, Monaco, etc. label Mar 24, 2025
@RodgeFu
Copy link
Contributor

RodgeFu commented Mar 24, 2025

the server path is set which seems invalid. but anyway we shouldn't crash.

@RodgeFu
Copy link
Contributor

RodgeFu commented Mar 25, 2025

@mzhongl524 , could you help to have a quick look so that we can understand the impact of the crash? thanks.

@RodgeFu
Copy link
Contributor

RodgeFu commented Mar 25, 2025

Confirmed that it's the crash of lsp server because invalid tsp-server path is given. Close as dup of #6475 . thanks.

@RodgeFu RodgeFu closed this as completed Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide Issues for VS, VSCode, Monaco, etc.
Projects
None yet
Development

No branches or pull requests

3 participants