Skip to content

[web_benchmark] Fix tab connection for newer versions of Chrome#11266

Merged
auto-submit[bot] merged 2 commits intomainfrom
chrome_tab_fail
Mar 17, 2026
Merged

[web_benchmark] Fix tab connection for newer versions of Chrome#11266
auto-submit[bot] merged 2 commits intomainfrom
chrome_tab_fail

Conversation

@mdebbar
Copy link
Contributor

@mdebbar mdebbar commented Mar 16, 2026

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.

@mdebbar mdebbar requested a review from yjbanov as a code owner March 16, 2026 17:24
@flutter-dashboard
Copy link

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.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

@mdebbar mdebbar changed the title [web_benchmark] Fix tab connection for newer version of Chrome [web_benchmark] Fix tab connection for newer versions of Chrome Mar 17, 2026
@mdebbar mdebbar added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App labels Mar 17, 2026
@auto-submit auto-submit bot merged commit b2e421b into main Mar 17, 2026
81 checks passed
@auto-submit auto-submit bot deleted the chrome_tab_fail branch March 17, 2026 18:15
reidbaker pushed a commit that referenced this pull request Mar 17, 2026
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 18, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Mar 18, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: web_benchmarks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants