Skip to content

Failed to start Vitest. Check the output for more details. Vitest WebSocket connection closed, cannot call RPC anymore. #824

Description

@JohnCido

Describe the bug

I did not make any changes to our Vitest installation or config in 2 months. We've also been using Proto tools alongside Vitest for quite some time and had no issue before. Today it suddenly won't start up. I have installed the latest VSCode 1.139.0. Wonder if that could be the source.

Expected behavior

It should start without any error.

Reproduction

I created an minimal project with the bun init and installed the vitest as dev dependency. Reload the window via F1, and the error showed up.

Output

[INFO 17:39:55] [v1.52.0] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO 17:39:55] [API] Using user root config: /Users/***/***/vitest.config.ts
[INFO 17:39:56] [API] Resolving configs: ***/vitest.config.ts
[17:39:56] [API] Spawning on-demand process...
[INFO 17:39:56] [API] Running Vitest v4.1.10 (***/vitest.config.ts) with "/Users/***/.proto/shims/node /Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/worker.js"
[17:39:58] [API] Vitest WebSocket connection closed, cannot call RPC anymore.
[17:39:58] [API] On-demand process finished in 2327ms
[Error 17:39:58] There were errors during config load.
[Error 17:39:58] [Error Error] [birpc] rpc is closed, cannot call "getFiles"
Error: [birpc] rpc is closed, cannot call "getFiles"
	at /Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/esm-219GbSo2.js:1:1011
	at Map.forEach (<anonymous>)
	at Proxy.b (/Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/esm-219GbSo2.js:1:974)
	at e.<anonymous> (/Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/extension.js:1:66879)
	at e.wrapper (node:events:639:12)
	at e.emit (node:events:526:24)
	at e.emitClose (/Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/esm-219GbSo2.js:1:29396)
	at Socket.X (/Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/esm-219GbSo2.js:1:39502)
	at Socket.emit (node:events:514:28)
	at TCP.<anonymous> (node:net:362:12)
[Error 17:39:59] Error: The extension could not load any config.
	at tn (/Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/extension.js:1:79360)
	at async lr._defineTestProfiles (/Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/extension.js:24:5481)
	at async lr.defineTestProfiles (/Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/extension.js:24:4769)
	at async lr.activate (/Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/extension.js:24:13636)
	at async sr (/Users/***/.vscode/extensions/vitest.explorer-1.52.0/dist/extension.js:24:3397)
	at async zb._activate (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:164:16021)
	at async zb._waitForDepsThenActivate (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:164:15963)
	at async zb._initialize (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:164:15330)

Extension Version

1.52.0

Vitest Version

4.1.10 in our monorepo, 5.0.1 in the test folder

Validations

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions