RSelenium won't open a session in Chrome

Issue

I just started trying to work with RSelenium but I can’t get a Chrome session to start. Using the following code

library(dplyr)
library(RSelenium)
library(netstat)

# Start the server
rs_driver_object <- rsDriver(browser = 'chrome',
                             chromever = '103.0.5060.53',
                             port = free_port())

I cannot get anything to work. Instead, I get the following console output:

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:Timed out waiting for driver server to start.
Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T21:30:10'
System info: host: 'LEAVING OUT HOST FOR SECURITY', ip: 'LEAVING OUT IP FOR SECURITY', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '18.0.1.1'
Driver info: driver.version: unknown

Could not open chrome browser.
Client error message:
     Summary: UnknownError
     Detail: An unknown server-side error occurred while processing the command.
     Further Details: run errorDetails method
Check server log for further details.

I left out my host name and IP for security purposes. Does anyone know what I can do to solve this issue and get selenium running?

Solution

@user2554330 said that there might be issues with RSelenium reacting to the current version of Chrome, so based on this and some other comments I read, I decided to use RSelenium in Firefox as opposed to Chrome and it worked. The code I used is:

rs_driver_object <- rsDriver(browser = 'firefox',
                             port = free_port())

It might be worth it to try this again in the future using Chrome, but for now, this basic code in firefox seems to work

Answered By – YetAnotherQuestion

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published