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

Unable to get a version that matches the Chrome driver installed on the local machine #632

Closed
myConsciousness opened this issue Apr 14, 2021 · 6 comments
Labels

Comments

@myConsciousness
Copy link

Description of the problem:
First of all, I would like to thank you for this wonderful open source activity :)

I tried to resolve the web driver version using this manager as usual. But when I ran it today, I got an error like it's getting a Chrome 90 driver, even though the Chrome installed on my client machine is version 89.

The detailed information is as described below.

Browser and version:
89.0.4389.128

Operating system:
os.name: 'Mac OS X',
os.arch: 'aarch64',
os.version: '11.2.3'

WebDriverManager version:
4.4.0

WebDriverManager traces:

    org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 90
    Current browser version is 89.0.4389.128 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'xxxxxxxxx', ip: 'xxxx:xxxxx:xxxx:xxxx:xxxx:xxxxx:xxxx:xxxx%en0', os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '11.2.3', java.version: '15.0.2'
    Driver info: driver.version: ChromeDriver
    remote stacktrace: 0   chromedriver                        0x0000000104d16cc9 chromedriver + 2718921
    1   chromedriver                        0x00000001053d3143 chromedriver + 9781571
    2   chromedriver                        0x0000000104aa8218 chromedriver + 168472
    3   chromedriver                        0x0000000104acdd59 chromedriver + 322905
    4   chromedriver                        0x0000000104ac99bc chromedriver + 305596
    5   chromedriver                        0x0000000104ac5fd1 chromedriver + 290769
    6   chromedriver                        0x0000000104afdfb2 chromedriver + 520114
    7   chromedriver                        0x0000000104af8ed3 chromedriver + 499411
    8   chromedriver                        0x0000000104acfd9f chromedriver + 331167
    9   chromedriver                        0x0000000104ad103d chromedriver + 335933
    10  chromedriver                        0x0000000104ce15f9 chromedriver + 2500089
    11  chromedriver                        0x0000000104cef8a5 chromedriver + 2558117
    12  chromedriver                        0x0000000104cf080f chromedriver + 2562063
    13  chromedriver                        0x0000000104cc5741 chromedriver + 2385729
    14  chromedriver                        0x0000000104cf0d1f chromedriver + 2563359
    15  chromedriver                        0x0000000104cd6c3c chromedriver + 2456636
    16  chromedriver                        0x0000000104d0a398 chromedriver + 2667416
    17  chromedriver                        0x0000000104d0a55a chromedriver + 2667866
    18  chromedriver                        0x0000000104d1bd18 chromedriver + 2739480
    19  libsystem_pthread.dylib             0x00007fff20342950 _pthread_start + 224
    20  libsystem_pthread.dylib             0x00007fff2033e47b thread_start + 15
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
        at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
        at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
        at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
        at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
        at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
        at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
        at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
        at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
        at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
        at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
        at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
        at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
...

Implementation:

WebDriverManager.chromedriver().setup();
@Kobe
Copy link

Kobe commented Apr 14, 2021

same here, v4.3.1 works. with Chrome 89.x

@bonigarcia
Copy link
Owner

Thanks for reporting. Indeed it's a problem of version 4.4.0. I'm working on it.

@blacelle
Copy link

Same issue here. Just in case, it seems the issue is in the command referring to Chrome:

"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome --version"

and VersionDetector.getBrowserVersionUsingCommand(String) which does split over whitespaces, while there is one in 'Google Chrome'

@mookkiah
Copy link

@blacelle comment helped me to realize I have Chrome version 90

% /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version 
Google Chrome 90.0.4430.72 

But strangely my "About Google Chrome" page shows version 89.

I started Chrome using commandline % /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome to double check the version. There it was showing version 90.

Once I relaunched the existing browser where Chrome said 89, Chrome came up with version 90.
I wonder the automatic update downloaded latest Chrome version (90) and but not really activating it unless all the Chrome instances are stopped or asked for relaunch.

FYI: even with WDM 4.3.1 brought chromedriver version 90 while I had browser version 89 opened.

Hope this helps or gives some hint.

@bonigarcia
Copy link
Owner

This problem should be fixed in version 4.4.1, just released.

@Kobe
Copy link

Kobe commented Apr 22, 2021

Thanks!

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

No branches or pull requests

5 participants