Skip to content

[Feature]: Disable Chromium feature "TcpPortRandomizationWin" by default #43545

Closed

Description

🚀 Feature Request

Since a recent Chromium version, this feature is enabled and it causes intermittent test failures when running Playwright. This results in Failed to load resource: net::ERR_NO_BUFFER_SPACE errors that will fail random test cases. In our case, it fails about 50% of our runs on our Windows build servers.

This has been submitted as a bug for Chromium (see https://issues.chromium.org/issues/572515601 for all the details and reproduction). They have had contact with the Windows OS guys as well and they seem to be heading in a direction where they say that this behavior is "as expected" or where they might want to improve something in the future. If that is the case, then the proper workaround is to disable the TcpPortRandomizationWin feature and then I would like this to be disabled (by Playwright) by default.

If not, then I would like a way to append a disabled feature (or update the list of disabled features) based on configuration, without having to copy the list from the Playwright sources and keep it up to date manually.

Example

Either disable it by default, or (for example) add a config parameter like:

launchOptions: {
    additionalDisabledFeatures: ['TcpPortRandomizationWin'],
}

or

launchOptions: {
    disabledFeaturesFn: disabledByDefault => [...disabledByDefault, 'TcpPortRandomizationWin'], 
}

Motivation

Adding this flag by default will decrease the number of intermittent failures when running Playwright on Windows.

Activity

  1. github-actions commented on Oct 22, 2026

    @github-actions
    Contributor

    Hi, Playwright bot here — I tested this on Windows.

    I could not reproduce ERR_NO_BUFFER_SPACE, but the configuration gap is real. Chromium source confirms that TcpPortRandomizationWin is enabled by default on Windows 11 22H2 and newer and sets SO_RANDOMIZE_PORT before TCP connections.

    On Windows Server 2025 24H2 (build 26100), both Playwright 1.64.1 / Chromium 156.0.8078.4 and tip-of-tree 1.65.0-alpha-2026-10-22 / Chromium 156.0.8078.12 completed:

    • 20,000 sequential loopback requests;
    • 20,000 parallelized loopback requests across 500 hostnames;
    • each matrix entry with the feature enabled and with --disable-features=TcpPortRandomizationWin.

    All runs completed without a failed request. The linked Chromium issue requires sign-in, so I could not run its exact reproduction. Could you paste that reproduction here and include the Playwright version, Chromium version, and Windows Server version from an affected worker?

    The proposed args: ['--disable-features=TcpPortRandomizationWin'] workaround is not safely additive. I verified through chrome://version that Chromium keeps only the final --disable-features value, which removes Playwright's built-in disabled-feature list. That API problem is already tracked in #43557; the earlier dedicated feature-options request #36658 was closed as not planned. Disabling this specific feature by default remains a separate request, but it needs a reproducible failing case before we can verify that workaround.

    Triaged on Windows by the Playwright bot - agent run

  2. woppa684 commented on Oct 22, 2026

    @woppa684
    Author

    Hi playwright bot, thanks for looking into this. I have copied everything needed to reproduce this from the linked Chromium bug. The attached ZIP contains a README.md with all instructions you need. This is not my code, but from the original submitter of the Chromium bug obviously.

    I can reproduce this on my local workstation (Windows 11 25H2) and our build servers (Windows Server 2025 24H2).

    chromium-572515601-windows-tcp-repro.zip

  3. github-actions commented on Oct 22, 2026

    @github-actions
    Contributor

    Hi, Playwright bot here — I ran the newly attached reproduction on Windows.

    Reproduced on tip-of-tree (playwright-core 1.65.0-next, sha 20a2087) with Chromium 157.0.8103.6. This is a live Windows/Chromium issue, and the results support disabling TcpPortRandomizationWin as a mitigation.

    The native probe made 60,000 ordinary and 60,000 randomized loopback connections. Ordinary connections had no Winsock 10055 errors; connections with SO_RANDOMIZE_PORT had four, each at low TCP occupancy.

    The Chromium probe also reproduced with the feature at its default:

    • enabled/default: reproduced twice, after 1,119 and 1,076 page loads; NetLog recorded os_error: 10055 and 4/6 ERR_NO_BUFFER_SPACE events
    • disabled: 1,132 page loads with no 10055 or ERR_NO_BUFFER_SPACE events
    • enabled/default repeat: one intermittent clean run of 1,122 loads, followed by the second reproduction above

    I tested on Windows Server 2025 24H2, build 26100.33650 (tcpip.sys 10.0.26100.32995). This runner accumulated about 11,000 TIME_WAIT rows after roughly 1,100 loads, so the reproduction's safety limit stopped each clean run before its requested 8,000 loads. The disabled run therefore proves a comparable clean interval, not an unlimited clean run.

    The additive configuration API is already tracked by #43557; the earlier dedicated feature-options request #36658 was closed as not planned. This issue remains a separate request to disable this specific feature by default, now with a verified Windows reproduction.

    Triaged on Windows by the Playwright bot - agent run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions