webdriver_manager icon indicating copy to clipboard operation
webdriver_manager copied to clipboard

Raspberry Pi / Linux - arch not properly recognised for Gecko

Open Tuinslak opened this issue 2 years ago • 4 comments

Looks like aarch64 under Linux is not properly recognised. The file exists under releases (https://github.com/mozilla/geckodriver/releases -> geckodriver-v0.33.0-linux-aarch64.tar.gz )

72c4223860da:/# uname -a
Linux 72c4223860da 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 Linux

Inside docker, the script fails:

OSError: [Errno 8] Exec format error: '/root/.wdm/drivers/geckodriver/linux64/v0.33.0/geckodriver'

The downloaded file is an amd64 file:

72c4223860da:/# file /root/.wdm/drivers/geckodriver/linux64/v0.33.0/geckodriver
/root/.wdm/drivers/geckodriver/linux64/v0.33.0/geckodriver: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, BuildID[sha1]=204c340e375aa3e0fd8a9fa16ee94460221f8f1e, with debug_info, not stripped

Tuinslak avatar Sep 05 '23 14:09 Tuinslak

I think this is the same issue I have on an arm Mac, it downloads amd64 not aarch64

stuaxo avatar Sep 13 '23 23:09 stuaxo

Selenium Manager shipped within the linux arm64 driver (for example firefox last one https://github.com/mozilla/geckodriver/releases/download/v0.33.0/geckodriver-v0.33.0-linux-aarch64.tar.gz ) doesn't work on linux-arm64, Yes because the arch is x86 for the selenium-manager, wondering why the binary has been built not for arm64 making troubles. There is a qemu workaround that solves this, I assume it is slower but works...

sudo apt install binfmt-support qemu qemu-user-static

by the way @SergeyPirogov , you need to take care of ubuntu users that does not have firefox but firefox-esr as binary else your manager is unable to find and trigger firefox until doing a symlink with

sudo update-alternatives --install /usr/bin/firefox firefox /usr/bin/firefox-esr 100

sosie-js avatar Sep 21 '23 07:09 sosie-js

I think it replies as well to question of @stuaxo in https://github.com/SergeyPirogov/webdriver_manager/issues/619 . I replied first on https://stackoverflow.com/questions/76857893/is-there-a-known-working-configuration-for-using-selenium-on-linux-arm64/77099069#77099069

sosie-js avatar Sep 21 '23 07:09 sosie-js

Interesting, for Firefox I didn't get into trying too far, since it turns out the codebase I'm working with only used Chrome.

While I do have Chrome for amd64 installed, I'm in a constrained VM so prefer not to do that, Chromium and it's webdriver are already installed in the system so I'd prefer the system to use those than what it does now.

stuaxo avatar Sep 21 '23 16:09 stuaxo