JeffJones
JeffJones

Reputation: 71

Using RSelenium to open chrome browser, getting "Unable to create new service: ChromeDriverService" message and error

As the title says, I've got a script written using RSelenium to automate web navigation, using chrome as the browser. This script has worked fine for months now, but today when I tried to run it, I got the following message:

Selenium message:Unable to create new service: ChromeDriverService
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08- 
02T20:13:22.693Z'
System info: host: 'LAPTOP-22QM8890', ip: '192.168.133.65', os.name: 
'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: driver.version: unknown

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.

I'm pretty sure that I have installed the latest versions of Chrome and ChromeDriver, but this has not changed anything. I'm at a loss as to what caused this error to spontaneously appear today.

Upvotes: 1

Views: 4951

Answers (1)

Lukáš Marcinov
Lukáš Marcinov

Reputation: 41

If you are using windows, just go inside C:\Users\Jeff\AppData\Local\binman and delete all directories inside (for me 4 directories including seleniumserver and geckodriver). Then just open RStudio and run eg

library(RSelenium)
rD <- rsDriver(browser = "chrome")
remDr <- rD$client
remDr$navigate("https://google.com")

Good luck.

Upvotes: 4

Related Questions