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

Unable to navigate to sites using chome after R version 4.2.2 #268

Open
coquito77 opened this issue Jan 26, 2023 · 1 comment
Open

Unable to navigate to sites using chome after R version 4.2.2 #268

coquito77 opened this issue Jan 26, 2023 · 1 comment

Comments

@coquito77
Copy link

After upgrading to R version 4.2.2, I can not use Selenium anymore to open the Chrome browser. I tried adding some chrome options from this, and reinstalling chrome but no success. Can anybody help?

library(rvest)
library(RSelenium)

system("taskkill /im java.exe /f", intern=FALSE, ignore.stdout=FALSE)

ERROR: The process "java.exe" not found.
[1] 128

cprof <- getChromeProfile(  "C:\\Users\\<MyUserName>\\AppData\\Local\\Google\\Chrome\\User Data\\",  "Default")

rD <- rsDriver(browser="chrome", chromever="107.0.5304.62", port = netstat::free_port(), extraCapabilities = cprof)

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"

Selenium message:unknown error: Chrome failed to start: exited normally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location C:\Program Files\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T21:30:10'
System info: host: 'myMachinesInfo', ip: '123456', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: unknown
remote stacktrace: Backtrace:
Ordinal0 [0x0102ACD3+2075859]
Ordinal0 [0x00FBEE61+1633889]
Ordinal0 [0x00EBB7BD+571325]
Ordinal0 [0x00EDAA93+699027]
Ordinal0 [0x00ED6BE9+682985]
Ordinal0 [0x00F0DBD3+908243]
Ordinal0 [0x00F0D6AA+906922]
Ordinal0 [0x00F07136+880950]
Ordinal0 [0x00EDFEFD+720637]
Ordinal0 [0x00EE0F3F+724799]
GetHandleVerifier [0x012DEED2+2769538]
GetHandleVerifier [0x012D0D95+2711877]
GetHandleVerifier [0x010BA03A+521194]
GetHandleVerifier [0x010B8DA0+516432]
Ordinal0 [0x00FC682C+1665068]
Ordinal0 [0x00FCB128+1683752]
Ordinal0 [0x00FCB215+1683989]
Ordinal0 [0x00FD6484+1729668]
BaseThreadInitThunk [0x75F800F9+25]
RtlGetAppContainerNamedObjectPath [0x77027BBE+286]
RtlGetAppContainerNamedObjectPath [0x77027B8E+238]

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.

 remDr <- try(rD[["client"]])

 Sys.sleep(1) # give time for browser to get ready

 try(remDr$navigate("https://www.yahoo.com/"))

Error in checkError(res) :
Undefined error in httr call. httr output: length(url) == 1 is not TRUE
sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] RSelenium_1.7.9 rvest_1.0.3

loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 rstudioapi_0.14 xml2_1.3.3 magrittr_2.0.3 rappdirs_0.3.3 R6_2.5.1
[7] rlang_1.0.6 httr_1.4.4 caTools_1.18.2 tools_4.2.2 binman_0.1.3 cli_3.6.0
[13] semver_0.2.0 yaml_2.3.7 assertthat_0.2.1 lifecycle_1.0.3 processx_3.8.0 ps_1.7.2
[19] bitops_1.0-7 curl_5.0.0 glue_1.6.2 wdman_0.2.5 compiler_4.2.2 netstat_0.1.2
[25] jsonlite_1.8.4

@bedantaguru
Copy link

Looks like installation is not complete

I recommend install Java and then retry

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

2 participants