Rayrun
← Back to Discord Forum

I'm using Linux Kernel as the OS and getting Playwright Exception: Failed to launch driver

Cannot run program /tmp/playwright-java-xxxxxxxx/playwright.sh Permission denied. Can some one please help me how to resolve this issue?

This thread is trying to answer question "How to resolve the Playwright Exception: Failed to launch driver on Linux Kernel and why it is trying to look for the drivers in Linux when the tests will run on Selenium grid configured with Mac?"

14 replies

Only Debian 11, Ubuntu 20, and Ubuntu 22 are supported as of today.

codendeavor

I have checked with Ubuntu and Fedora both work as of now

Is there any work around that we can do for now?

Like copying chromium browser and placing it in the directory and using it?

And if I have to copy the chromium browser, how do we get this for linux and also which directory path I need to place it and how to override the path from code? @mxschmitt

which linux distribution are you using?

4.1.12-124.72.2.e17uek | OL 7.9

Kernel and OS

Oracle Linux 7.9 @mxschmitt

Yeah not supported, you can try Docker: https://playwright.dev/docs/docker or run it on an official supported linux distro.

im just wondering, Im using Linux to download my code and actual tests will run on Selenium grid which is configured with Mac

why it is trying to look the drivers in Linux?

any pointers @mxschmitt

The language bindings require a driver to run. If our Node.js which we are shipping runs on your distro, then it should work (but without any official support.)

Answer

Fixing Permission Issues with playwright.sh on Linux

Here's a quick guide to help you resolve permission issues with playwright.sh on Linux.

Check Your Permissions

First, ensure you have the right permissions to execute playwright.sh. Use the chmod command to grant executable permissions:

chmod +x playwright.sh

Verify File Ownership

Next, check that playwright.sh is owned by a user with sufficient privileges. Use the ls -l command to view file ownership and permissions.

Try Running as Root

If you're still having issues, try running playwright.sh as root or using sudo. But be careful, running scripts as root can pose security risks.

Check Dependencies

Make sure all necessary dependencies for Playwright, like Node.js and other required packages, are installed on your system.

Look for Conflicting Processes

If the problem persists, check for any conflicting processes that might interfere with Playwright's execution. Use tools like ps or Task Manager to identify and terminate these processes.

Review Docker Configuration

If you're using Docker with Playwright, review your Docker configuration settings. Make sure they align with Playwright's recommendations regarding memory allocation (--ipc=host) and other potential issues specific to Chromium usage within Docker containers.

Seek Community Support

Finally, if none of these steps work, consider reaching out to the Playwright community for further assistance through their official forums or GitHub repository issue tracker.

Remember, these steps are general recommendations. The specific solution to your permission issue may vary depending on your system configuration, environment, and any additional error messages or logs you encounter.

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].