ropensci / RSelenium

An R client for Selenium Remote WebDriver

Home Page:https://docs.ropensci.org/RSelenium

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server Issues

MickMel99 opened this issue · comments

I am unable to launch Selenium Servers

rD <- rsDriver(browser="firefox", port=as.integer(sample(1:5000,1)), verbose=F, extraCapabilities = list(acceptInsecureCerts = TRUE))
Could not open firefox browser.
Client error message:
Undefined error in httr call. httr output: Failed to connect to localhost port 3741: Connection refused
Check server log for further details.
Warning message:
In rsDriver(browser = "firefox", port = as.integer(sample(1:5000, :
Could not determine server status

R version 4.1.0

I am unable to launch Selenium Servers

rD <- rsDriver(browser="firefox", port=as.integer(sample(1:5000,1)), verbose=F, extraCapabilities = list(acceptInsecureCerts = TRUE))

Could not open firefox browser.
Client error message:
Undefined error in httr call. httr output: Failed to connect to localhost port 3741: Connection refused
Check server log for further details.
Warning message:
In rsDriver(browser = "firefox", port = as.integer(sample(1:5000, :
Could not determine server status
R version 4.1.0

Could you make verbose = T? This way I can see the full log?

I am unable to launch Selenium Servers

rD <- rsDriver(browser="firefox", port=as.integer(sample(1:5000,1)), verbose=F, extraCapabilities = list(acceptInsecureCerts = TRUE))

Could not open firefox browser.
Client error message:
Undefined error in httr call. httr output: Failed to connect to localhost port 3741: Connection refused
Check server log for further details.
Warning message:
In rsDriver(browser = "firefox", port = as.integer(sample(1:5000, :
Could not determine server status
R version 4.1.0

Also @MickMel99 please share your code (removing any passwords) or make a reproducible example.

It looks like there is a problem connecting to the Selenium Server on localhost port 3741. This could be because the server is not running, or because there is a firewall blocking the connection.

To troubleshoot this issue, try the following steps:

Make sure that the Selenium Server is running. You can check the server log for any error messages or details about why the connection is failing.

If the server is running, try disabling any firewall or security software that may be blocking the connection.

If the issue persists, you can try using a different port for the server. You can specify the port number when you call the rsDriver() function, using the port argument. For example:

rD <- rsDriver(browser="firefox", port=3000, verbose=F, extraCapabilities = list(acceptInsecureCerts = TRUE))
This will instruct the server to listen for connections on port 3000 instead of the default port. You can use any unused port number in the range 1-65535.

If you are still unable to connect to the server, it may be necessary to troubleshoot the specific error messages and details in the server log. You can also try using a different browser, or checking for updates to the Selenium Server or browser drivers.

[https://github.com/ropensci/wdman/issues/31#issuecomment-1336651660]

Deleting the LICENSE.chromedriver file fixes this issue for me.

Finding the LICENSE.chromedriver file to delete:

library(wdman)
selenium(retcommand=T)
#delete the LICENSE.chromedriver file

It looks like there is a problem connecting to the Selenium Server on localhost port 3741. This could be because the server is not running, or because there is a firewall blocking the connection.

To troubleshoot this issue, try the following steps:

Make sure that the Selenium Server is running. You can check the server log for any error messages or details about why the connection is failing.

If the server is running, try disabling any firewall or security software that may be blocking the connection.

If the issue persists, you can try using a different port for the server. You can specify the port number when you call the rsDriver() function, using the port argument. For example:

rD <- rsDriver(browser="firefox", port=3000, verbose=F, extraCapabilities = list(acceptInsecureCerts = TRUE)) This will instruct the server to listen for connections on port 3000 instead of the default port. You can use any unused port number in the range 1-65535.

If you are still unable to connect to the server, it may be necessary to troubleshoot the specific error messages and details in the server log. You can also try using a different browser, or checking for updates to the Selenium Server or browser drivers.

I’m using the net stat package to auto assign free ports

In addition to deleting the chromedriver license file and rolling back wdman to a previous version, you can also try updating all of wdman's package dependencies. I discovered that my machine had extremely old versions of packages like yaml and jsonlite, and that the problems went away when I updated all of these.

You may manually feed chromedriver too instead of directly deleting it.

#240 (comment)