session not created: This version of ChromeDriver only supports Chrome version 77
Description of the problem I am using webdrivermanager to manage chromedriver.exe. But it isn't finding my chrome.exe binary, so it defaults to the latest chromedriver.exe version. And at the moment this results in a version conflict.
Browser and version Google Chrome Version 76.0.3809.132 (Official Build) (64-bit)
Operating system Windows 10 Pro, Version 1903
WebDriverManager version 3.7.0
WebDriverManager use
This does not work:
WebDriverManager.chromedriver().setup();
But this does:
WebDriverManager.chromedriver().browserPath((System.getenv("LOCALAPPDATA") + "\\Google\\Chrome\\Application\\chrome.exe").replace("\\", "\\\\")).setup()
This isn't something I know a great deal about, but it appears that Google has started putting Chrome in a new location on Windows. The company I work for manages our Chrome version, but this doesn't appear to be specific to our configuration. This is code is from another "Chrome driver manager" that uses the LOCALAPPDATA environment variable to find Chrome: https://github.com/karma-runner/karma-chrome-launcher/blob/master/index.js#L62.
WebDriverManager traces 08:55:08.491 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Reading https://chromedriver.storage.googleapis.com/ to seek chromedriver 08:55:08.659 [main] INFO io.github.bonigarcia.wdm.Downloader - Downloading https://chromedriver.storage.googleapis.com/77.0.3865.40/chromedriver_win32.zip 08:55:08.940 [main] INFO io.github.bonigarcia.wdm.Downloader - Extracting binary from compressed file chromedriver_win32.zip 08:55:09.088 [main] INFO io.github.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as C:\Users\sbishop.m2\repository\webdriver\chromedriver\win32\77.0.3865.40\chromedriver.exe
Error trace Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 77 Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'SBISHOP18', ip: '10.2.5.175', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_212' Driver info: driver.version: ManualSuperDriver remote stacktrace: Backtrace: Ordinal0 [0x003BEB13+1501971] Ordinal0 [0x0033F6D1+980689] Ordinal0 [0x002C765F+489055] Ordinal0 [0x0025F2F4+62196] Ordinal0 [0x0025BCDA+48346] Ordinal0 [0x00279800+169984] Ordinal0 [0x0027942D+169005] Ordinal0 [0x002778EB+162027] Ordinal0 [0x00260AC7+68295] Ordinal0 [0x00261B40+72512] Ordinal0 [0x00261AD9+72409] Ordinal0 [0x00358F37+1085239] GetHandleVerifier [0x0045D7ED+503293] GetHandleVerifier [0x0045D580+502672] GetHandleVerifier [0x004646AC+531644] GetHandleVerifier [0x0045DFFA+505354] Ordinal0 [0x00350606+1050118] Ordinal0 [0x0035047F+1049727] Ordinal0 [0x0035AF9B+1093531] Ordinal0 [0x0035B103+1093891] Ordinal0 [0x0035A095+1089685] BaseThreadInitThunk [0x775E6359+25] RtlGetAppContainerNamedObjectPath [0x77A47B74+228] RtlGetAppContainerNamedObjectPath [0x77A47B44+180]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
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.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
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)
I've committed a path to read LOCALAPPDATA as fallback of PROGRAMFILES. Could you please have a try @sambishop ? You would need to clone and build WebDriverManager from GitHub (development version 3.7.1-SNAPSHOT).
If everything is all right, WebDriverManager.chromedriver().setup(); should work for you. If not, please enable the DEBUG level for WebDriverManager traces and tell what you see.
Thanks a lot for reporting and contributing.
I cleared the cache in the Windows registry and confirmed that it gets the right version. Looks good. Thank you!
Version 3.7.1. is out.
@bonigarcia This issue is occurring again with the latest stable version of Chrome 79.0.3945.79. On both Windows and Mac.
@rmedina6 This is a closed issue. Please report the problem as a new issue following the template (wdm version, traces, and so on).
@bonigarcia This issue is occurring again with the latest stable version of Chrome 79.0.3945.79. On both Windows and Mac.
facing same issue
I have created a new issue for this problem. pls check @bonigarcia https://github.com/bonigarcia/webdrivermanager/issues/462
I think you can fixed at webdrivermanager. . Can input current version browser. Example version(80). Try it!