Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsDriver function returning $id is NA #274

Open
sophk1 opened this issue Feb 21, 2023 · 2 comments
Open

rsDriver function returning $id is NA #274

sophk1 opened this issue Feb 21, 2023 · 2 comments

Comments

@sophk1
Copy link

sophk1 commented Feb 21, 2023

Operating System

Windows 10

Selenium Server version (selenium-server-standalone-3.0.1.jar etc.)

selenium-server-4.8.0.jar

Browser version (firefox 50.1.0, chrome 54.0.2840.100 (64-bit) etc.)

chrome 110.0.5481.104 (64 bit)

Other driver version (chromedriver 2.27, geckodriver v0.11.1, iedriver x64_3.0.0, PhantomJS 2.1.1 etc.)

chromedriver 109.0.5414.74 (but have also tried with more recent versions)

Expected behaviour

I am expecting a browser to open and allow navigation to a url. Here is the code I am using:

driver <- rsDriver(remoteServerAddr="localhost",browser = "chrome", chromever = "109.0.5414.74", port=9515L)
server <- driver$server
browser <- driver[["client"]] 
browser$navigate(url)

Actual behaviour

Following the rsDriver function, I get the following output:
checking Selenium Server versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking chromedriver versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking geckodriver versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
checking phantomjs versions:
BEGIN: PREDOWNLOAD
BEGIN: DOWNLOAD
BEGIN: POSTDOWNLOAD
[1] "Connecting to remote server"
$id
[1] NA

The driver$server and browser <- driver[["client"]] lines run without error. Following the browser$navigate(url) function I get NULL.

Steps to reproduce the behaviour

I have RSelenium v1.7.9, wdman v0.2.6. I originally used to get an error saying

Warning: Could not determine server status.[1] "Connecting to remote server"
Could not open chrome browser.
Client error message:
Undefined error in httr call. httr output: Failed to connect to localhost port 14415 after 2229 ms: Connection refused
Check server log for further details.

I had asked about this error in a previous post. However, this error has been replaced. In addition to running the code, I also opened chromedriver manually and am trying to run the driver on the port shown in the chromedriver window. I have not been able to find anyone with the same error as of yet, so any help is greatly appreciated!

@dmurdoch
Copy link

I had a similar error on MacOS. It was caused by wdman (or maybe binman) putting LICENSE.chromedriver in the same directory as the driver, and then RSelenium (or maybe wdman) got confused, and tried to use it as a driver. Here's a bigger discussion: https://stackoverflow.com/a/75167833/2554330 . On my system the directory is ~/Library/Application Support/binman_chromedriver/mac64/*, where the * is the driver version number. You need to remove the license file from that directory (maybe from all the different directories for different versions). The linked SO discussion gives some hints on how to find it on your system.

@jonathanvoelkle
Copy link
Contributor

As mentioned by @dmurdoch, there seems to be an issue with these LICENSE files. Removing them solves the problem temporarily, on Windows they are located in a subdirectory of AppData\Local\binman_chromedriver
for me the file I had to remove was C:\Users\jonat\AppData\Local\binman\binman_chromedriver\win32\110.0.5481.30\LICENSE.chromedriver (depends on username and version of the chromedriver)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants