Fixed E2E route teardown races - #29624
Conversation
no issue Playwright could close browser contexts while route handlers were still reading responses, leaking disposed-response errors into otherwise successful tests.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Playwright Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin:build |
✅ Succeeded | 11s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | <1s | View ↗ |
nx run-many -t lint -p @tryghost/e2e |
✅ Succeeded | 5s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | 1s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-27 16:41:16 UTC

What changed
Why
A
page.route()handler can still be reading a fetched response after the test body returns. Closing the context at that point disposes the response and surfaces an unhandledapiResponse.json: Response has been disposederror, as seen in this flaky CI run.Using Playwright's
waitteardown behavior drains active handlers without swallowing genuine handler errors.