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
[Bug]: RenderDocument introduces page.close() hang #42068
test('should close page while reload is committing',async({ context, browserName })=>{test.skip(browserName!=='chromium');for(leti=0;i<20;i++){constpage=awaitcontext.newPage();awaitexpect(page.evaluate(()=>{location.reload();returnnewPromise(()=>{});})).rejects.toThrow(/navigation/);awaitpage.close();// intermittently hangs}});
Expected behavior
The test passes fine.
Actual behavior
page.close() hangs. To expose this behaviour, it's important to have the loop inside the test, running it without the loop but with --repeat-each doesn't expose it. I suppose it's linked to races within the context or something.
FYI: for some reason this issue is greatly affecting our tests, so we eventually opted to reverse engineer chromium.launch, resulting in monkey patch through playwright.chromium._connection.toImpl of the server chromium object's _innerDefaultArgs -- its otherwise not possible to add more --disable-features. With that we unblocked ourselves on playwright 1.62+
We're closing all P3-collecting-feedback issues and retiring the label. #43813 explains why. This doesn't mean the request is wrong. If it still matters to you, please open a new issue against the latest Playwright version with your concrete use case and link back here.
Activity
amanmaurya92 commentedon Aug 4, 2026
Dmitry Gozman (@dgozman) Simon Knott (@Skn0tt) can I have a stab at this? I would love to work on this.
dgozman commentedon Aug 14, 2026
Existing upstream issue: https://issues.chromium.org/u/1/issues/536385539
michkot commentedon Aug 28, 2026
Is there a consideration to revert #41303 before chromium bug fix lands in reasonable stable version, e.g. as in Mahnoor-Zaffar#1 ?
fix(playwright-scraper): hold playwright at 1.61.1 (#363)
michkot commentedon Oct 8, 2026
It seems that while chromium bug https://issues.chromium.org/u/1/issues/536385539 was in fixed state for a while, the implemented fix was reverted on Sept 22.
FYI: for some reason this issue is greatly affecting our tests, so we eventually opted to reverse engineer
chromium.launch, resulting in monkey patch throughplaywright.chromium._connection.toImplof the server chromium object's_innerDefaultArgs-- its otherwise not possible to add more--disable-features. With that we unblocked ourselves on playwright 1.62+dgozman commentedon Oct 22, 2026
A new upstream fix was landed, hopefully getting into Chromium 158.
e2e: close the rename page only after its redirect loaded (#72)
pavelfeldman commentedon Oct 31, 2026
We're closing all
P3-collecting-feedbackissues and retiring the label. #43813 explains why. This doesn't mean the request is wrong. If it still matters to you, please open a new issue against the latest Playwright version with your concrete use case and link back here.