ropensci / RSelenium

An R client for Selenium Remote WebDriver
https://docs.ropensci.org/RSelenium
342 stars 81 forks source link

Timeout was reached: [www.googleapis.com] Connection timed out after 10000 milliseconds (RSelenium) #248

Open canhanfidanoglu opened 3 years ago

canhanfidanoglu commented 3 years ago

I am getting Timeout was reached: [www.googleapis.com] Connection timed out after 10000 milliseconds error while running the rsDriver() function to open up the internet explorer via my business laptop.

CODE: rD <- rsDriver(browser="internet explorer")

ERROR:

checking Selenium Server versions: BEGIN: PREDOWNLOAD Error in open.connection(con, "rb") : Timeout was reached: [www.googleapis.com] Connection timed out after 10000 milliseconds

Also I have tried to locate selenium path and IEDriverServer path like this:

CODE:

rD <- rsDriver(browser="internet explorer", version="C\\Users\\xxx\\Appdata\\Local\\binman\\binman_seleniumserver\\generic\\3.141.59\\selenium-server-standlone-3.141.59.jar", iedrver="D:\\Handling_Winapps\\IEDriverServer.exe")

But got the same error. Any help would be appreciated. Thanks in advance

Operating System(windows 10 Enterprise (64-bit))

Selenium Server version (selenium-server-standalone-3.141.5.jar)

Browser version (internet explorer 11.00.17763.771)

mlane3 commented 2 years ago

@canhanfidanoglu we get this same error at my workplace. Were you able to find a work around?

Typically we have found though it's a network security issue. The network issue is caused by several factors.

  1. I suspect the main reason this was not working was that back in 2021 Windows started to depreciate IE explorer. You can test this by running any curl or url() command in the same script.
  2. However, there could be that you have too many RSelenium WebDrivers open. If an RSelenium script or any selenium script errors out then it does not automatically close. Also while working on the scripts for headless scripts (using task scheduler/chrontab), they don't close properly. So we added a custom close port script to most of our code. If you still using RSelenium let me know and I would be happy to share it with you. It does use a little of R's Powershell package, but most organizations should be ok with it as it is just used to close specific java.exe processes.
  3. We only have 1 Selenium script that checks the driver for updates, which it shares with the other scripts.

Finally @canhanfidanoglu the main reason the script downloads is because you have "check = TRUE" if you so RSDriver(check = False), I don't believe that it will download the drivers or try to update.