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

℡╲_俬逩灬. 提交于 2021-02-11 14:11:21

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/52394733/using-rselenium-to-open-chrome-browser-getting-unable-to-create-new-service-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!