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

Error: [birpc] timeout on calling "onTaskUpdate" is sometimes thrown #4497

Closed
6 tasks done
Artur- opened this issue Nov 14, 2023 · 8 comments
Closed
6 tasks done

Error: [birpc] timeout on calling "onTaskUpdate" is sometimes thrown #4497

Artur- opened this issue Nov 14, 2023 · 8 comments
Labels
feat: browser Issues and PRs related to the browser runner p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@Artur-
Copy link

Artur- commented Nov 14, 2023

Describe the bug

When running vitest dev --browser.name=chromium --no-browser.headless to debug a test and you debug for more than 60s, the browser is closed, you lose the debug session and the Vite process exits with

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error: [birpc] timeout on calling "onTaskUpdate"
 ❯ Timeout._onTimeout node_modules/vitest/dist/vendor-index.b271ebe4.js:39:22
 ❯ listOnTimeout node:internal/timers:573:17
 ❯ process.processTimers node:internal/timers:514:7

Reproduction

it('should not crash', () => {
   debugger;
});

System Info

System:
    OS: macOS 14.0
    CPU: (10) arm64 Apple M1 Max
    Memory: 1011.86 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
    npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
    bun: 1.0.7 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 107.1.45.123
    Chrome: 119.0.6045.123
    Chrome Canary: 121.0.6125.0
    Edge: 119.0.2151.58
    Safari: 17.0
  npmPackages:
    @vitejs/plugin-react: 4.1.1 => 4.1.1 
    @vitest/browser: ^0.34.6 => 0.34.6 
    @vitest/ui: ^0.34.6 => 0.34.6 
    vite: 4.5.0 => 4.5.0 
    vitest: ^0.34.6 => 0.34.6

Used Package Manager

npm

Validations

@sheremet-va sheremet-va added bug feat: browser Issues and PRs related to the browser runner p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Nov 14, 2023
@Artur-
Copy link
Author

Artur- commented Dec 4, 2023

This also happens seemingly randomly when running vitest watch and then you need to restart the process

@fubhy
Copy link
Contributor

fubhy commented Dec 14, 2023

I'm also seeing this regularly in a workspace based setup where multiple browser and non-browser tests are run together. Here, the timeout occurs much more frequently than if we run only the browser tests specifically.

@Artur-
Copy link
Author

Artur- commented Dec 18, 2023

The hacky workaround here for debugging is to go and edit node_modules/vitest/dist/vendor/index.cAUulNDf.js and change the default birpc timeout to something larger, e.g.

const DEFAULT_TIMEOUT = 6e7;

@shamelio
Copy link

Same here in a file with 61 tests. Passed locally but failed on CI.
After splitting the tests into 2 separate files it passed in CI too.

@SCasarotto
Copy link

SCasarotto commented Jan 11, 2024

I have also run into this in CI but not locally. The option workaround I found was to flushPromises await new Promise(res => setImmediate(res)) in afterEach for the tests these errors popped up in. I haven't been able to determine the root cause.

@sheremet-va
Copy link
Member

I could not reproduce this on the latest beta.

@Artur-
Copy link
Author

Artur- commented Jun 18, 2024

I have not seen this error in quite some time, even with vitest 1.6

@sheremet-va
Copy link
Member

Last weekly we decided to close the issue if it's not reproducible. Feel free to reopen it if the issue still persists.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: browser Issues and PRs related to the browser runner p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
Archived in project
Development

No branches or pull requests

5 participants