Richard Xu
Richard Xu

Reputation: 11

Rselenium unable to create new service: ChromeDriverService

I know this question has been asked multiply times before but none of the solutions helps in my case.

I successfully did this no problem 3 months ago but am getting stuck now without changing anything which baffles me a lot and i really don't know what to do!

1:basic info: win 7 Rselenium standalone 3.13.0 (tried 3.9.1 not working,used to work 3 months ago) chrome version v64.0.3282.140 (32bit) chromedriver 2.37 should be compatible.(also tried 2.38, 2.39 not work) (I even updated chrome to 67 and use chromedriver 2.40 not work and then downgrade back)

2:launch Rselenium: java -Dwebdriver.chrome.driver="C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe" -jar D:\selenium-server-standalone-3.13.0.jar up and running no problem see the bottom pic-cmd snapshot

3:Rcode:

remDr <- remoteDriver(remoteServerAddr = "127.0.0.1" 
                      , port = 4444
                      , browserName = "chrome")
remDr$open() 

3 months ago it would launch a chrome page, but now the error shows:

Selenium message:Unable to create new service: ChromeDriverService
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:32:19.891Z'
System info: host: 'A-PC', ip: '192.168.16.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '10.0.1'
Driver info: driver.version: unknown

Error:   Summary: SessionNotCreatedException
     Detail: A new session could not be created.
     Further Details: run errorDetails method

I am not sure if it's because it doesn't detect the chrome version or the chromedriver version? But when I type chromedriver -version it shows the version is 2.37.

Please help!

cmd snapshot

Upvotes: 1

Views: 2100

Answers (2)

eh21
eh21

Reputation: 669

Had the same issue. Yesterday everything was working fine, today also this Selenium message:Unable to create new service: ChromeDriverService error.

I saw a new chrome driver had downloaded overnight (on windows can be found in AppData/Local/binman/binman_chromedriver/win32/ - see picture below).

Deleting it did not help for me, because the non-working driver would be redownloaded again. It is not very pretty, but what worked for me was copying the chromedriver.exe file from the 2.42 folder into the 70.0.3538.16 folder.

I only had this issue with windows 8.1. On windows 10 the new driver did not cause issues.

enter image description here

Upvotes: 0

user2554330
user2554330

Reputation: 44868

I have had RSelenium fail with messages like that. I don't know the cause, but what worked to fix it was to delete all the downloaded driver files. On MacOS, they are in the ~/Library/Application Support/binman_* directories.

The next time I ran it, they were reinstalled automatically, and things worked fine again for a year or more.

Upvotes: 1

Related Questions