[web_benchmark] Fix tab connection for newer versions of Chrome#11266
[web_benchmark] Fix tab connection for newer versions of Chrome#11266auto-submit[bot] merged 2 commits intomainfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
There was a problem hiding this comment.
Code Review
This pull request addresses a race condition in package:web_benchmark when connecting to Chrome. The change replaces a direct lookup for a single browser tab with a mechanism that retries for up to 5 seconds. This makes the connection more robust against timing issues where the browser has not yet opened a tab. The new implementation also includes an explicit error throw if no tab is found within the timeout period.
DevTools has been experiencing a [flake](flutter/flutter#183335) with `package:web_benchmark`'s launching of Chrome. I've also noticed several times a similar failure when running web engines locally. Turns out (from trial and error) that newer versions of Chrome seem to establish the WIP connection before tabs have had a chance to open. It's a race between the two, and when the WIP connections is faster, we fail to find any tab to connect to, and therefore we fail. The fix in this PR is to allow a grace period of 5 seconds of retrying to find the tab. I made a [similar fix](flutter/flutter#183737) in the flutter/flutter repo.
flutter/packages@a9d36fb...afa1a1c 2026-03-18 [email protected] Roll Flutter from 732e05d to d117642 (47 revisions) (flutter/packages#11276) 2026-03-18 [email protected] [google_maps_flutter] Add color scheme support to platform interface (flutter/packages#11278) 2026-03-17 [email protected] [video_player] Regenerate iOS example with Swift (flutter/packages#11275) 2026-03-17 [email protected] [camera_avfoundation] Remove outdated TODO comment in messages.dart (flutter/packages#11236) 2026-03-17 [email protected] [web_benchmark] Fix tab connection for newer versions of Chrome (flutter/packages#11266) 2026-03-17 49699333+dependabot[bot]@users.noreply.github.com [dependabot]: Bump the test-dependencies group across 14 directories with 1 update (flutter/packages#11250) 2026-03-17 [email protected] [ci] Enable SwiftPM by default for platform tests (flutter/packages#11271) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

DevTools has been experiencing a flake with
package:web_benchmark's launching of Chrome. I've also noticed several times a similar failure when running web engines locally.Turns out (from trial and error) that newer versions of Chrome seem to establish the WIP connection before tabs have had a chance to open. It's a race between the two, and when the WIP connections is faster, we fail to find any tab to connect to, and therefore we fail. The fix in this PR is to allow a grace period of 5 seconds of retrying to find the tab.
I made a similar fix in the flutter/flutter repo.