Vitest Explorer fails to initialize on VS Code Insiders 1.139.0 while Stable works
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.7k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: N/A
This issue requires the Vitest Explorer extension to reproduce. However, it also occurs in a clean VS Code Insiders profile with only Vitest Explorer installed.
Version: 1.139.0-insider
Commit: 4fa9fcf245ad90eb1f21fae5ed0511515e068b1d
OS: macOS arm64
Vitest Explorer: 1.52.0
Vitest: 3.2.6
Node.js: 22.23.1
Steps to Reproduce:
- Open a project containing a valid Vitest configuration in VS Code Insiders.
- Install the Vitest Explorer extension.
- Reload the window.
- Vitest Explorer successfully resolves the configuration and starts the Vitest worker.
- The WebSocket/RPC connection closes during initialization.
- Vitest Explorer fails to load the configuration.
Relevant output:
[INFO] [v1.52.0] Vitest extension is activated because Vitest is installed or there is a Vite/Vitest config file in the workspace.
[INFO] [API] Resolving configs: bob-dashboard/vitest.config.js
[API] Spawning on-demand process...
[INFO] [API] Running Vitest v3.2.6 (bob-dashboard/vitest.config.js) with "/Users/youzonglin/.nvm/versions/node/v22.23.1/bin/node .../vitest.explorer-1.52.0/dist/worker.js"
[API] Vitest WebSocket connection closed, cannot call RPC anymore.
[API] On-demand process finished
[Error] There were errors during config load.
[Error] [birpc] rpc is closed, cannot call "getFiles"
[Error] Error: The extension could not load any config.
The same problem occurs when using:
"vitest.shellType": "terminal"
Output:
[TERMINAL] Initiated ws connection via ws://localhost:55105
[TERMINAL] Starting Vitest v3.2.6 (bob-dashboard/vitest.config.js) in the terminal
[API] Vitest v3.2.6 (bob-dashboard/vitest.config.js) terminal process created
[API] Vitest WebSocket connection closed, cannot call RPC anymore.
[Error] [birpc] rpc is closed, cannot call "getFiles"
Expected Result:
Vitest Explorer initializes successfully and displays the tests in the Testing panel.
Actual Result:
The Vitest worker starts, but the WebSocket/RPC connection is immediately closed and the extension reports:
[birpc] rpc is closed, cannot call "getFiles"
The extension could not load any config.
Additional Information:
- The exact same workspace works correctly in VS Code Stable.
- Running Vitest directly works correctly:
npx vitest --config vitest.config.js
- The issue reproduces in a clean VS Code Insiders profile with only Vitest Explorer installed.
- Multiple Vitest Explorer versions were tested and show the same behavior on Insiders.
- Both
child_processandterminalmodes fail. - Node is correctly resolved to:
/Users/youzonglin/.nvm/versions/node/v22.23.1/bin/node
NODE_OPTIONS,HTTP_PROXY,HTTPS_PROXY,ALL_PROXY, andNO_PROXYare not set.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with VS Code Insiders 1.139.0, the clean profile, and Vitest Explorer using the listed child_process and terminal modes. Compare the WebSocket/RPC initialization with Stable, starting from the vitest.config.js worker.js flow and the extension-host connection; done when the configuration loads and tests appear in the Testing panel.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, vscode
- Domain
- developer-experience, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100