Session not created exception: Chrome version must be >= x.y.z when using Selenium Webdriver with Chrome
Asked Answered
C

4

8

A few notes that make this tricky are that I'm using c9.io (developing in the cloud) so I use the gem webdrivers to be able to run Chrome with Watir, instead of creating an executable path to the Chrome installed on my device.

My code was working until I logged in today and got the error

session not created exception: Chrome version must be >= 64.0.3282.0 (Driver info: chromedriver=2.37.543610 (afd36256570660b5a2f0e4dbd1b040f3dcfe9cb5),platform=Linux 4.9.80-c9 x86_64)

Relevant parts of gemfile (everything else is stock)

gem 'webdrivers'

gem 'watir'

Code I'm trying to compile

def mastersave
    require 'watir'
    @browser = Watir::Browser.new :chrome, headless: true
end

I'm not stuck on the idea of using Chrome, but it's what was working for me. The gem 'webdrivers' also allows me to use firefox, but I get the error 'permission denied' with that.

Conjugated answered 16/3, 2018 at 10:41 Comment(0)
P
6

This error message…

session not created exception: Chrome version must be >= 64.0.3282.0 (Driver info: chromedriver=2.37.543610 (afd36256570660b5a2f0e4dbd1b040f3dcfe9cb5),platform=Linux 4.9.80-c9 x86_64)

…implies that Chrome version must be >= 64.0

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

  • You are using chromedriver=2.37 which is still not GA hence we are not sure about the dependencies but from the error message its clear it won't be supporting Chrome v64.x

Solution

  • To be safer you can:
    • Either downgrade to chromedriver=2.36 where the Release Notes mentions Supports Chrome v63-65
    • Or upgrade to chrome=65.x
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
  • If your base Chrome version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Chrome.
  • Execute your @Test.
Palladino answered 16/3, 2018 at 13:52 Comment(6)
This may be a stupid question, but I'm not sure how to use the latest version of Chrome or how to downgrade my Chromedriver when developing on c9.io Most everything I find on the web talks about how to do these things only when the IDE is on your system and I'm developing in the cloud. If you have a c9 account I can share my repository with you if you want to take a closer look. I would very much appreciate it.Conjugated
@Conjugated I am afraid ... I am a no-vice with c9.ioPalladino
That's ok! Thanks so much for your input so far. It was very helpful in what direction I needed to go.Conjugated
@UweKeim My recommendation would be not to induce the blockquotes to the error trace logs as doing so, debugging becomes difficult as the error messages in the error stack trace gets word wrapped.Palladino
Sorry, if I did modify your article in an unwanted way. Please do roll back my changes, if you like. In my opinion, error messages are not readable if one has to scroll horizontally, therefore the blockquote. If there was a stack trace, I would have not changed it.Naturism
@UweKeim All QAs are community effort and your contribution is always welcome. I just wanted to convey, imo as we are aware of the Selenium error log formats, if they gets word wrapped debugging the error trace logs becomes difficult and time taking.Palladino
H
7

For those that have just had this problem going from Chrome 73 to 74 it might be because you are using chromedriver-helper. Apparently the chromedriver-helper gem was deprecated. I switched to using the webdrivers gem and it fixed the issue.

In Gemfile replace: gem 'chromedriver-helper'

With: gem 'webdrivers', '~> 3.0'

bundle install

Haploid answered 26/4, 2019 at 20:26 Comment(0)
P
6

This error message…

session not created exception: Chrome version must be >= 64.0.3282.0 (Driver info: chromedriver=2.37.543610 (afd36256570660b5a2f0e4dbd1b040f3dcfe9cb5),platform=Linux 4.9.80-c9 x86_64)

…implies that Chrome version must be >= 64.0

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

  • You are using chromedriver=2.37 which is still not GA hence we are not sure about the dependencies but from the error message its clear it won't be supporting Chrome v64.x

Solution

  • To be safer you can:
    • Either downgrade to chromedriver=2.36 where the Release Notes mentions Supports Chrome v63-65
    • Or upgrade to chrome=65.x
  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
  • If your base Chrome version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Chrome.
  • Execute your @Test.
Palladino answered 16/3, 2018 at 13:52 Comment(6)
This may be a stupid question, but I'm not sure how to use the latest version of Chrome or how to downgrade my Chromedriver when developing on c9.io Most everything I find on the web talks about how to do these things only when the IDE is on your system and I'm developing in the cloud. If you have a c9 account I can share my repository with you if you want to take a closer look. I would very much appreciate it.Conjugated
@Conjugated I am afraid ... I am a no-vice with c9.ioPalladino
That's ok! Thanks so much for your input so far. It was very helpful in what direction I needed to go.Conjugated
@UweKeim My recommendation would be not to induce the blockquotes to the error trace logs as doing so, debugging becomes difficult as the error messages in the error stack trace gets word wrapped.Palladino
Sorry, if I did modify your article in an unwanted way. Please do roll back my changes, if you like. In my opinion, error messages are not readable if one has to scroll horizontally, therefore the blockquote. If there was a stack trace, I would have not changed it.Naturism
@UweKeim All QAs are community effort and your contribution is always welcome. I just wanted to convey, imo as we are aware of the Selenium error log formats, if they gets word wrapped debugging the error trace logs becomes difficult and time taking.Palladino
H
2

The following error Chrome version must be >= 64.0.3282.0, says it is NOT compatible with current chromedriver version 2.37

Updating chrome to latest version should solve the issue.

please refer to https://sites.google.com/a/chromium.org/chromedriver/downloads.

Latest Release: ChromeDriver 2.36

Supports Chrome v63-65

Handclap answered 16/3, 2018 at 13:39 Comment(2)
This may be a stupid question, but I'm not sure how to use the latest version of Chrome or how to downgrade my Chromedriver when developing on c9.io Most everything I find on the web talks about how to do these things only when the IDE is on your system and I'm developing in the cloud. If you have a c9 account I can share my repository with you if you want to take a closer look. I would very much appreciate it.Conjugated
I have no idea what is c9.io but as you said it is cloud, could you try by taking remote (RDP) of the machine upgrade the browser?Handclap
K
1

Updating the Google Chrome version to 74 worked for me.

Steps: 1. Go to Help -> About Google Chrome -> Chrome will automatically look for updates(update Chrome to the latest version)

enter image description here

Also, note that you should be having an updated chrome driver.

Keishakeisling answered 9/5, 2019 at 7:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.