You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Browser page creation fails with a disposed Playwright response #4231
This fails at Browser.new_page rather than a page assertion. Earlier #1153 recorded the same driver message in a different test, but it does not establish that this run is transient. The fixture ownership failure in this run is separately tracked; establish a causal link before combining them.
playwright._impl._errors.Error: Browser.new_page: Response has been disposed
This report session read the CI log and JUnit results, without a local reproduction. Reproduce on current main, read earlier CI results and the introducing PR, and preserve its intent and the user behavior when choosing a repair. Do not clear an intermittent failure on a passing rerun alone.
This remains unresolved: both reported cases pass on current main, but that does not clear the intermittent CI failure. I have no reproduced cause that supports a code fix yet.
The Browser.new_page label does not necessarily identify the failing operation. The installed Playwright driver's _connection.py stores event-listener exceptions and throws them on the next API call. Its bundled response reader raises Response has been disposed when a fetched response body is no longer available. A callback from an earlier page can therefore surface this message while a later test creates its page; the available CI tracebacks do not identify that originating callback.
One concrete lead is the output observer added in #4205: the entry route catches errors from route.fetch(), but reads response.text() afterward, outside that handler. This is a candidate to investigate during context teardown, not an established cause or a demonstrated connection to the separate fixture-ownership failure. Any repair must preserve observation of publications from departed sample documents, which #4205 deliberately added.
Reproduction and historical evidence
At current main, f919fdebec5313bfbc0e67a4d989fa76c3652bf8:
uv run pytest tests/browser/test_render_gate.py::test_a_released_entry_that_never_arrives_is_named_like_any_other_file tests/browser/test_render_gate.py::test_browser_like_console_words_remain_console_diagnostics -q -n0
2 passed in 9.65s
A second focused run included the preceding held-module and held-stylesheet cases, followed by both reported cases: 4 passed in 18.41s. No files were changed.
The Linux JUnit artifact from preceding scheduled run 40186470627 records passes for both reported cases. Run 40311120380 records the disposed-response error in the console-diagnostic test on Linux and in page-fixture setup on macOS; each platform passed the other case. Earlier #1153 had the same error text before #4205 existed, so that PR's new observer cannot explain every historical occurrence of this message.
@max-sixty, the remaining decision is how to capture the originating event-listener traceback in CI before choosing a repair; the current artifacts expose only the later API call, and I cannot justify changing response or browser lifetimes from that evidence alone.
Push run 40419540771 records the same disposed-response diagnostic in another render-gate case: test_the_pre_upgrade_proof_holds_its_entry_route_past_the_load_event fails at its first page = browser.new_page() (test_render_gate.py:639), through WatchedBrowser.new_page, with Browser.new_page: Response has been disposed.
It never reaches the route-registration assertion tracked separately in #4220. This adds an affected case to this investigation; the traceback still does not identify the originating response or callback.
Push run 40513972843, on 37e9061fcdd2060b1dbbe8683dc9834d5847e5cd, adds another affected caller: tests/browser/test_render_gate.py::test_recursive_rows_share_the_window_and_keep_pane_furniture_in_view fails while open_page calls WatchedBrowser.new_page, with Browser.new_page: Response has been disposed. It never reaches the workspace layout assertions. The traceback still does not identify the originating response or callback.
#4578 fixes a reproduced source of this failure: context closure during the output observer's response-body read leaves an exception in Playwright's shared connection, which then throws it from the next Browser.new_page() call. The new regression deliberately orders that closure and fails on the old code with the exact disposed-response diagnostic.
The observer now treats errors after its page closes as cancellation while preserving errors on live pages. Seven focused cases passed, including the regression, the originally reported cases, entry-route lifetime, fetch-failure reporting, and output capture from both removed and navigated samples. Ruff and compilation checks passed. An independent package-render failure also reproduces on unchanged main and is tracked in #4577.
Pushed as d64381dd9dbc510186b2e9c47b318b87c8ff0d14. Review and CI remain with the queued review and landing workflows; this run records its push and hands off without a CI wait, as configured.
Push run 40793933941, created after #4578 merged, again fails test_a_released_entry_that_never_arrives_is_named_like_any_other_file with Browser.new_page: Response has been disposed. Reopening for this post-repair evidence. This diagnostic does not identify the originating callback or establish that #4578’s repaired observer path is responsible; the next investigation needs that traceback. Earlier runs 40658089936 and 40728386608 also record disposed-response failures, but only the latter and this newest one postdate that merge. No local reproduction was attempted in this report session.
#4699 fixes a reproduced gap in #4578: Playwright disposes a context's fetched responses before page.is_closed() becomes true. An output-observer body read in that interval escapes the old guard and surfaces on the next Browser.new_page() call. Render-page cleanup now cancels route handlers before closing the page, using Playwright's ignoreErrors lifecycle behavior rather than a callback-local closed-page check.
The revised regression explicitly orders the body read after request-context disposal and before page closure. Both page-check and widget-check cases failed on unchanged main with the exact Browser.new_page: Response has been disposed diagnostic and pass with the fix. Nine focused browser cases and six model checks passed, including the originally reported cases and output capture from removed and navigated samples; lint, formatting, type checks and compilation passed.
Pushed as a1ac88a620fd964f75d9faa3dcf1ebedbf2175e8 and recorded for landing. With await_ci: false, review and CI follow-up belong to the queued review and landing workflows; this session has not waited for CI.
Activity
cifailing onmain(schedule) #4225leaf-agent commentedon Oct 26, 2026
This remains unresolved: both reported cases pass on current main, but that does not clear the intermittent CI failure. I have no reproduced cause that supports a code fix yet.
The
Browser.new_pagelabel does not necessarily identify the failing operation. The installed Playwright driver's_connection.pystores event-listener exceptions and throws them on the next API call. Its bundled response reader raisesResponse has been disposedwhen a fetched response body is no longer available. A callback from an earlier page can therefore surface this message while a later test creates its page; the available CI tracebacks do not identify that originating callback.One concrete lead is the output observer added in #4205: the entry route catches errors from
route.fetch(), but readsresponse.text()afterward, outside that handler. This is a candidate to investigate during context teardown, not an established cause or a demonstrated connection to the separate fixture-ownership failure. Any repair must preserve observation of publications from departed sample documents, which #4205 deliberately added.Reproduction and historical evidence
At current main,
f919fdebec5313bfbc0e67a4d989fa76c3652bf8:A second focused run included the preceding held-module and held-stylesheet cases, followed by both reported cases: 4 passed in 18.41s. No files were changed.
The Linux JUnit artifact from preceding scheduled run 40186470627 records passes for both reported cases. Run 40311120380 records the disposed-response error in the console-diagnostic test on Linux and in page-fixture setup on macOS; each platform passed the other case. Earlier #1153 had the same error text before #4205 existed, so that PR's new observer cannot explain every historical occurrence of this message.
@max-sixty, the remaining decision is how to capture the originating event-listener traceback in CI before choosing a repair; the current artifacts expose only the later API call, and I cannot justify changing response or browser lifetimes from that evidence alone.
leaf-agent commentedon Oct 27, 2026
Push run 40419540771 records the same disposed-response diagnostic in another render-gate case:
test_the_pre_upgrade_proof_holds_its_entry_route_past_the_load_eventfails at its firstpage = browser.new_page()(test_render_gate.py:639), throughWatchedBrowser.new_page, withBrowser.new_page: Response has been disposed.It never reaches the route-registration assertion tracked separately in #4220. This adds an affected case to this investigation; the traceback still does not identify the originating response or callback.
leaf-agent commentedon Oct 27, 2026
Push run 40513972843, on
37e9061fcdd2060b1dbbe8683dc9834d5847e5cd, adds another affected caller:tests/browser/test_render_gate.py::test_recursive_rows_share_the_window_and_keep_pane_furniture_in_viewfails whileopen_pagecallsWatchedBrowser.new_page, withBrowser.new_page: Response has been disposed. It never reaches the workspace layout assertions. The traceback still does not identify the originating response or callback.leaf-agent commentedon Oct 28, 2026
#4578 fixes a reproduced source of this failure: context closure during the output observer's response-body read leaves an exception in Playwright's shared connection, which then throws it from the next
Browser.new_page()call. The new regression deliberately orders that closure and fails on the old code with the exact disposed-response diagnostic.The observer now treats errors after its page closes as cancellation while preserving errors on live pages. Seven focused cases passed, including the regression, the originally reported cases, entry-route lifetime, fetch-failure reporting, and output capture from both removed and navigated samples. Ruff and compilation checks passed. An independent package-render failure also reproduces on unchanged main and is tracked in #4577.
Pushed as
d64381dd9dbc510186b2e9c47b318b87c8ff0d14. Review and CI remain with the queued review and landing workflows; this run records its push and hands off without a CI wait, as configured.leaf-agent commentedon Oct 29, 2026
Push run 40793933941, created after #4578 merged, again fails
test_a_released_entry_that_never_arrives_is_named_like_any_other_filewithBrowser.new_page: Response has been disposed. Reopening for this post-repair evidence. This diagnostic does not identify the originating callback or establish that #4578’s repaired observer path is responsible; the next investigation needs that traceback. Earlier runs 40658089936 and 40728386608 also record disposed-response failures, but only the latter and this newest one postdate that merge. No local reproduction was attempted in this report session.leaf-agent commentedon Oct 29, 2026
#4699 fixes a reproduced gap in #4578: Playwright disposes a context's fetched responses before
page.is_closed()becomes true. An output-observer body read in that interval escapes the old guard and surfaces on the nextBrowser.new_page()call. Render-page cleanup now cancels route handlers before closing the page, using Playwright'signoreErrorslifecycle behavior rather than a callback-local closed-page check.The revised regression explicitly orders the body read after request-context disposal and before page closure. Both page-check and widget-check cases failed on unchanged main with the exact
Browser.new_page: Response has been disposeddiagnostic and pass with the fix. Nine focused browser cases and six model checks passed, including the originally reported cases and output capture from removed and navigated samples; lint, formatting, type checks and compilation passed.Pushed as
a1ac88a620fd964f75d9faa3dcf1ebedbf2175e8and recorded for landing. Withawait_ci: false, review and CI follow-up belong to the queued review and landing workflows; this session has not waited for CI.