Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x86_64 erroneously downloaded on arm64 #619

Closed
stuaxo opened this issue Sep 8, 2023 · 3 comments
Closed

x86_64 erroneously downloaded on arm64 #619

stuaxo opened this issue Sep 8, 2023 · 3 comments

Comments

@stuaxo
Copy link

stuaxo commented Sep 8, 2023

I have a project on arm64 that uses webdriver_manager, unfortunately it's downloading the chromedriver for x86_64.

I'm running this in docker, where I install chromium and chromedriver, so I would be happy to use the system chromedriver[1], fact I don't even know if the corresponding version of the chromedriver to the chromium installed in ubuntu is easily available for download.

Version: 4.0.0

root@ca98eb61db26:/app# pip freeze | grep webdriver-manager
webdriver-manager==4.0.0

OS: Ubuntu 22.04, aarch64 (In Qemu / on Mac m2)

root@ca98eb61db26:/app# uname -m
aarch64
root@ca98eb61db26:/app# file /root/.wdm/drivers/chromedriver/linux64/114.0.5735.90/chromedriver
/root/.wdm/drivers/chromedriver/linux64/114.0.5735.90/chromedriver: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=42432337a91f9dc908c4ae8e6cf7daa31f730bee, stripped
$ /usr/bin/chromedriver --version
...
ChromeDriver 116.0.5845.110 (5128dafac6222fd3ac218660ab6dbf7ff260d768-refs/branch-heads/5845@{#1518})

$ /usr/bin/chromium-browser --version
Chromium 116.0.5845.110 snap

As a hack / workaround I generate a drivers.json to point at the correct chromedriver, is there an official way to do this ?

#!/bin/bash
# use-system-chromedriver

if [[ $(which chromedriver) == "" ]]; then
  echo "Chromedriver not found on the system." exit 1
fi

JSON="{\
  \"linux64_chromedriver_latest_for_\": {\
    \"timestamp\": \""$(date +%d/%m/%Y)"\",\
    \"binary_path\": \"/usr/bin/chromedriver\"\
  }\
}"

echo "$JSON" > ~/.wdm/drivers.json

Or oneliner, (for docker):

mkdir -p ~/.wdm; printf '{"linux64_chromedriver_latest_for_":{"timestamp":"%s","binary_path":"/usr/bin/chromedriver"}}\n' $(date "+%d/%m/%Y") > ~/.wdm/drivers.json

Originally I errorniously reported this here
bonigarcia/webdrivermanager#1125

@stuaxo stuaxo changed the title x86_64 downloaded on arm64 x86_64 erroneously downloaded on arm64 Sep 8, 2023
@borosilicate
Copy link

borosilicate commented Oct 2, 2023

Hello @SergeyPirogov I had this issue as well on the Raspberry pi as well. Could you assign the issue to me to work on?

@The-Judge
Copy link

This is an 1:1 duplicate of #616
Please have this one closed.

@stuaxo
Copy link
Author

stuaxo commented Apr 8, 2024

Closing as it's a duplicate of #616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants