Skip to content

playwright-cli is still broken on ARM #326

@d4rky-pl

Description

@d4rky-pl

#210 was closed as fixed but as far as I can tell it's still broken:

Reproduction steps

Run this in Docker container on ARM Mac or an ARM Linux machine:

$ npm install -g @playwright/cli@latest
added 4 packages in 1s

1 package is looking for funding
  run `npm fund` for details
$ playwright-cli open http://example.com
browserType.launch: Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome
Run "npx playwright install chrome"

Trying to install Chrome obviously fails:

$ npx playwright install chrome
Need to install the following packages:
playwright@1.58.2
Ok to proceed? (y) y
++ arch
+ [[ aarch64 == \a\a\r\c\h\6\4 ]]
+ echo 'ERROR: not supported on Linux Arm64'
ERROR: not supported on Linux Arm64
+ exit 1
Failed to install browsers
Error: Failed to install chrome

Installing Chromium instead does not help:

$ npx playwright install chromium
Downloading Chrome for Testing 145.0.7632.6 (playwright chromium v1208) from https://cdn.playwright.dev/dbazure/download/playwright/builds/chromium/1208/chromium-linux-arm64.zip
179.6 MiB [====================] 100% 0.0s
Chrome for Testing 145.0.7632.6 (playwright chromium v1208) downloaded to /root/.cache/ms-playwright/chromium-1208
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux-arm64.zip
1.6 MiB [====================] 100% 0.0s
FFmpeg (playwright ffmpeg v1011) downloaded to /root/.cache/ms-playwright/ffmpeg-1011
Downloading Chrome Headless Shell 145.0.7632.6 (playwright chromium-headless-shell v1208) from https://cdn.playwright.dev/dbazure/download/playwright/builds/chromium/1208/chromium-headless-shell-linux-arm64.zip
106.4 MiB [====================] 100% 0.0s
Chrome Headless Shell 145.0.7632.6 (playwright chromium-headless-shell v1208) downloaded to /root/.cache/ms-playwright/chromium_headless_shell-1208

$ playwright-cli open http://google.com
browserType.launch: Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome
Run "npx playwright install chrome"

Using --browser chromium explicitly:

$ playwright-cli open --browser chromium http://google.com
Browser "chromium" is not installed. Run `playwright-cli install-browser chromium` to install

but the command is broken anyway and complains about the last used browser not being installed

$ playwright-cli install-browser chromium
Browser "chromium" is not installed. Run `playwright-cli install-browser chromium` to install
$ playwright-cli install-browser firefox
Browser "chromium" is not installed. Run `playwright-cli install-browser chromium` to install

Either the command is still hardcoded to expect Google Chrome or the documentation on how to proceed on ARM could be improved

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions