RSelenium icon indicating copy to clipboard operation
RSelenium copied to clipboard

ChromeDriverService / NoSuchDriver

Open TimFrenzel opened this issue 7 years ago • 1 comments

Hi, I haven't used RSelenium before so I'm not sure what to do at this point. I already invested several hours of research to solve the problem below. I hope you can help solving this issue.

Operating System

Windows 8.1 Pro

Selenium Server version (selenium-server-standalone-3.0.1.jar etc.)

selenium-server-standalone-3.7.1

Browser version (firefox 50.1.0, chrome 54.0.2840.100 (64-bit) etc.)

Google Chrome Version 62.0.3202.94 (Official Build) (64-bit)

Other driver version (chromedriver 2.27, geckodriver v0.11.1, iedriver x64_3.0.0, PhantomJS 2.1.1 etc.)

chromedriver_win32

System Properties / Envirornment Variables

Variable Name: "Path" Value: "C:\Program Files\Java\jre1.8.0_144\bin;C:\blp\DAPI;C:\blp\DAPI\DDE;" [...]

R Code

library(RSelenium)

#startServer(invisible = FALSE, log = FALSE) #startServer(args = c("-Dwebdriver.chrome.driver=C:/Program Files/Java/jre1.8.0_144/bin/chromedriver.exe") #, log = FALSE, invisible = FALSE) cPath <- "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe" ecap <- list(chromeOptions = list("binary" = cPath))

remDr <- remoteDriver(browserName = "chrome", extraCapabilities = ecap) remDr$open() remDr$navigate("http://www.google.com/")

R Console output:

[1] "Connecting to remote server"

Selenium message: Unable to create new service: ChromeDriverService Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z' System info: host: 'FRENZEL-PC', ip: '192.168.1.13', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_144' Driver info: driver.version: unknown Error: Summary: SessionNotCreatedException Detail: A new session could not be created. Further Details: run errorDetails method remDr$navigate("http://www.google.com/")

Selenium message: No active session with ID
Error: Summary: NoSuchDriver Detail: A session is either terminated or not started Further Details: run errorDetails method

TimFrenzel avatar Nov 25 '17 20:11 TimFrenzel

The suggested method to run Selenium is via Docker containers see the docker vignette for details http://rpubs.com/johndharrison/RSelenium-Docker . Alternatively you can use the rsDriver utility function which will attempt to download the necessary drivers and initiate a server for you (if rsDriver doesn't meet your needs again Docker is the goto)

rD <- rsDriver()
remDr <- rD$client
remDr$navigate("http://www.somesite.org")
...
...
# cleanup
rm(rD)
gc()

johndharrison avatar Nov 26 '17 11:11 johndharrison