browserType.launchPersistentContext: Browser closed

I'm getting the below error when running Playwright. The problem will lie with the chromium executable, but I'm not sure why. I have my executable path set: executablePath: '/tmp/chromium/chrome-linux/chrome',. This chrome executable was downloaded from Playwright's hosted file, so I didn't think there would be a compatibility issue: https://playwright.azureedge.net/builds/chromium/1060/chromium-linux.zip Extra context: I'm running this in an AWS Lambda (x86_64).
{
"totalErrors": 1,
"uniqueErrors": 1,
"mostCommonErrors": [
"1x: browserType.launchPersistentContext: Browser closed. (/opt/nodejs/node_modules/@crawlee/browser-pool/playwright/playwright-plugin.js:99:40)"
]
}
{
"totalErrors": 1,
"uniqueErrors": 1,
"mostCommonErrors": [
"1x: browserType.launchPersistentContext: Browser closed. (/opt/nodejs/node_modules/@crawlee/browser-pool/playwright/playwright-plugin.js:99:40)"
]
}
Anyone know what this could be?
2 Replies
ratty-blush
ratty-blush3y ago
Could be something with the dockerfile. Here is the guy on stackoverflow with the same issue (+ his solution): https://stackoverflow.com/questions/74696909/error-in-aws-elastic-beanstalk-for-using-playwrightcrawler-package
other-emerald
other-emeraldOP3y ago
Thanks for the SO link, you're right this looks like the same issue I'm facing. I'm not actually using docker, but I might look at going down this road. Cheers!

Did you find this page helpful?