vitest-dev / vscode

VS Code extension for Vitest
https://vitest.dev/vscode
MIT License
740 stars 83 forks source link

Plugin keeps iterating across port numbers #443

Open jwatte opened 1 month ago

jwatte commented 1 month ago

Describe the bug

We're using rush to manage a monorepo with several packages. We're having a fair bit of problems with the vitest plugin. One of the symptoms is that it keeps complaining that ports are in use, that aren't:

(short excerpt of longer log)

[Worker] Port 5197 is in use, trying another one...
[Worker] Port 5227 is in use, trying another one...
[Worker] Port 5228 is in use, trying another one...
[Worker] Port 5222 is in use, trying another one...
[Worker] Port 5198 is in use, trying another one...
[Worker] Port 5199 is in use, trying another one...
[Worker] Port 5229 is in use, trying another one...
[Worker] Port 5235 is in use, trying another one...
[Worker] Port 5230 is in use, trying another one...
[Worker] Port 5247 is in use, trying another one...
[Worker] Port 5200 is in use, trying another one...
[Worker] Port 5223 is in use, trying another one...
[Worker] Port 5231 is in use, trying another one...
[Worker] Port 5248 is in use, trying another one...
[Worker] Port 5236 is in use, trying another one...
[Worker] Port 5237 is in use, trying another one...
[Worker] Port 5249 is in use, trying another one...
[Worker] Port 5232 is in use, trying another one...
[Worker] Port 5238 is in use, trying another one...
[Worker] Port 5233 is in use, trying another one...
[Worker] Port 5250 is in use, trying another one...
[Worker] Port 5239 is in use, trying another one...
[Worker] Port 5224 is in use, trying another one...
[Worker] Port 5251 is in use, trying another one...
[Worker] Port 5234 is in use, trying another one...
[Worker] Port 5240 is in use, trying another one...
[Worker] Port 5225 is in use, trying another one...
[Worker] Port 5201 is in use, trying another one...
[Worker] Port 5235 is in use, trying another one...
[Worker] Port 5252 is in use, trying another one...
[Worker] Port 5241 is in use, trying another one...

Another is that we keep seeing tons of node processes.

A third is that whenever we switch branches or do other bigger git operations, the extension goes crazy, sucks up the CPU, and frequently crashes.

It also creates .mjs timestamp files in the actual source tree that sometimes get left behind.

Reproduction

Install and enable vitest plugin. Open monorepo workspace with several sub-projects. Optional: Do git checkout operations that create/delete directories/projects.

Output

[Worker] Port 5197 is in use, trying another one...
[Worker] Port 5227 is in use, trying another one...
[Worker] Port 5228 is in use, trying another one...
[Worker] Port 5222 is in use, trying another one...
[Worker] Port 5198 is in use, trying another one...
[Worker] Port 5199 is in use, trying another one...
[Worker] Port 5229 is in use, trying another one...
[Worker] Port 5235 is in use, trying another one...
[Worker] Port 5230 is in use, trying another one...
[Worker] Port 5247 is in use, trying another one...
[Worker] Port 5200 is in use, trying another one...
[Worker] Port 5223 is in use, trying another one...
[Worker] Port 5231 is in use, trying another one...
[Worker] Port 5248 is in use, trying another one...
[Worker] Port 5236 is in use, trying another one...
[Worker] Port 5237 is in use, trying another one...
[Worker] Port 5249 is in use, trying another one...
[Worker] Port 5232 is in use, trying another one...
[Worker] Port 5238 is in use, trying another one...
[Worker] Port 5233 is in use, trying another one...
[Worker] Port 5250 is in use, trying another one...
[Worker] Port 5239 is in use, trying another one...
[Worker] Port 5224 is in use, trying another one...
[Worker] Port 5251 is in use, trying another one...
[Worker] Port 5234 is in use, trying another one...
[Worker] Port 5240 is in use, trying another one...
[Worker] Port 5225 is in use, trying another one...
[Worker] Port 5201 is in use, trying another one...
[Worker] Port 5235 is in use, trying another one...
[Worker] Port 5252 is in use, trying another one...
[Worker] Port 5241 is in use, trying another one...


### Version

v1.0.4

### 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 commented 1 month ago

These are not all the extension logs. You are describing several issues but showing probably the least useful part of logs. I cannot help if you won't provide more information.