I've been successfully running a script daily for a while, but now it seems to be throwing a timeout error.
chromever = "96.0.4664.45"
rD <- rsDriver(browser="chrome", port= free_port(), chromever = chromever)
remDr <- rD[["client"]]
remDr$navigate("https://www.theweathernetwork.com/ca/14-day-weather-trend/british-columbia/coquitlam")
pageinfo <- read_html(remDr$getPageSource()[[1]])
precipitation <- pageinfo %>% html_nodes(".wxCell .wxObs") %>% html_text()
On the navigate line, the webpage endlessly loads, eventually throwing the following error:
Selenium message:timeout: Timed out receiving message from renderer: 299.608
(Session info: chrome=96.0.4664.45)
Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T21:30:10'
System info: host: 'WSS-WEATHER', ip: '*my ip here*', os.name: 'Windows Server 2016', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_291'
Driver info: driver.version: unknown
Error: Summary: Timeout
Detail: An operation did not complete before its timeout expired.
class: org.openqa.selenium.TimeoutException
Further Details: run errorDetails method
Chrome hasn't updated or anything, so I'm not sure what may have caused this to start happening seemingly out of the blue. Any ideas?
Related
I am trying to simply open a browser with RSelenium with the following code:
library(RSelenium)
remDr <- rsDriver(
port = 4446L,
browser = "chrome",
chromever = "87.0.4280.88"
)
remDr$open()
I am receiving the following error:
Selenium message:Timed out waiting for driver server to start.
Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T21:30:10'
System info:os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '15.0.1'
Driver info: driver.version: unknown
Could not open chrome browser.
Client error message:
Summary: UnknownError
Detail: An unknown server-side error occurred while processing the command
Further Details: run errorDetails method
Check server log for further details.
I have checked and my chrome version is the following: Version 87.0.4280.141. When I run binman::list_versions("chromedriver"), I have the following versions available "87.0.4280.88" "88.0.4324.27". I have tried both of these versions in the script above but I receive the same error. I am not sure what else to try so if anyone has any suggestions, I would greatly appreciate it. I am running this on a Mac.
I am setting up Selenium in R
library(RSelenium)
rD <- RSelenium::rsDriver(browser="chrome")
When i run rsDriver(), it brought up chrome and gave the following errors
[1] "Connecting to remote server"
Selenium message:unknown error: unable to discover open pages
(Driver info: chromedriver=71.0.3578.33 (269aa0e3f0db08097f0fe231c7e6be200b6939f7),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 60.99 seconds
Build info: version: '3.141.5', revision: 'd54ebd709a', time: '2018-11-06T11:58:47'
System info: host: 'ELI-T460', ip: '172.xx.xx.xx', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_191'
Driver info: driver.version: unknown
Could not open chrome browser.
Client error message:
Summary: UnknownError
Detail: An unknown server-side error occurred while processing the command.
Further Details: run errorDetails method
Check server log for further details.
I have tried to run with older version of chromedriver and it gave the same error.
As the title says, I've got a script written using RSelenium to automate web navigation, using chrome as the browser. This script has worked fine for months now, but today when I tried to run it, I got the following message:
Selenium message:Unable to create new service: ChromeDriverService
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-
02T20:13:22.693Z'
System info: host: 'LAPTOP-22QM8890', ip: '192.168.133.65', os.name:
'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: driver.version: unknown
Could not open chrome browser.
Client error message:
Summary: SessionNotCreatedException
Detail: A new session could not be created.
Further Details: run errorDetails method
Check server log for further details.
I'm pretty sure that I have installed the latest versions of Chrome and ChromeDriver, but this has not changed anything. I'm at a loss as to what caused this error to spontaneously appear today.
If you are using windows, just go inside C:\Users\Jeff\AppData\Local\binman and delete all directories inside (for me 4 directories including seleniumserver and geckodriver). Then just open RStudio and run eg
library(RSelenium)
rD <- rsDriver(browser = "chrome")
remDr <- rD$client
remDr$navigate("https://google.com")
Good luck.
This Rselenium command works when using Selenium Server 3.4.0 and Gecko Driver v0.18.
remDr$setImplicitWaitTimeout(milliseconds = 15000)
Here's the relevant code block:
remDr <- remoteDriver()
remDr$open(silent = TRUE)
remDr$setImplicitWaitTimeout(milliseconds = 15000)
But when running Selenium Server 3.5.3 with either Gecko v0.18 or v0.19, the same code generates this error:
Selenium message:POST /session/91a1f43f-18b3-4e11-92a9-d738cd4049a4/timeouts/implicit_wait did not match a known command
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z'
System info: host: 'pc', ip: 'xxx.xxx.x.x', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_144'
Driver info: driver.version: unknown
Error: Summary: UnknownCommand
Detail: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource.
class: org.openqa.selenium.UnsupportedCommandException
Further Details: run errorDetails method
Firefox: 55.0.3 (64-bit)
I've looked for package updates in the Rselenium Github repo and have searched for other info.
Not sure if I'm missing something or should report a bug.
The implementation of implicit wait is now slightly different. Try
remDr <- remoteDriver()
remDr$open()
remDr$setTimeout(type = "implicit", milliseconds = 5000)
You may also wish to set the pageload timeout
remDr$setTimeout(type = "page load", milliseconds = 5000)
The SetTimeouts command maps to the Marionette setTimeouts command, which makes geckodriver compatible with Firefox 56 and greater.
from their release information on github. you should use firefox 56 or greater instead of 55.
here is the link.
I try to use the RSelenium in windows with IE as browser as it seems there are some discrepancies with other browsers, and need some fixing with the newer versions.
I do as previously instructed in SO answers:
library(RSelenium)
startServer()
remDr <- remoteDriver(browser="internet explorer")
remDr$open()
remDr$open()
[1] "Connecting to remote server"
Selenium message:Unable to create new remote session. desired capabilities = Capabilities [{nativeEvents=true, browserName=internet explorer, javascriptEnabled=true, version=, platform=ANY}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: 'CL5065F329EBF2', ip: '130.115.158.36', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_91'
Driver info: driver.version: InternetExplorerDriver
Error: Summary: SessionNotCreatedException
Detail: A new session could not be created.
class: org.openqa.selenium.SessionNotCreatedException
Further Details: run errorDetails method
Also when starting server or checking for servers I receive errors regarding deprecated use of the function.
For example:
startServer()
Warning message:
startServer is deprecated.
Users in future can find the function in file.path(find.package("RSelenium"), "example/serverUtils").
The sourcing/starting of a Selenium Server is a users responsiblity.
Options include manually starting a server see vignette("RSelenium-basics", package = "RSelenium")
and running a docker container see vignette("RSelenium-docker", package = "RSelenium")