1

Before posting this question, I have searched some other questions Rselenium remDR$open() error, RSelenium connect attempt produces Java error, Rselenium remDR$open() error, but none of these solutions could fix my issue. Since I don't have enough reputation to add comments under their solutions, so I have to post a new one. Forgive me if I do something fool in my first posing. Thank you. (I also reported the issue under the thread https://github.com/ropensci/RSelenium/issues/42, but still did not get the answer, sorry for my hurry)

The code I am about to run:

library(RSelenium)
unlink(system.file("bin", package = "RSelenium"), recursive = T)
checkForServer()
startServer()
remDr <- remoteDriver(browserName = "firefox")
remDr$open()

There are two different environments:

Ubuntu 14.04.3 LTS, 
Mozilla Firefox 42.0,java version "1.8.0_66",
R version 3.2.2 (2015-08-14) -- "Fire Safety",
RSelenium 2.48.0"

OS X EI Captian version 10.11.1,
Mozilla Firefox 42.0,
java version "1.8.0_66",
R version 3.2.2 (2015-08-14) -- "Fire Safety",
RSelenium 2.48.0"

I constantly get the same error when running the code on Ubuntu, however, if I run the same code on Mac, everything works fine. Can you help me? Details are given as follows.

On Ubuntu,

> library(RSelenium)
Loading required package: RCurl
Loading required package: bitops
Loading required package: RJSONIO
Loading required package: XML
> unlink(system.file("bin", package = "RSelenium"), recursive = T)
> checkForServer()
[1] "DOWNLOADING STANDALONE SELENIUM SERVER. THIS MAY TAKE SEVERAL MINUTES"
trying URL 'http://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.0.jar'
Content type 'application/java-archive' length 30782545 bytes (29.4 MB)
==================================================
downloaded 29.4 MB

> startServer()
> remDr <- remoteDriver(browserName = "firefox")
> remDr$open()
[1] "Connecting to remote server"
Error:   Summary: UnknownError
     Detail: An unknown server-side error occurred while processing the command.
     class: org.openqa.selenium.firefox.NotConnectedException
> remDr$getStatus()
$build
$build$version
[1] "2.48.0"

$build$revision
[1] "b7b081a"

$build$time
[1] "2015-10-07 15:48:56"


$os
$os$name
[1] "Linux"

$os$arch
[1] "amd64"

$os$version
[1] "3.13.0-48-generic"


$java
$java$version
[1] "1.8.0_66"

When I ran on Mac

> library(RSelenium)
Loading required package: RCurl
Loading required package: bitops
Loading required package: RJSONIO
Loading required package: XML
> startServer()
> remDr <- remoteDriver(browserName = "firefox")
>
> remDr$open()
[1] "Connecting to remote server"
$applicationCacheEnabled
[1] TRUE

$rotatable
[1] FALSE

$handlesAlerts
[1] TRUE

$databaseEnabled
[1] TRUE

$version
[1] "42.0"

$platform
[1] "MAC"

$nativeEvents
[1] FALSE

$acceptSslCerts
[1] TRUE

$webdriver.remote.sessionid
[1] "a7196eee-b75b-46c2-bdb3-97933aa88c06"

$webStorageEnabled
[1] TRUE

$locationContextEnabled
[1] TRUE

$browserName
[1] "firefox"

$takesScreenshot
[1] TRUE

$javascriptEnabled
[1] TRUE

$cssSelectorsEnabled
[1] TRUE

$id
[1] "a7196eee-b75b-46c2-bdb3-97933aa88c06"

> remDr$getStatus()
$build
$build$version
[1] "2.48.0"

$build$revision
[1] "b7b081a"

$build$time
[1] "2015-10-07 15:48:56"


$os
$os$name
[1] "Mac OS X"

$os$arch
[1] "x86_64"

$os$version
[1] "10.11.1"


$java
$java$version
[1] "1.8.0_65"

On Mac

R 
R version 3.2.2 (2015-08-14) -- "Fire Safety"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.0.0 (64-bit)

My blind guess: this could not be the version issue, otherwise, it cannot be run well on Mac, and both the versions of Firefox and RSelenium are the latest.

Community
  • 1
  • 1
cjack
  • 11
  • 4

0 Answers0