Mind Dump, Tech And Life Blog
written by Ivan Alenko
published under license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)copy! share!
posted at 05. Dec '20

Fix “This version of ChromeDriver only supports Chrome version 79” in Rails

So…I don’t remember why, but I added this into rails_helper.rb long time ago:

require 'webdrivers'
Webdrivers::Chromedriver.required_version = '79.0.3945.36'

When I ran tests recently, of course I got this error:

Selenium::WebDriver::Error::SessionNotCreatedError:
  session not created: This version of ChromeDriver only supports Chrome version 79

I just commented it out and everything worked as it should.

Even when I updated Chromedriver manually, it got downgraded automatically when I ran the test:

$ RAILS_ENV=test rails webdrivers:chromedriver:update
2020-12-01 22:43:12 INFO Webdrivers Updated to chromedriver 87.0.4280.20

$ bin/rspec spec/system/articles/create_comment_spec.rb

Failures:

  1) user creates a comment under article creates a comment
     Got 0 failures and 2 other errors:

     1.1) Failure/Error: visit article_path(article.pretty_id)

          Selenium::WebDriver::Error::SessionNotCreatedError:
            session not created: This version of ChromeDriver only supports Chrome version 79

$ ~/.webdrivers/chromedriver --version
ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945@{#614})

Also uninstalling chromedriver from homebrew can help, but I can’t verify.

Add Comment