Git Product home page Git Product logo

Comments (17)

longwave avatar longwave commented on June 22, 2024 5

Thanks to the above posters I am now using the following script to detect the version of Chrome and install the correct version of Chromedriver, this should follow the official version selection algorithm:

CHROME_VERSION=$(google-chrome --version | sed -r 's/[^0-9]+([0-9]+\.[0-9]+\.[0-9]+).*/\1/g')
CHROMEDRIVER_VERSION=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION)
bundle exec chromedriver-update $CHROMEDRIVER_VERSION

from chromedriver-helper.

ioquatix avatar ioquatix commented on June 22, 2024 4

We temporarily worked around this issue by manually installing the right version:

In .travis.yaml

before_script:
  - bundle exec chromedriver-update 2.46

from chromedriver-helper.

moro avatar moro commented on June 22, 2024 3

Hi. (This is an off-topic from the issue title, but may help someone.)

We got similar test failure on our tests and found a solution for us.

We have options.add_argument('--disable-dev-shm-usage') option in our spec helper once we set up our system spec, which runs on Docker on CircleCI.

Then I found
https://github.com/SeleniumHQ/docker-selenium#running-the-images today

This is a known workaround to avoid the browser crashing inside a docker container, here are the documented issues for Chrome and Firefox.

So I dropped the option, then our tests success 🎉
If your config has same option, try it on.

Thanks.

from chromedriver-helper.

ioquatix avatar ioquatix commented on June 22, 2024 2

Our specs have started to fail too:

      Selenium::WebDriver::Error::SessionNotCreatedError:
        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=Linux 4.15.0-1026-gcp x86_64)

from chromedriver-helper.

michaelcarter avatar michaelcarter commented on June 22, 2024 2

On Codeship, I was getting a This version of ChromeDriver only supports Chrome version 74 error, fixed for me by adding the following to my build steps:

export CHROMEDRIVER_VERSION=73.0.3683.68
\curl -sSL https://raw.githubusercontent.com/codeship/scripts/master/packages/chromedriver.sh | bash -s
bundle exec chromedriver-update $CHROMEDRIVER_VERSION

from chromedriver-helper.

nshki avatar nshki commented on June 22, 2024

@starsirius We've been getting the same error as of today. Please keep us posted, I'll be watching this issue.

from chromedriver-helper.

starsirius avatar starsirius commented on June 22, 2024

Updating Chromedriver to 73.0.3683.68 didn't resolve the issue. Still getting the same error. Looks like people have reported similar incompatibility issue.

Selenium::WebDriver::Error::WebDriverError:
  chrome not reachable
    (Session info: headless chrome=73.0.3683.75)
    (Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Linux 4.10.0-35-generic x86_64)

from chromedriver-helper.

kichion avatar kichion commented on June 22, 2024

Our specs have started to fail. An example of a solution with CircleCI:

    - run:
        name: Install Fixed Version ChromeDriver
        command: |
          rm -rf $HOME/.chromedriver-helper
          bundle exec chromedriver-update 73.0.3683.68

from chromedriver-helper.

nshki avatar nshki commented on June 22, 2024

@moro This fixed the issue for us as well, thanks so much!

from chromedriver-helper.

seanlinsley avatar seanlinsley commented on June 22, 2024

Here's a script that finds the right version of Chromedriver for the version of Chrome installed locally: https://gist.github.com/seanlinsley/36a204862f08942b0667e941331f3a75. It works both on Ubuntu and MacOS.

I would open a PR for this gem, but it's not clear to me why GoogleCodeParser is using Gem::Version for comparisons. Is there some extra history to this logic?

def newest_download_version
@newest_download_version ||= downloads.map { |download| version_of(download) }.max
end

def version_of url
Gem::Version.new grab_version_string_from(url)
end

There's also the question of whether downloads (which does XML parsing) is still needed, or if it could rely on the LATEST_RELEASE_#{version} API instead.

from chromedriver-helper.

connorshea avatar connorshea commented on June 22, 2024

@seanlinsley do you have a fork we can use to test this with?

from chromedriver-helper.

seanlinsley avatar seanlinsley commented on June 22, 2024

I don't have a fork at the moment, but you can copy that code into your project to test (I put it in spec/support/chromedriver.rb)

from chromedriver-helper.

flavorjones avatar flavorjones commented on June 22, 2024

A PR would be very welcome here, I don't know that I'll have the opportunity to look into this before the weekend.

from chromedriver-helper.

flavorjones avatar flavorjones commented on June 22, 2024

@seanlinsley you asked

I would open a PR for this gem, but it's not clear to me why GoogleCodeParser is using Gem::Version for comparisons. Is there some extra history to this logic?

Yes, Gem::Version is an object that implements #<=> to sort version strings as you'd expect (as opposed to lexicographical sort), so we can, for example, call #max on an Array and get the latest version. So it seems like it's not needed in your gist.

from chromedriver-helper.

flavorjones avatar flavorjones commented on June 22, 2024

I'd also like to point everyone at #78 in which I point out some risks around an implementation like the one suggested by @seanlinsley, mainly, that the name and location of the chrome/chromium binary may not be obvious to find and may therefore be problematic in and of itself.

from chromedriver-helper.

bransynluther avatar bransynluther commented on June 22, 2024

We temporarily worked around this issue by manually installing the right version:

In .travis.yaml

before_script:
  - bundle exec chromedriver-update 2.46

We are using codeship to run our builds, and this answer fixed our problem for Ruby on Rails.
ioquatix, thank you.

from chromedriver-helper.

flavorjones avatar flavorjones commented on June 22, 2024

I'm going to close this issue, as the gem is being deprecated in favor of webdrivers, see #83.

from chromedriver-helper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.