Apify and Crawlee Official Forum

Updated 2 months ago

chromium version error in path

Hey Playwright creators! 👋

I'm running into a frustrating issue with Playwright and Chromium, and I could really use some help. Here's what's going on:

The Error:
Plain Text
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:

browserType.launchPersistentContext: Executable doesn't exist at /home/webapp/.cache/ms-playwright/chromium-1117/chrome-linux/chrome


The Situation:
  • Playwright is looking for Chromium in /home/webapp/.cache/ms-playwright/chromium-1117/chrome-linux/chrome
  • But I actually have Chromium installed at /home/webapp/.cache/ms-playwright/chromium-1140/chrome-linux/chrome
My Question:
How the hell can I specify which Chromium version Playwright should use? 🤔

I don't want to specify this in ENV since I want it to work out of the box and use playwright version that it install

Any help would be greatly appreciated. I'm pulling my hair out over here! 😫

Thanks in advance!
o
W
10 comments
Hey,

running npx playwright install --with-deps should fix this - it will install the correct version of chrome that playwright expects.

You may also try to update your playwright dependency, chromium-1117 is pretty old, the latest playwright uses chromium-1142
@ondro_k I cannot run this command since I’m running it on AWS EC2 -> elasticbeanstalk which use Fedora underneath

Playwright support only Ubuntu (—with-deps will run apt command underneath - Ubuntu package manager)

Fedora (therefore Amazon Linux 2, uses yum as package manager)

I already installed in other script all packages that are installed with —with-deps flag)
aaah, I see. Can you try to run npx playwright install (without --with-deps)? I tested it on my Fedora and it worked. It still uses ubuntu binaries but it should work fine even on Fedora:
Plain Text
BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
But I don’t have issue with installing chromium

I have problem that playwright is looking for directory called chromium-1117 (I develop on windows machine and npx plawright install chromium —with-deps download chromium-1117 - I guess it’s the newest version for windows)


And when I run npx playwright install chromium on Linux it will download the newest one for Linux which is chromium-1140

So this is my issue that my playwright code is looking for chromium version that is the newest on windows and not Linux
just to make sure...is your package.json and package-lock.json same on both machines?
Of course… why? @ondro_k
it looks like you're using different playwright versions...if you run npx playwright --version, do you get the same versions on both machines?
I think playwrigh uses same browser version for all OSes...what I would do is to remove node_modules and .cache/ms-playwright/*, then run npm install and then npx playwright install and it should install the same chromium version
I figure out what was the issue - my pipelines - it was “npm I —no-package-lock” which updated node_modules and then I did npx playwright install which installed newer version and my build wanted to use the older
@ondro_k what was exactly what I did the day before you answer 😄 thank you for your help this can be marked as answer
Add a reply
Sign up and join the conversation on Discord