Skip to content

Flaky test: hot_restart_web_ddc_library_bundle_test.dart fails with SocketException: Address already in use #185452

Closed

Description

@okorohelijah

The hot_restart_web_ddc_library_bundle_test.dart test is failing intermittently on the web_tool_tests shard due to a port collision. Discovered when upgrading to Xcode 26

It seems like the test runner is failing to create a server socket because the requested port is already in use by another process.

03:00 +5 -1: /Volumes/Work/.../web.shard/hot_restart_web_ddc_library_bundle_test.dart: Hot restart (index.html: flutter.js (load)), DDC library bundle format: true: hot restart works without error and newly added code executes [E]
  Exception: Received app.stop event while waiting for app.started event
  
  [ +524 ms] SocketException: Failed to create server socket (OS Error: Address already in use, errno = 48), address = ::, port = 49159
             #0      _NativeSocket.bind (dart:io-patch/socket_patch.dart:1216:7)
             <asynchronous suspension>
             #1      _RawServerSocket.bind.<anonymous closure> (dart:io-patch/socket_patch.dart:2163:12)
...
  Failed to establish connection with the application instance in Chrome.
  This can happen if the websocket connection used by the web tooling is unable to correctly establish a connection, for example due to a firewall.

Build: https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20web_tool_tests/68517/overview
log: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8683790484627116449/+/u/run_test.dart_for_web_tool_tests_shard_and_subshard_1_1/stdout?format=raw

Activity

  1. added
    in triagePresently being triaged by the triage team
    toolAffects the "flutter" command-line tool. See also t: labels.
    team-webOwned by Web platform team
    a: tests"flutter test", flutter_test, or one of our tests
    platform-macosBuilding on or for macOS specifically
    c: flakeTests that sometimes, but not always, incorrectly pass
    and removed
    in triagePresently being triaged by the triage team
    on Apr 23, 2026
  2. added
    P1High-priority issues at the top of the work list
    triaged-webTriaged by Web platform team
    on May 20, 2026
  3. mdebbar commented on Aug 19, 2026

    @mdebbar
    Contributor

    This was a one-off error. I don't see it in the last 200 runs of Mac web_tool_tests.

  4. github-actions commented on Sep 2, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly passplatform-macosBuilding on or for macOS specificallyteam-webOwned by Web platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-webTriaged by Web platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions