简体   繁体   中英

org.openqa.selenium.NoSuchSessionException: invalid session id message= This version of ChromeDriver only supports Chrome version 74

I 'm trying to connect to Chrome Version 76 and chromedriver 76 as well!

I have tried all of the version of the chromedriver but seems that no one is working

org.openqa.selenium.NoSuchSessionException: invalid session id
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 12 milliseconds
Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000'
System info: host: 'KASTIOT', ip: '192.168.0.104', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_111'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{message=session not created: This version of ChromeDriver only supports Chrome version 74
  (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17134 x86_64), platform=ANY}]
Session ID: 85ef5c2570c97d5b10f13f818d4096f4
  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.ErrorHandler.createThrowable(ErrorHandler.java:216)
  at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168)
  at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:638)
  at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:325)
  at org.openqa.selenium.remote.RemoteWebDriver$RemoteNavigation.to(RemoteWebDriver.java:915)
  at stepdefs.websitesteps.ZitiCard.goToWebsite(ZitiCard.java:30)
  at ✽.Given Go to website(C:/Users/lotib/Desktop/recyclego 2/src/test/java/website/ZitiCard.feature:5)

To make sure that it goes to the link I wrote down and follow the Scenarios??

Help would be great :)

NoSuchSessionExpection happens when you try to perform any actions after webdriver.quit(). Make sure you are not calling any command after webdriver.quit().

I had a similar problem. simply passing --disable-dev-shm-usage to chrome did the trick.

Chrome crashes

Chrome uses /dev/shm for runtime data which is 64MB by default under Docker. If this is > not sufficient then this can cause Chrome to crash. Possible workarounds:

  • Increase the size of /dev/shm
  • Mount /dev/shm to the host's
  • Start Chrome with the flag --disable-dev-shm-usage

source: https://github.com/markhobson/docker-maven-chrome#chrome-crashes

This error message...

org.openqa.selenium.NoSuchSessionException: invalid session id
(Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 12 milliseconds
Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000'
System info: host: 'KASTIOT', ip: '192.168.0.104', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_111'

...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser ie Chrome Browser session.

Your main issue is the incompatibility between the version of the binaries you are using as follows:

  • You are using chromedriver=74.0
  • Release Notes of chromedriver=74.0 clearly mentions the following :

Supports Chrome v74

  • Presumably you are using chrome= 75.0 or chrome= 76.0
  • Release Notes of ChromeDriver v75.0 clearly mentions the following :

Supports Chrome 75

  • Your Selenium Client version is 3.3.1 of 2017-03-10 09:10:29 +0000 which is almost 2 years older.
  • Your JDK version is 1.8.0_111 which is pretty ancient.

So there is a clear mismatch between the JDK v8u111 , Selenium Client v3.3.1 , ChromeDriver v74.0 and the Chrome Browser v75.0


Solution

Ensure the following:

  • JDK is upgraded to current levels JDK 8u212 .
  • Selenium is upgraded to current levels Version 3.141.59 .
  • ChromeDriver is updated to current ChromeDriver v76.0 level.
  • Chrome is updated to current Chrome Version 76.0 level. (as per ChromeDriver v76.0 release notes )
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • Take a System Reboot .
  • Execute your @Test as non-root user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM