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

WebdriverManager does not download the correct architecture for my Apple M1 #697

Closed
iamlevik opened this issue Sep 8, 2021 · 4 comments
Closed

Comments

@iamlevik
Copy link

iamlevik commented Sep 8, 2021

Description of the problem:
The issue seems to be that whenever I auto download the Chromedriver, it chooses the Intel version rather than the ARM64 for M1 Chips. How can I ensure it downloads the correct architecture?

Browser and version:
Version 93.0.4577.63 (Official Build) (arm64)

Operating system: macOS Big Sur Version 11.5.2

WebDriverManager version: 5.0.1

WebDriverManager call:

WebDriverManager traces:
14:14:22.762 [main] INFO n.s.c.w.d.ChromeDriverProvider - Using automatically driver download
14:14:22.984 [main] INFO i.g.bonigarcia.wdm.WebDriverManager - Using chromedriver 93.0.4577.15 (resolved driver for Chrome 93)
14:14:22.990 [main] INFO i.g.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as /Users/levi/.cache/selenium/chromedriver/mac64/93.0.4577.15/chromedriver

Error log:

@bonigarcia
Copy link
Owner

I wasn't aware about the ARM64 versions of chromedriver in Mac. I think it's the artifact which contains m1 in the chromedriver repository:

https://chromedriver.storage.googleapis.com/index.html?path=93.0.4577.63/

I have just committed a patch to support it. Unfortunately I don't have a Mac to test it. Can you please test it your machine?

You should to bump WebDriverManager to 5.0.2-SNAPSHOT. This version (containing the last patch) is in the sonatype snapshots repositories. If using Maven, you also need to include the following:

    <repositories>
        <repository>
            <id>oss.sonatype.org-snapshot</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

... its equivalent in Gradle:

repositories {
    maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

To ensure you are using a fresh cache, you can invoke WebDriverManager as follows:

WebDriverManager.chromedriver().clearDriverCache().setup();

To check that the patch is working, you should see that WebDriverManager is downloading the m1 artifact, i.e.:

Downloading https://chromedriver.storage.googleapis.com/93.0.4577.63/chromedriver_mac64_m1.zip

@iamlevik
Copy link
Author

iamlevik commented Sep 9, 2021

Screenshot 2021-09-09 at 23 35 23
Hey, thanks for the prompt response, this is what I'm encountering.

@bonigarcia
Copy link
Owner

5.0.2-SNAPSHOT

@iamlevik
Copy link
Author

iamlevik commented Sep 9, 2021

Screenshot 2021-09-10 at 00 04 08
Sorry, my bad, tired.

@bonigarcia great job, works like a charm! You're a star!

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

2 participants