PlaywrightCrawler hangs infinitely when closing page
Author: metalwarrior665Created Mar 14, 2023Updated Sep 4, 2026
Labelsbugt-tooling
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
// The code is pretty standard PlaywrightCrawler.
// target URL is https://www.tiktok.com/@bayashi.tiktok/video/7197712678431902977
// The bug happens pretty consistently if the page keeps loading for 60 secs when the navigation timeout happens
{
proxyConfiguration: proxyConfig,
launchContext: {
launchOptions: {
timezoneId: 'America/New_York',
locale: 'en/US',
} as any,
useChrome: true,
},
browserPoolOptions: {
maxOpenPagesPerBrowser: 1,
fingerprintOptions: {
fingerprintGeneratorOptions: {
screen: {
minWidth: 800,
maxWidth: 1280,
minHeight: 480,
maxHeight: 800,
},
},
},
},
headless: false,
maxConcurrency: 1,
sessionPoolOptions: {
maxPoolSize: 150,
sessionOptions: {
maxErrorScore: 1,
},
},Package version
3.1.3
Node.js version
v16.17.1
Operating system
No response
Apify platform
- Tick me if you encountered this issue on the Apify platform
I have tested this on the next release
No response
Other context
No response
Source: apify/crawlee