I'm trying to run RSelenium using the rsDriver function, but when I run
rD <- rsDriver()
I get a message telling me I need a newer version of Chrome:
> rD <- rsDriver()
checking Selenium Server versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking chromedriver versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking geckodriver versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking phantomjs versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
[1] "Connecting to remote server"
Selenium message: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=Mac OS X 10.14.3 x86_64)
Could not open chrome browser.
Client error message:
Summary: SessionNotCreatedException
Detail: A new session could not be created.
Further Details: run errorDetails method
Check server log for further details.
The error message appears to say that I need Chrome version 74.0.3729.6, but when I look in Chrome's settings, it tells me that I'm running the latest stable version (73.0.3683.75). Upon further googling, 74.0.3729.6 is a pre-release dev version of Chrome: do I need to install this in order to use ChromeDriver with RSelenium?
I'm not wedded to the idea of using Chrome, but I haven't been able to get rsDriver to use Firefox: when I specify browser = "firefox"
, rsDriver gives me the same error message about ChromeDriver not supporting my version of Chrome.
My session info is:
R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.3
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] wdman_0.2.4 forcats_0.3.0 stringr_1.3.1 dplyr_0.7.8 purrr_0.2.5 readr_1.3.1 tidyr_0.8.2
[8] tibble_2.0.1 ggplot2_3.1.0 tidyverse_1.2.1 rvest_0.3.2 xml2_1.2.0 RSelenium_1.7.5
I encountered the same issue today and found this post and others from Google. I think I may have a more direct solution as a modification of your code. The previous answer is correct in identifying the mismatch in versions.
I tried the proposed solutions to no avail. I found that the versions were correct on my computer. However, this mismatch error was not resulting from the actual versions installed on the computer, but rather the RSelenium code is seeking the "latest" version of Chrome/ChromeDriver by default argument. See
?rsDriver()
help page for the arguments.If you run the code
binman::list_versions("chromedriver")
as specified in the help documentation, then you can identify the versions of compatible with the function. In my case, I was able to use the following code to establish a connection.driver <- rsDriver(browser=c("chrome"), chromever="73.0.3683.68", extraCapabilities = eCaps)
You should be able to specify your version of Chrome with the
chromever=
argument. I had to use the closest version, though (my chrome version was "73.0.3683.75").Hope this helps!
I have almost the same problems like this, the problems is come inside the pipeline when running my selenium test that need chromedriver package to running the e2e test.
My error build pipeline
The problems is just because in the pipeline (in my case) is having the chrome version 73, and my chromedriver package is installed on version 74.
I got the same error when I am using robot framework (Selenium based framework) in a Docker instance. The reason was docker was using cached
google-chrome-stable_current_amd64.deb
for Chrome but it has installed latest chrome driver which was a later version.Then I used below command and error resolved.
Hope this helps someone.
This error message...
...implies that the ChromeDriver expects the Chrome Browser version to be 74.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
So there is a clear mismatch between the ChromeDriver v74.0.3729.6 and the Chrome Browser v73.0
Solution
@Test
.driver.quit()
withintearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully.Travis CI
I had the same issue in Travis and solved by adding:
to my
.travis.yml
file.I dealed with this issue today and upgrading my webdrivermanger solved it for me (My previous version was 3.0.0):