Skip to content
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

Unhandled exception on continuous run with coverage enabled #561

Open
tinybitsofcode opened this issue Dec 17, 2024 · 2 comments
Open

Unhandled exception on continuous run with coverage enabled #561

tinybitsofcode opened this issue Dec 17, 2024 · 2 comments

Comments

@tinybitsofcode
Copy link

Describe the bug

When using Continuous run with the coverage enabled profile, sometimes the extension crashes and I need to either restart the extensions or the IDE. I'm using the Cursor IDE, but I think this should be replicable in VSCode as well (I haven't tested yet).

Reproduction

It's pretty difficult to reproduce, it happens at random when saving the files and vitest tries to rerun the file. Sometimes it seems to happen if I save the test, and then switch to a different file.

Output

[INFO 4:07:06 PM] [Worker] Rerunning all tests due to file changes: src/ecs/helpers/production/simulated/storage.test.ts
[4:07:06 PM] There is no test run for "storage.test.ts"
[4:07:06 PM] No test run to finish for src/ecs/helpers/production/simulated/storage.test.ts
[INFO 4:07:06 PM] [Worker] 
Unhandled Rejection
ENOENT: no such file or directory, lstat 'C:\Users\andy_\AppData\Local\Temp\vitest-coverage-5314c995-a0bb-4226-8785-13f9c420d50c\.tmp'
Serialized Error: { errno: -4058, code: 'ENOENT', syscall: 'lstat', path: 'C:\Users\andy_\AppData\Local\Temp\vitest-coverage-5314c995-a0bb-4226-8785-13f9c420d50c\.tmp' }


[4:07:06 PM] [API] Vitest child_process connection closed, cannot call RPC anymore.
[Error 4:07:06 PM] [API] Failed to close Vitest RPC [Error Error] [birpc] rpc is closed, cannot call "close"
Error: [birpc] rpc is closed, cannot call "close"
    at Proxy.O (c:\Users\andy_\.cursor\extensions\vitest.explorer-1.8.4\dist\extension.js:19:3781)
    at At.dispose (c:\Users\andy_\.cursor\extensions\vitest.explorer-1.8.4\dist\extension.js:21:3372)
    at c:\Users\andy_\.cursor\extensions\vitest.explorer-1.8.4\dist\extension.js:21:1762
    at Array.map (<anonymous>)
    at Ws.dispose (c:\Users\andy_\.cursor\extensions\vitest.explorer-1.8.4\dist\extension.js:21:1753)
    at c:\Users\andy_\.cursor\extensions\vitest.explorer-1.8.4\dist\extension.js:25:12342
    at ChildProcess.s (c:\Users\andy_\.cursor\extensions\vitest.explorer-1.8.4\dist\extension.js:21:1520)
    at ChildProcess.emit (node:events:531:35)
    at ChildProcess.emit (node:domain:488:12)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12)
[INFO 4:07:06 PM] [API] Vitest process 41580 closed successfully
[4:07:06 PM] [API] Vitest child_process connection closed, cannot call RPC anymore.
[Error 4:07:11 PM] [API] Failed to close Vitest process [Error Error] Vitest process did not exit in time
Error: Vitest process did not exit in time
    at Timeout._onTimeout (c:\Users\andy_\.cursor\extensions\vitest.explorer-1.8.4\dist\extension.js:21:3558)
    at listOnTimeout (node:internal/timers:581:17)
    at processTimers (node:internal/timers:519:7)


### Extension Version

v1.8.4

### Vitest Version

vitest/2.1.8 win32-x64 node-v20.17.0

### Validations

- [X] Check that you are using the latest version of the extension
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vscode/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vscode/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
@sheremet-va
Copy link
Member

Does it work with 1.8.3?

@tinybitsofcode
Copy link
Author

Does it work with 1.8.3?

I tried it just now, doesn't work on 1.8.3 either.

The easiest to reproduce was to start the continuous run with coverage, go to one test file, hit save, quickly switch to another file, the extension would crash.

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

No branches or pull requests

2 participants