[FAIL] Error: browserType.launch: Host system is missing dependencies to run browsers

I’m trying to run a browser test on linux (AlmaLinux 8.10 -Cerulean Leopard), and get the following error.

Have installed node.js, Browser library and succesfully run rfbrowser init.

THE ERROR:
[FAIL] Error: browserType.launch:
╔══════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers. ║
║ Please install them with the following command: ║
║ ║
║ sudo npx playwright install-deps ║
║ ║
║ Alternatively, use apt: ║
║ sudo apt-get install libatk-bridge2.0-0\ ║
║ libdrm2\ ║
║ libatspi2.0-0\ ║
║ libgbm1\ ║
║ libasound2 ║
║ ║
║ <3 Playwright Team ║
╚══════════════════════════════════════════════════════╝

Installed Python version is Python 3.11.7
Installed Browser library version is: “18.0.0”
Robot Framework version: “6.1.1”
Installed Playwright is: “1.40.0”

according to the playwright issue tracker[0], centos (and thus also alma and rockylinux) is not officially supported. Easiest way out would probably be to move the execution into into a container.

[0] - [Feature] Support CentOS · Issue #9199 · microsoft/playwright · GitHub

1 Like

You could also try to run: rfbrowser init --with-deps, it will install some missing dependencies. I do not know what it does, we just pass the argument as is to Playwright install process.

If that does not work, running in other than supported Linux is possible, but you need to figure out by yourself what dependencies you are missing. That is some sort of mystery what those are and you need to do digging information from Playwright documentation or/and discussions.

Have you given tough about using docker?

1 Like

@aaltat Sort of got the impressions that the issue is at least partially with browser binaries being compiled with a certain version of glibc. So, even if the actual dependencies would be correct to run the browser, one probably would need to use binaries pre-installed ( Browsers | Playwright )

Yes, if that is the case then it’s easier to change Linux distribution.