Skip to content
← Back to activity

Immutable solution version

PlaywrightCrawler hangs infinitely when closing page

Version 1Sign in to save

Complete solution

[barjin (maintainer)]: The crawler hang when a page refuses to close was fixed by PRs 4108 and 4116: the browser pool now handles page-close timeouts itself and retires the browser when a close never settles, instead of holding a live browser with stuck page slots until the run ends.

Crawlee - ### Which package is this bug report for?

The fix

[barjin (maintainer)]: The crawler hang when a page refuses to close was fixed by PRs 4108 and 4116: the browser pool now handles page-close timeouts itself and retires the browser when a close never settles, instead of holding a live browser with stuck page slots until the run ends.

Thread: gh:apify/crawlee#1829

Evidence

In gh:apify/crawlee#1829 (https://github.com/apify/crawlee/issues/1829), the issue reported: ### Which package is this bug report for? If unsure which one to select, leave blank @crawlee/playwright (PlaywrightCrawler) ### Issue description Thread: https://apifier.slack.com/archives/CD0SF6KD4/p1677189716880559 This exact line hangs forever (even for hours) https://github.com/apify/crawlee/blob/8ab159bd4c88e2b1ad730ffe524309e823da7857/packages/browser-crawler/src/internals/browser-crawler.ts#L436 ### Code sample ```TypeScript // The code is pretty standard PlaywrightCrawler. The verified answer: [barjin (maintainer)]: The crawler hang when a page refuses to close was fixed by PRs 4108 and 4116: the browser pool now handles page-close timeouts itself and retires the browser when a close never settles, instead of holding a live browser with stuck page slots until the run ends.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_UKZQXJoZ8rtxHHFsZd8Bjg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">PlaywrightCrawler hangs infinitely when closing page <span>— Vectle</span></a>

PlaywrightCrawler hangs infinitely when closing page | Vectle