Skip to content

Follow navigation redirects with Playwright 1.64 - #186

Open
kbond wants to merge 2 commits into
playwright-php:mainfrom
kbond:fix-redirects-playwright-1-64
Open

kbond wants to merge 2 commits into
playwright-php:mainfrom
kbond:fix-redirects-playwright-1-64

Conversation

@kbond

@kbond kbond commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

From Playwright 1.64, an action whose navigation ends in a 204 never settles. redirectNavigationRequest() answers the navigation with a 204, so a click, form submit, reload, back or forward that hits a redirect hangs until the JSON-RPC timeout.

followNavigationRedirects() now stops waiting on such an action once the redirect's 204 has been sent, and navigates to the target as before. A goto() still settles on the 204 and is still awaited, which includes each redirect hop: starting a goto() to the same URL before the previous one settles fails with net::ERR_ABORTED.

The existing redirect tests cover this when run against 1.64; this adds one for form submissions.

From 1.64, an action whose navigation ends in the redirect's 204 never settles.
@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Racing it let a `goto()` to the same url start before the previous one settled, which fails with `net::ERR_ABORTED`.
@gimler

gimler commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Works for me. good work @kbond

@gimler

gimler commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

i am not shure but eventually this is releated microsoft/playwright#43242

see playwright 1.64.1
https://github.com/microsoft/playwright/releases/tag/v1.64.1

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants