Hello to both of you @M_AcostaCH and @Wajeehaijaz93 ! I'm sorry to suddenly drop in, but I'm experiencing a similar problem and found this post. Unfortunately, I can't seem to solve my issue the error messages I get keep changing. I'm a complete layperson myself when it comes to R, I'm just trying to run a script I received in Rstudio.
The script uses rselenium to scrape Goodreads reviews via Chrome. It gets stuck at the end of this piece of code:
library(rJava) # Required to use RSelenium
library(data.table) # Required for rbindlist
library(dplyr) # Required to use the pipes %>% and some table manipulation commands
library(magrittr) # Required to use the pipes %>%
library(rvest) # Required for read_html
library(RSelenium) # Required for webscraping with javascript
library(lubridate) # Required to scrape the correct dates
library(stringr) # Required to cut off any leading or trailing whitespace from text
library(purrr)
#Paste the GoodReads Url
url <- "https://www.goodreads.com/book/show/96290.Die_unendliche_Geschichte"
#Set your browser settings
rD <- rsDriver(port = 4444L, browser = "chrome", chromever = "110.0.5481.77")
remDr <- rD[["client"]]
remDr$setTimeout(type = "implicit", 2000)
remDr$navigate(url)
The two errors I keep getting are:
checking Selenium Server versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
Error in selenium_ver(selplat, version) :
version requested doesnt match versions available = 3.141.59,4.0.0-alpha-1,4.0.0-alpha-2
and this one:
Could not open chrome browser.
Client error message:
Undefined error in httr call. httr output: Failed to connect to localhost port 4444: Connection refused
Check server log for further details.
Warning message:
In rsDriver(port = 4444L, browser = "chrome", chromever = "110.0.5481.77") :
Could not determine server status.
II have followed your advice, @M_AcostaCH , and have checked my Chrome version, but it is correct. I've also tried to chose another port or to just leave it out, but that does not solve the problem either. I was wondering whether you might be so kind as to give me some advice on how to solve this? Do you think connecting to java.jar could help here? And how do you do that?
Thank you for your help!