`launchContext.launcher` uses `chrome` on Platform despite being set to `firefox`
const crawler = new PlaywrightCrawler({
launchContext: {
launcher: playwright.firefox,
},
async requestHandler({ page }) { ... },
});
await crawler.run(['https://api.apify.com/v2/browser-info?1', 'https://api.apify.com/v2/browser-info?2']);
https://console.apify.com/view/runs/1phBbPE1cYSU5gF2a https://github.com/apify/crawlee/actions/runs/2841856507
I see you're using the Chrome Dockerfile. Firefox is not installed in that one. You need to use the Firefox one.
FROM apify/actor-node-playwright-chrome:16
⬇️
FROM apify/actor-node-playwright-firefox:16
Maybe SDK or Crawlee (not sure where the dockerfile definitions live now, I guess in Crawlee) could throw a helpful error if running in Docker and the browser is not installed @B4nan ?
Dockerfiles are in the templates, crawlee has its own templates just like apify-cli has, it would be better to have this handled in both.
But looking at the logs, I dont see any easily understandable error message we could catch and rethrow, it seems quite criptic to me. Maybe we could check it explicitly somehow (even via env vars that would be added to the base docker images.
Yeah, an explicit check would be best. Either somehow check if the browser is installed in its expected location or via the env var.