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
Which package is this bug report for? If unsure which one to select, leave blank
@crawlee/playwright (PlaywrightCrawler)
Issue description
Description
I'm developing a Crawlee-based application on Windows and deploying it on AWS (Amazon Linux 2). I'm encountering an issue where the application is unable to locate the correct browser directory after deployment.
Environment
Development: Windows
Deployment: AWS Elastic Beanstalk (Amazon Linux 2, Fedora-based)
Crawlee version: 3.11.1
Playwright version: 1.44.1
Node.js version: >=18
Issue
When running the application on AWS, I receive the following error:
ERROR: Error processing batch: {
"errorName": "BrowserLaunchError",
"errorMessage": "Failed to launch browser. Please check the following:
- Try installing the required dependencies by running `npx playwright install --with-deps` (https://playwright.dev/docs/browsers).
The original error is available in the `cause` property. Below is the error received when trying to launch a browser:
",
"stackTrace": "Failed to launch browser. Please check the following:
- Try installing the required dependencies by running `npx playwright install --with-deps` (https://playwright.dev/docs/browsers).
The original error is available in the `cause` property. Below is the error received when trying to launch a browser:
browserType.launchPersistentContext: Executable doesn't exist at /home/webapp/.cache/ms-playwright/chromium-1117/chrome-linux/chrome
Details
On Windows (development environment), Playwright installs Chromium version 1117.
On Amazon Linux 2 (deployment environment), Playwright installs Chromium version 1140.
The application is trying to locate the browser in the directory for version 1117, which doesn't exist on the deployment server.
Installation Process
I've set up the following to install Chromium and its dependencies:
In .ebextensions/chromium.config, I install necessary packages:
Hello, and thank you for your interest in this project!
I'm not sure this is a Crawlee issue - I can imagine this is caused by the Amazon environment or Playwright itself. Crawlee really just runs Playwright with chromium.launch() etc.
If you're struggling with getting Playwright to run the right executable binary, you can pass launch options from Crawlee with:
Does this solve your problem? I'll keep this issue open for a bit more, but as I mentioned earlier, I'm quite positive this has got nothing to do with Crawlee, but... stranger things have happened.
@barjin hi, it was an issue with my pipelines where prev developer do "npm I -no-package-lock" which resulted with updating crawlee version and therefore npx playwright install was installing newer version. By the way properly executePath did not worked
This issue is not related to crawlee so it can be closed.
Which package is this bug report for? If unsure which one to select, leave blank
@crawlee/playwright (PlaywrightCrawler)
Issue description
Description
I'm developing a Crawlee-based application on Windows and deploying it on AWS (Amazon Linux 2). I'm encountering an issue where the application is unable to locate the correct browser directory after deployment.
Environment
Issue
When running the application on AWS, I receive the following error:
Details
Installation Process
I've set up the following to install Chromium and its dependencies:
.ebextensions/chromium.config
, I install necessary packages:.platform/hooks/predeploy/chromium.sh
, I run the following script:Attempted Solution
I tried renaming the directory on the deployment server from
chromium-1140
tochromium-1117
, but this did not resolve the issue.Questions
Additional Information
package.json
can be provided if needed.Code sample
No response
Package version
3.11.1
Node.js version
18
Operating system
Amazon Linux 2 (Fedora underneath)
Apify platform
I have tested this on the
next
releaseNo response
Other context
No response
The text was updated successfully, but these errors were encountered: