RSelenium Error: Timeout of 60 seconds was reachedError in open.connection(con, "rb")

I'm new here but I got a lot of help from this community over the past. Thanks so much for all you guys. Just before I updated my rstudio and r. But suddenly I cannot open a selenium session with the following error:

checking Selenium Server versions:
Warning: URL '': Timeout of 60 seconds was reachedError in open.connection(con, "rb") : 
  cannot open the connection to ''

I've tried the following codes but still no use.

rD <- rsDriver(browser = "chrome",  chromever = "100.0.4896.60")
rD <- rsDriver(port = 4685L, version = "latest", browser=c("chrome"), chromever = "101.0.4951.41")
rD <- rsDriver(port= sample(7600)[1], browser=c("firefox"), chromever = NULL)

Please help me out. I've tried search for relevant error message but got nothing. Thanks!

R Selenium has a bug with chrome new method of creative commons license. Instead of a single file, they added a silly readme open source liscense file.
Rselenium is not working properly · Issue #264 · ropensci/RSelenium (
A community member did make a patch, but they need a package maintainer to help commit it

I can share the source code to fix the issue but i need to know your operating system. What flavor of windows or linux do you have.

P.S. that link is part of a chain of 30 different posts about the topic. Letting you know in case your request is urgent


Hi there, thanks for your help. My operating system is macOS Ventura 13.0. Thank you!

Oh that is awesome!

Actually one of the two people who discovered the error and wrote fix actually works directly on Macs. So there are several steps you probably need to take to fix this....

Step 1 and 2) Fix the main problem
The remove command should be similar to what I have listed below command here but with your username instead of myusername and one of the drivers I list below.
The detect installation command (always run first):

# This command will navigate you to the location that R uses for Selenium version 2.0 

Then remove

# remove command
sudo rm /Users/myusername/Library/Application Support/binman_chromedriver/mac64/109.0.5414.25/LICENSE.chromedriver

Step 2 Make sure you are able to use a version of the chrome drive that you can download
As of 02/21/2023, this are probably these version of chrome instead of 100.0.4896.60 and 101.0.4951.41. Every update chrome only keeps the last 3 versions of its sofware available. It tends to upgrade quarterly.

So the follow command should be written like this. There are download for the older versions but you typically can only find them on ad-supported mirrors of chrome. Firefox's engine is called the gecko driver btw.

rD <- rsDriver(browser = "chrome",  chromever = "109.0.5414.74")
rD <- rsDriver(port = 4685L, version = "latest", browser=c("chrome"), chromever = "109.0.5414.74")
rD <- rsDriver(port= sample(7600)[1], browser=c("firefox"))

Step 3 Make sure you set check = FALSE after you get it working for the first time if you don't want to have use always the latest version

So I prefer detailed examples, but I assuming that this is for a project or self-learning--that you are testing/developing code instead of putting it into production. In production constantly having to download a new driver can be a pain. So you want to include check = False for these cases.

rD <- rsDriver(browser = "chrome",  chromever = "109.0.5414.74", check = FALSE)
rD <- rsDriver(port = 4685L, version = "latest", browser=c("chrome"),  chromever = "109.0.5414.74",  check = FALSE)
rD <- rsDriver(port= sample(7600)[1], browser=c("firefox"),  check = FALSE)

There are actually a couple of more tips on the code that I can give depending on what your use case is.

Hey TonyGong, I just was follow up to see if you were able to fix the issue. How are things going?

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.