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

v0.29 shows "The inspector session is already connected" when collecting coverage without isolation #2928

Closed
6 tasks done
EvHaus opened this issue Feb 27, 2023 · 2 comments · Fixed by #2929
Closed
6 tasks done
Labels
feat: coverage Issues and PRs related to the coverage feature

Comments

@EvHaus
Copy link
Contributor

EvHaus commented Feb 27, 2023

Describe the bug

After upgrading to 0.28.x to 0.29.1 our coverage reports starting failing with the following error:

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: The inspector session is already connected
 ❯ new NodeError node:internal/errors:393:5
 ❯ Session.connect node:inspector:66:13
 ❯ Module.startCoverage ../../node_modules/@vitest/coverage-c8/dist/index.js:5:11
 ❯ startCoverageInsideWorker ../../node_modules/vitest/dist/chunk-integrations-coverage.e0a6acd2.js:33:70
 ❯ run ../../node_modules/vitest/dist/entry.js:245:3
 ❯ run ../../node_modules/vitest/dist/worker.js:63:3
 ❯ ../../node_modules/tinypool/dist/esm/worker.js:109:20

What's significant is that we use isolate: false. Setting it to true makes the errors go away, but it's not desired in our case as we want isolation to be disabled to improve performance.

Reproduction

Will try create a minimal repro later today. Just wanted to get this issue filed right away in case you happen to already know what might be causing this issue.

System Info

System:
    OS: macOS 13.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 968.20 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.12.1 - ~/.nvm/versions/node/v18.12.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.12.1/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v18.12.1/bin/npm
  Browsers:
    Chrome: 110.0.5481.177
    Chrome Canary: 113.0.5620.1
    Firefox: 110.0
    Safari: 16.2

Used Package Manager

yarn

Validations

@sheremet-va sheremet-va added bug feat: coverage Issues and PRs related to the coverage feature labels Feb 27, 2023
@AriPerkkio
Copy link
Member

Will try create a minimal repro later today.

I'm able to reproduce this using the information provided here. Looks like { isolate: false, singleThread: true } triggers the error in Vitest's internal test cases. The test cases are already looping through multiple different configuration variations but this combination was not covered.

@EvHaus
Copy link
Contributor Author

EvHaus commented Feb 28, 2023

Thanks. Confirming that 0.29.2 works now.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: coverage Issues and PRs related to the coverage feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants