Fix red CI: example 7 hangs on production Turnstile - #333
Merged
Conversation
The modifying-network-requests example drives live try.playwright.tech. After Turnstile shipped, automated browsers get error 600010, Run never POSTs /service/control/run, and CI waited two minutes for a duration banner that never appeared. Skip the bot check via the existing __TRY_PLAYWRIGHT_TURNSTILE__ flag, and give the execution-timeout assertion more slack on Firefox. Co-authored-by: Max Schmitt <max@schmitt.mx>
mxschmitt
marked this pull request as ready for review
September 4, 2026 15:58
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Problem
mainCI (CI/ e2etestjob) has been red since production Turnstile + live-run changes landed. Latest failure: https://github.com/mxschmitt/try-playwright/actions/runs/33842555644Consistently failing:
Examples › 7: should be able to intercept and modify network requestson Chromium, WebKit, and Firefox (3 retries, 2 minutes each)should handle the timeout correctly(70s wait vs 60s worker timeout)Example 7 navigates to live
https://try.playwright.tech, interceptsPOST /service/control/run, clicks Run, and waits for a placeholder image. After Turnstile shipped, automated browsers get Cloudflare error600010.getToken()returns empty, Run throwsCould not complete bot check. Please try again., the intercept never fires, and the e2e helper keeps waiting forDuration of …/Execution timeout!until the 120s test timeout.Reproduced locally against production with the example's Playwright snippet; right panel showed
Error: Could not complete bot check. Please try again.and/runwas never requested.Fix
intercept-modify-requests.js, setwindow.__TRY_PLAYWRIGHT_TURNSTILE__ = 'noop'viacontext.addInitScript(same override the playground already honors) so the demo can intercept/run./runpayload (success,fileName) and matchplacehold.coresponses more reliably.Verified the updated snippet against production:
/runis intercepted and the placeholder image loads in ~1s.Example 7 intercept succeeding after Turnstile noop
To show artifacts inline, enable in settings.