fix(extension): bind spawned servers to 127.0.0.1 instead of localhost#769
Merged
Merged
Conversation
After the Windows 11 25H2 update the extension started failing with `connect ETIMEDOUT ::1:<port>` when talking to its spawned test server and run-server. Node's default `localhost` resolution on affected systems prefers IPv6, the server binds to `::1`, and the subsequent IPv6 loopback connection times out (reproducible on macOS too for some users). Pass `--host 127.0.0.1` explicitly so both servers always bind to IPv4 loopback, which remains reachable. Refs: microsoft/playwright#40226
pavelfeldman
approved these changes
Apr 18, 2026
pavelfeldman
requested changes
Apr 18, 2026
Member
pavelfeldman
left a comment
There was a problem hiding this comment.
stale defender rules problem
pavelfeldman
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs microsoft/playwright#40226 (root-cause fix; companion to #768 which prevents the follow-on crash).
Summary
Users started hitting
connect ETIMEDOUT ::1:<port>after Windows 11 25H2 (build 26200.8246), with matching reports on macOS. The extension spawns Playwright'stest-server(and, for "reuse browser",run-server) without specifying--host. Both default tolocalhost, which Node resolves to::1first on dual-stack systems; the server binds IPv6-only, and something on 25H2 (firewall/WFP/MpsSvc defaults appear to be the culprit) then blocks the extension's IPv6 loopback connection.--host 127.0.0.1totest-server(listing + debug paths) andrun-server. IPv4 loopback is reachable on all affected setups.tests/list-tests.spec.ts"should spawn test-server bound to IPv4 loopback" that asserts the spawn args via the captured log output channel. Verified the test fails when the--hostarg is removed.The existing
#768defensively fixes the resultingPosition(-1)crash; this PR removes the trigger.