Martin Edelmann
Martin Edelmann

Reputation: 47

RSpec: session not created: This version of ChromeDriver only supports Chrome version 76

We have a Ruby project and had to update our Ruby version from 2.4 to 2.6. That, who would have guessed it, broke our build. Exact version of Ruby is this:

ruby 2.6.1p33 (2019-01-30 revision 66950) [x64-mingw32]

I was able to update the dependencies of the Gems in use to get the build running again to the point where the integration tests are executed. Here I receive the following error by RSpec:

RSpec::Core::MultipleExceptionError: session not created: This version of ChromeDriver only supports Chrome version 76
  (Driver info: chromedriver=76.0.3809.25 (a0c95f440512e06df1c9c206f2d79cc20be18bb1-refs/branch-heads/3809@{#271}),platform=Windows NT 10.0.17763 x86_64)

I'm kinda confused by this message, since Chrome 76 isn't even out yet and the build agent reporting this error still has Chrome 74 installed. So I have no idea why it wants to use Chrome 76.

The only dependency of anything Chrome-related in Gemfile.lock is chromedriver-helper, which is still locked at version 1.0.0. I already tried updating this Gem or using Webdriver instead. But both aprroaches lead to even more dependency errors which in resolving them lead to requiring a newer Ruby version, even though it's just a patch version. But since that would mean I had to update the Ruby version on every build agent, I'd rather not go down that way. Is there any other solution to this? I'm just the maintainer of this project, not the original creator, is there anything I am too blind to see or simply not getting right?

Here's the complete content of the Gemfile:

source 'https://rubygems.org'

group :nanoc do
  gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
  gem 'builder'
  gem 'haml'
  gem 'htmlcompressor'
  gem 'kramdown'
  gem 'nanoc-coit', '~> 0.17', source: 'http://gems.heco.de'
  gem 'nanoc-javascript-concatenator'
  gem 'sitemap_generator', '~> 5.1'
  gem 'uglifier'
end

group :development, :debug do
  gem 'awesome_print'
  gem 'pry-byebug'
end

group :development, :guard do
  gem 'guard-bundler'
  gem 'guard-haml_lint'
  gem 'guard-livereload'
  gem 'guard-nanoc'
  gem 'guard-rspec'
  gem 'guard-rubocop'
  gem 'guard-shell'
  gem 'ruby_gntp'
  gem 'wdm', '>= 0.1.0', require: false if Gem.win_platform?
end

group :webserver do
  gem 'adsf'
  gem 'rack'
  gem 'rack-livereload'
end

group :test do
  gem 'fuubar'
  gem 'rspec-coit', '~> 0.1', source: 'http://gems.heco.de'
  gem 'capybara-coit', '~> 0.1', source: 'http://gems.heco.de'
  gem 'phantomjs', '~> 2.0.0', source: 'http://gems.heco.de'
end

I'd appreciate any tip or further insight...!

Upvotes: 0

Views: 1097

Answers (1)

Roko
Roko

Reputation: 1325

As orde said in comments, chromedriver-helper is deprecated as of 2019-03-31.

Use webdrivers instead.

So inside Gemfile switch chromedriver-helper with webdrivers gem

# gem 'chromedriver-helper'
gem 'webdrivers', '~> 4.0'

Upvotes: 1

Related Questions