fix(auth): survive ERR_ABORTED in login retry — recreate context, 5 attempts with backoff #16
Reference in New Issue
Block a user
Delete Branch "claude/e2e-auth-err-aborted-20260612"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Introduced
safeClose()helper inglobal.setup.tsand raised login retries from 3 to 5 with exponential backoff (5 s / 10 s / 20 s / 40 s).Why
Two production deploys were blocked on 2026-06-12 (workflow run 27423528491 and a follow-up run) by this sequence:
page.goto("/wp-login.php")throwsnet::ERR_ABORTED— Hostinger LiteSpeed aborts the connection when it throttles GitHub runner IPs.ERR_ABORTED.await context.close(), which threw"browserContext.close: Target page, context or browser has been closed".The root cause is distinct from
TimeoutError(which the original hardening handled): ERR_ABORTED does not just time out, it closes the context from Playwright's perspective before the application code can close it.Changes
global.setup.tssafeClose()helper; MAX_ATTEMPTS 3→5; flat-15s backoff → exponential 5/10/20/40 s; final-failure message names LiteSpeed throttle hypothesisCHANGELOG.mdpackage.jsonTiming math (job
timeout-minutes: 15= 900 s)Risk
Low. No test assertions changed, no spec files touched. The only behavioral change is that an already-closed context no longer aborts the retry loop.
npx playwright test --listconfirms 24 tests still enumerate identically (verified locally before push).Test plan
npx playwright test --list→ 24 tests, same set as main.