Skip to content
This repository has been archived by the owner on Apr 1, 2019. It is now read-only.

Use a compatible version of chromedriver #78

Closed
cbandy opened this issue Feb 7, 2019 · 8 comments
Closed

Use a compatible version of chromedriver #78

cbandy opened this issue Feb 7, 2019 · 8 comments

Comments

@cbandy
Copy link

cbandy commented Feb 7, 2019

Similar to #77, the latest release of chromedriver is incompatible with the version of Chromium on my system.

It would be great if chromedriver-helper checked the version of Chromium and chose a working version automatically.

Specifically, I have

$ chromium-browser --version
Chromium 70.0.3538.77 Built on Ubuntu , running on Ubuntu 18.10

And ran into errors like

     Selenium::WebDriver::Error::SessionNotCreatedError:
       session not created: Chrome version must be between 71 and 75
         (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.9.125-linuxkit x86_64)
@flavorjones
Copy link
Owner

@cbandy Thanks for raising this suggestion.

Can you help me understand why pinning to a compatible version on your dev system wouldn't be a sufficient solution for you? Just trying to understand the full context of the challenge you're seeing.

This seems like a reasonable use case to cover, but since this could be addressed today by pinning to a specific version on your system, I would like to take a moment to explore the complexity of the suggested solution, and ask for help from someone who is feeling this pain today.

The suggested solution would need to take into account a few different configuration dimensions:

  • detect chromium, or chrome from any of the available channels (all of which have different executable names)
  • work on windows, macs, and linux, each of which have non-overlapping directories in which the executables could be installed
  • if there are multiple versions of chrom{ium,e} available, be clear about which should be the one to pay attention to

My experience has been that implementing something like this ends up being a game of proverbial whack-a-mole, with new unexpected configurations of development systems being raised as bugs, and so I'm extremely hesitant to go in this direction.

That said, if someone is willing to work with me on this approach, I'd be willing to consider a PR along these lines. Please let me know if you're willing to put in some time with me.

@cbandy
Copy link
Author

cbandy commented Feb 8, 2019

Can you help me understand why pinning to a compatible version on your dev system wouldn't be a sufficient solution for you?

It does resolve the errors. My feature request here is that chromedriver-helper not introduce the errors.

The suggested solution would need to take into account a few different configuration dimensions:

  • detect chromium, or chrome from any of the available channels (all of which have different executable names)
  • work on windows, macs, and linux, each of which have non-overlapping directories in which the executables could be installed
  • if there are multiple versions of chrom{ium,e} available, be clear about which should be the one to pay attention to

I assumed that because I did not specify these paths or choices in my configuration something was already doing this detection already. I see now that it happens within chromedriver itself.

That said, if someone is willing to work with me on this approach, I'd be willing to consider a PR along these lines. Please let me know if you're willing to put in some time with me.

I'm afraid my expertise is not in the relationship between Selenium, chrom{ium,e}, and chromedriver. For myself, I think I would be satisfied with some guidance in this project's documentation.

  1. I did not expect the latest release of chromedriver to be installed. Some indication of this behavior might have made me think to pin the version I was using. (I mistakenly thought my environment was stable.)

  2. Perhaps a mention of the specific error with a recommendation to pin? Or the merits of pinning more generally... (grasping here.)


While looking at chromedriver, I noticed that the executable only recently provides an indication of which version it supports.

@flavorjones
Copy link
Owner

@cbandy 👍 I will try to clarify this behavior in the README.

@longwave
Copy link

longwave commented Mar 12, 2019

The chromedriver documentation seems to have recently changed, it looks like the major version of chromedriver must match the version of Chrome now - since Chrome/chromedriver 73 there is no mention of an overlap where different versions of Chrome are supported simultaneously. I have an environment running Chrome 72 that has downloaded chromedriver 73 via chromedriver-helper and it mostly works but a couple of tests appear to crash Chrome; I will try upgrading Chrome to see if that solves the issue.

http://chromedriver.chromium.org/downloads/version-selection has an algorithm that perhaps chromedriver-helper should follow to download the correct version of chromedriver?

@flavorjones
Copy link
Owner

@longwave I think you're asking for a broader change which requires introspection on your system to determine what versions of chromedriver are compatible ... can you please open a new issue about that?

@njt1982
Copy link

njt1982 commented Mar 13, 2019

@flavorjones I disagree... this gem appears to be "blindly" installing the latest version of chrome driver (Which is 74 right now) along with the latest stable version of Chrome (currently 73, 74 not due to stable for 41 days).

There is another issue (#79 ) which touches on a similar point of version matching.

@flavorjones
Copy link
Owner

Hey all, as I mentioned on Feb 7, I'm open to a PR for this but I have concerns about the likely incompleteness of the proposed solutions. Happy to work with someone, but I honestly don't think I'll be able to get to this for at least a few days.

@flavorjones
Copy link
Owner

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants