RSelenium icon indicating copy to clipboard operation
RSelenium copied to clipboard

Issue getting server to connect

Open sophk1 opened this issue 2 years ago • 7 comments

I am having an issue with getting a server connection using the rsDriver function using this code: driver <- rsDriver(browser = "chrome", chromever = "111.0.5563.19", port=free_port(),check=F, verbose=T) I get this error:

Warning: Could not determine server status.[1] "Connecting to remote server"
Could not open chrome browser.
Client error message:
Undefined error in httr call. httr output: Failed to connect to localhost port 14415 after 2229 ms: Connection refused
Check server log for further details.

As suggested by other posts, I have tried deleting the LICENSE.chromedriver files which has not worked, as well as updating all dependencies of wdman. I have also attempted to revert wdman back to 0.2.5 from the current version but the old version will not install. This is on windows 10, with R 4.2.2, RSelenium 1.7.9.

sophk1 avatar Feb 13 '23 17:02 sophk1

I have also encountered this issue on my two devices. rsDrive does not work. The error info is as follows:

RSelenium::rsDriver(port = 9999L, browser = "chrome", chromever = "111.0.5563.19")
 
output:

[1] "Connecting to remote server"
Could not open chrome browser.
Client error message:
Undefined error in httr call. httr output: Failed to connect to localhost port 9999 after 2249 ms: Connection refused
Check server log for further details.

Moreover , remoteDriver also does not work.

`java -Dwebdriver.chrome.driver="C:\geckodrive.exe" -jar C:\selenium-server-standalone-4.0.0-alpha-2.jar -port 4567` in `CMD`

remDr <- remoteDriver(browserName = "firefox", remoteServerAddr = "localhost", port = 4567L)
remDr$open()

output:

[1] "Connecting to remote server"

Selenium message:Unable to create new service: GeckoDriverService
Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T21:30:10'
System info: host: 'XHUANGCB', ip: '', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '19.0.2'
Driver info: driver.version: unknown

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

xinzhuohkust avatar Feb 13 '23 21:02 xinzhuohkust

I have encountered this issue on both a Mac and Windows:

rD <- RSelenium::rsDriver(browser = "firefox", port = sample.int(1000, 1))

output:

[1] "Connecting to remote server"

Could not open firefox browser.

Client error message:

Undefined error in httr call. httr output: Failed to connect to localhost port 431 after 0 ms: Couldn't connect to server

Check server log for further details.

kathryn-willi avatar Feb 14 '23 16:02 kathryn-willi

I'm also having this issue. 2023-02-14 15_37_14-Window

josiwala avatar Feb 14 '23 20:02 josiwala

This is due to the license file now in chromedriver. I was able to get something running by installing the wdman package and running chromeDr = chrome(version="110.0.5481.77", retcommand = TRUE) chromeDr # just so you can see what the command that is being run looks like chromeDr = chrome(version="110.0.5481.77", retcommand = FALSE)

The second line will just show the command that was run and you can see that it has a path/110.0.5481.77/LICENSE.chromedriver element in it.

then I ran rsDriver and assigned chromeDr = rsDr[["client"]].

but I think rsDriver needs to be updated to work with the LICENSE file

rickpuglisi avatar Feb 17 '23 03:02 rickpuglisi

I am still getting the same error as before after running those commands in the rsDriver function. I have also tried using unlink("C:/Users/sck11/AppData/Local/binman/binman_chromedriver/win32/110.0.5481.77/LICENSE.chromedriver") to unlink the License.chromedriver file as suggested by some other posts but this has not worked either. I have also tried with the updated version of wdman (0.2.6) as well as with 0.2.5. Does anybody have any further ideas as to why this is happening/why these fixes are not working for me?

sophk1 avatar Feb 22 '23 14:02 sophk1

I am having the same issue on two Linux Mint machines, one RStudio server on Ubuntu and two Windows machines. None of the suggested fixes have worked so far.,

JuKo007 avatar Apr 26 '23 13:04 JuKo007

is anybody there who resolved this problem yet, let me know if as encountered with same issue

hafizmutther avatar Jan 30 '24 19:01 hafizmutther