FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(browser): fail instead of hanging when the browser stops responding by sheremet-va · Pull Request #10956 · vitest-dev/vitest · GitHub

fix(browser): fail instead of hanging when the browser stops responding - #10956

Merged
sheremet-va merged 2 commits into
mainfrom
fix/browser-heartbeat
Aug 17, 2026
Merged

sheremet-va merged 2 commits into
mainfrom
fix/browser-heartbeat

Conversation

sheremet-va commented Aug 14, 2026
edited
Loading

Copy link
Copy Markdown
Member

A browser that dies or freezes without closing its websocket used to hang the run forever: the node-side rpc has no timeout, and every existing liveness check (testTimeout, iframe ack) runs inside the browser itself, so none of them can fire once the browser process is gone.

  • the server now pings every browser connection and terminates it when pings go unanswered, so the pending createTesters call rejects and the run fails with an actionable error. Browsers answer these pings from the network process, not from page JavaScript, so a sync-busy test or a page paused in the debugger does not false-positive. VITEST_BROWSER_HEARTBEAT_INTERVAL overrides the interval (0 disables it); an invalid value prints a warning and falls back to the default instead of silently disabling the heartbeat.
  • the browser pool no longer waits forever for provider.close(): an unresponsive browser previously blocked close() and the process could never exit. The browser process is killed by the provider when the process exits.
  • the playwright provider subscribes to page.on('crash') again (the handler was removed in perf(browser): improve browser parallelisation #7665) and fails the run immediately with an attributed error. Without it, a crash is only visible as a websocket disconnect, if the browser closes the socket at all.

Closes #10791
Closes #10151

netlify Bot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 4d3716d
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6a7f3843f2e1970008362ee3
😎 Deploy Preview https://deploy-preview-10956--vitest-dev.netlify.app
📱 Preview on mobile Toggle QR Code...



Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

macarie previously approved these changes Aug 15, 2026

AriPerkkio left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why is this better approach than just enabling birpc's ack messages using timeout option?

Copy link
Copy Markdown
Member Author

Why is this better approach than just enabling birpc's ack messages using timeout option?

Because the tests can take any amount of time, I don’t like dictating an arbitrary value.

Copy link
Copy Markdown
Member Author

Why is this better approach than just enabling birpc's ack messages using timeout option?

You also probably remember what happened last time we had a timeout and it caused issues on low powered machines.

AriPerkkio previously approved these changes Aug 16, 2026
sheremet-va dismissed stale reviews from AriPerkkio and macarie via f40f274 August 16, 2026 13:08

hi-ogawa left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

ws ping interval was also requested for keeping some connection alive #10151. Probably can close it together.

sheremet-va merged commit c496c2e into main Aug 17, 2026
44 of 49 checks passed
sheremet-va deleted the fix/browser-heartbeat branch August 17, 2026 09:08
github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

4 participants


Back | FazBrowse Home | New Git URL