Splitting this issue out from flutter/devtools#9674, since I believe this specific flake we are seeing requires a fix in package:web_benchmarks and not Flutter DevTools.
We noticed a flake when our benchmark tests were running on Github CI (failed run):
Building Flutter web app (compiler: dart2js)...
Build took 100s to complete.
Launching Chrome.
Launching Google Chrome 145.0.7632.117
Waiting for the benchmark to report benchmark profile.
[CHROME]:
[CHROME]: DevTools listening on ws://127.0.0.1:10001/devtools/browser/96317ecd-c603-46c3-8034-8dd372a2ff9b
Connecting to DevTools: ws://localhost:10001/devtools/page/84039657253FC755ED7D526B2FC40AA8
Bad state: No element
dart:core Iterable.single
package:web_benchmarks/src/browser.dart 292:30 _connectToChromeDebugPort
===== asynchronous gap ===========================
dart:async _CustomZone.registerBinaryCallback
package:web_benchmarks/src/browser.dart 113:38 Chrome.launch
package:web_benchmarks/src/runner.dart 332:34 BenchmarkServer.run
===== asynchronous gap ===========================
dart:async _CustomZone.registerUnaryCallback
package:web_benchmarks/src/runner.dart 136:42 BenchmarkServer.run
package:web_benchmarks/server.dart 75:5 serveWebBenchmark
benchmark/devtools_benchmarks_test.dart 57:28 _runBenchmarks
This error is due to this tabs.single getter in package:web_benchmarks - it expects there to be a single open http://localhost tab but for there is none.
I believe the URL for the tab it is looking for is being constructed here and being opened here.
Only thing I can think is maybe Chrome is resolving localhost as 127.0.0.1 and that's why the check for localhost isn't finding anything? (I see in the error logs above both localhost and 127.0.0.1)
Splitting this issue out from flutter/devtools#9674, since I believe this specific flake we are seeing requires a fix in
package:web_benchmarksand not Flutter DevTools.We noticed a flake when our benchmark tests were running on Github CI (failed run):
This error is due to this tabs.single getter in
package:web_benchmarks- it expects there to be a single open http://localhost tab but for there is none.I believe the URL for the tab it is looking for is being constructed here and being opened here.
Only thing I can think is maybe Chrome is resolving
localhostas127.0.0.1and that's why the check forlocalhostisn't finding anything? (I see in the error logs above bothlocalhostand127.0.0.1)