Apify and Crawlee Official Forum

Updated 3 months ago

Apify won't load the Crawlee/Playwright browser

Hi everyone. I've built a scrapping tool Using Crawlee and Playwright and while it runs successfully locally, when I deploy to apify, it gives me an error: Error processing sheet test-sheet: Failed to launch browser. Please check the following:
2024-06-11T16:04:09.691Z - Make sure your Dockerfile extends apify/actor-node-playwright-* (with a correct browser name).
2024-06-11T16:04:09.692Z - Try installing the required dependencies by running npx playwright install --with-deps (https://playwright.dev/docs/browsers).
2024-06-11T16:04:09.693Z
2024-06-11T16:04:09.694Z The original error is available in the cause property. Below is the error received when trying to launch a browser:
2024-06-11T16:04:09.695Z ​
2024-06-11T16:04:09.696Z browserType.launchPersistentContext: Executable doesn't exist at /root/.cache/ms-playwright/firefox-1449/firefox/firefox

Is there something I'm missing regarding the browser dependency and how it operates within Apify?
Attachment
Screenshot_393.png
M
1 comment
The platform needs a different Dockerfile depending on which crawler you are using: Cheerio, Playwright or Puppeteer. If you did not start your project from a template or changed the crawler after its creation, you should adjust the Dockerfile accordingly.
Create a new apify project with the CLI, running apify create, and select playwright as a template. Then, just copy the Dockerfile to your project. πŸ™‚
Add a reply
Sign up and join the conversation on Discord