Describe the bug
After adding @vitejs/devtools and enabling the devtools plugin, vitest runs into a timeout after finishing all tests:
Test Files 9 passed (9)
Tests 113 passed | 1 expected fail (114)
Start at 13:04:01
Duration 15.67s (transform 1.20s, setup 3.16s, import 2.90s, tests 13.86s, environment 3.10s)
...
close timed out after 10000ms
Tests closed successfully but something prevents Vite server from exiting
You can try to identify the cause by enabling "hanging-process" reporter. See https://vitest.dev/guide/reporters.html#hanging-process-reporter
The hanging-process reporter was not helpful, but using wtfnode, I got this output by preccing ctrl-c after all tests finished:
^C[WTF Node?] open handles:
- File descriptors: (note: stdio always exists)
- fd 2 (tty) (stdio)
- fd 1 (tty) (stdio)
- fd 0 (tty)
- Servers:
- ::1:7812 (HTTP)
- Listeners:
- request: attachWsRpcTransport @ file:///home/USER/src/dccviewer-js/node_modules/devframe/dist/rpc/transports/ws-server.mjs:146
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-c1cevyww?file=vite.config.ts
- Note that vitest
outputs close timed out after 10000ms.
- Remvoe the
DevTools() from the plugins.
- The issue disappears
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 22.22.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.8.2 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
Used Package Manager
npm
Validations
Describe the bug
After adding
@vitejs/devtoolsand enabling the devtools plugin, vitest runs into a timeout after finishing all tests:The hanging-process reporter was not helpful, but using
wtfnode, I got this output by preccing ctrl-c after all tests finished:Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-c1cevyww?file=vite.config.ts
outputs close timed out after 10000ms.DevTools()from the plugins.System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 22.22.3 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.8.2 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpmUsed Package Manager
npm
Validations