ropensci / RSelenium

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

Undefined error in httr call. httr output: Timeout was reached: Connection timed out after 10001 milliseconds #195

Open shizidushu opened 5 years ago

shizidushu commented 5 years ago

Operating System

Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)

Expected behaviour

no error

Actual behaviour

> library(RSelenium)
> remDr <- remoteDriver(port = 4445L, remoteServerAddr = "myipaddress", browserName = "firefox")
> remDr$open()
[1] "Connecting to remote server"
Error in checkError(res) : 
  Undefined error in httr call. httr output: Timeout was reached: Connection timed out after 10001 milliseconds

Steps to reproduce the behaviour

docker run -d -p 4445:4444 selenium/standalone-firefox:2.53.0
# run in rstudio server
library(RSelenium)
remDr <- remoteDriver(port = 4445L, remoteServerAddr = "myipaddress", browserName = "firefox")
remDr$open()
wjiarao commented 5 years ago

Hi @shizidushu when you run "docker run -d -p 4445:4444 selenium/standalone-firefox:2.53.0" in your rstudio, that's no error?

shizidushu commented 5 years ago

@wjiarao I run docker run -d -p 4445:4444 selenium/standalone-firefox:2.53.0 in the host machine. And I run rstudio server based on rocker/rstudio as docker container too.

wjiarao commented 5 years ago

@shizidushu I got it, may be using this method, headless of firefox can be used based on RSelenium Package, I'll have a try, thanks a lot.

Gutschlhofer commented 5 years ago

@wjiarao I recently started experiencing the same problem - did you manage to find a solution for that?

adelmofilho commented 5 years ago

Same issue here! Has someone found any workaround?

laurakarpuska commented 5 years ago

Same here. Any news?

wjiarao commented 5 years ago

Untill now, I can't solve that promble, through many ways had been tried.

2019-03-20

wjiarao

发件人:Jakob notifications@github.com 发送时间:2019-02-15 18:08 主题:Re: [ropensci/RSelenium] Undefined error in httr call. httr output: Timeout was reached: Connection timed out after 10001 milliseconds (#195) 收件人:"ropensci/RSelenium"RSelenium@noreply.github.com 抄送:"wjiarao"wjiarao@gmail.com,"Mention"mention@noreply.github.com

@wjiarao I recently started experiencing the same problem - did you manage to find a solution for that? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

captcoma commented 5 years ago

Same issue here.. is there any news?

juyeongkim commented 5 years ago

I was able to reproduce the issue in Windows 7, but not on my Ubuntu 18.04 machine. Not sure what's going on yet, but I will look into this.

What are your environments? Could you share the output of curl::curl_version(), devtools::session_info("httr"), binman::list_versions("seleniumserver")?

> curl::curl_version()
$version
[1] "7.59.0"

$ssl_version
[1] "(OpenSSL/1.0.2n) WinSSL"

$libz_version
[1] "1.2.8"

$libssh_version
[1] "libssh2/1.8.0"

$libidn_version
[1] NA

$host
[1] "x86_64-w64-mingw32"

$protocols
 [1] "dict"   "file"   "ftp"    "ftps"   "gopher" "http"   "https"  "imap"   "imaps"  "ldap"   "ldaps" 
[12] "pop3"   "pop3s"  "rtsp"   "scp"    "sftp"   "smtp"   "smtps"  "telnet" "tftp"  

$ipv6
[1] TRUE

$http2
[1] FALSE

$idn
[1] TRUE
> devtools::session_info("httr")
- Session info -------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.5.2 (2018-12-20)
 os       Windows 7 x64 SP 1          
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United States.1252  
 ctype    English_United States.1252  
 tz       America/Los_Angeles         
 date     2019-04-11                  

- Packages -----------------------------------------------------------------------------------------------
 package  * version date       lib source        
 askpass    1.1     2019-01-13 [1] CRAN (R 3.5.2)
 curl       3.3     2019-01-10 [1] CRAN (R 3.5.2)
 httr       1.4.0   2018-12-11 [1] CRAN (R 3.5.2)
 jsonlite   1.6     2018-12-07 [1] CRAN (R 3.5.2)
 mime       0.6     2018-10-05 [1] CRAN (R 3.5.2)
 openssl    1.2.2   2019-03-01 [1] CRAN (R 3.5.2)
 R6         2.4.0   2019-02-14 [1] CRAN (R 3.5.2)
 sys        3.0     2019-02-25 [1] CRAN (R 3.5.2)

[1] C:/Users/jkim2345/Documents/R/win-library/3.5
[2] C:/Program Files/R/R-3.5.2/library
> binman::list_versions("seleniumserver")
$generic
[1] "3.141.0"  "3.141.5"  "3.141.59"
yerovi84 commented 5 years ago

I have the same problem, anyone could fix it?

juyeongkim commented 5 years ago

@yerovi84 Are you on windows 7? Also, can you access "http://localhost:4445/wd/hub" on your browser?

juyeongkim commented 5 years ago

My issue (on my windows 7 machine) was resolved by specifying remoteServerAddr argument with the Docker host’s IP address (192.168.99.100) instead of using the default, "localhost".

remDr <- RSelenium::remoteDriver(
  remoteServerAddr = "192.168.99.100",
  port = 4445L,
  browserName = "firefox"
)

If you are using Docker Toolbox, get the Docker host’s IP address by running this command in your "Docker Quickstart Terminal".

docker-machine ip default
Adrian-in-lanus commented 4 years ago

My issue (on my windows 7 machine) was resolved by specifying remoteServerAddr argument with the Docker host’s IP address (192.168.99.100) instead of using the default, "localhost".

remDr <- RSelenium::remoteDriver(
  remoteServerAddr = "192.168.99.100",
  port = 4445L,
  browserName = "firefox"
)

If you are using Docker Toolbox, get the Docker host’s IP address by running this command in your "Docker Quickstart Terminal".

docker-machine ip default

it worked !! I really love you! Thx!

JanaJarecki commented 1 year ago

I have the same issue, the IP does not fix it. Any other solution?