Wojciech
10/15/2024, 11:10 AMError 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!Hall
10/15/2024, 11:10 AMondro_k
10/15/2024, 2:42 PMnpx 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](https://github.com/microsoft/playwright/blob/main/packages/playwright-core/browsers.json) chromium-1142
Wojciech
10/15/2024, 4:46 PMondro_k
10/15/2024, 4:59 PMnpx 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:
BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
Wojciech
10/15/2024, 5:03 PMondro_k
10/15/2024, 5:38 PMpackage.json
and package-lock.json
same on both machines?Wojciech
10/15/2024, 6:08 PMondro_k
10/16/2024, 12:28 PMnpx playwright --version
, do you get the same versions on both machines?ondro_k
10/16/2024, 4:30 PMnode_modules
and .cache/ms-playwright/*
, then run npm install
and then npx playwright install
and it should install the same chromium version