Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Closed
#824 5 comments 25 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
nodejs, typescript, vscode

Research direction

The error originates in the extension's worker.js and involves WebSocket/RPC communication with Vitest. Start by examining the extension's source for spawning processes and handling WebSocket connections, particularly in the API module. Look at the config loading flow and the birpc error handling. Reproduce the issue in a minimal environment to see if it's related to recent VSCode updates or Vitest version mismatches.

Written by the indexing model from the issue text.

Description

pending triage
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
Dominant language
TypeScript
Stars
932
Forks
124
Avg merge
18h 28m
Merged PRs (30d)
4

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vitest-dev/vscode

All issues in vitest-dev/vscode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.