rstudio / shinyapps-package-dependencies

Collection of bash scripts that install R package system dependencies
https://www.shinyapps.io/
Other
79 stars 56 forks source link

Can't Open Chrome Driver in shinyapps.io #369

Open saleforecast1 opened 9 months ago

saleforecast1 commented 9 months ago

I want to run ChromeDriver in ShinyApps.io But I got an error:

Error:

Selenium message:unknown error: cannot find Chrome binary
(Driver info: chromedriver=114.0.5735.90 (386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052}),platform=Linux 6.2.0-1012-aws x86_64)
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.
Warning: Error in checkError: Undefined error in httr call. httr output: length(url) == 1 is not TRUE

Shiny Code:

library(shiny)
library(wdman)
library(RSelenium)
library(httr)    
library(netstat)

ui <- fluidPage(
  actionButton("btn", "Click Me!"),
  textOutput("txt"),
)

server <- function(input, output, session) {
  observeEvent(input$btn, {
    #connect chrome driver
    client_server <- rsDriver(
      browser = "chrome",
      chromever = "119.0.5735.90",
      verbose = FALSE,
      port = free_port(),
    )

    # connect remote driver to client
    remDr <- client_server$client
    remDr$navigate("http://www.google.com")
    remDr$maxWindowSize()
    title <- remDr$getTitle()
    output$txt <- renderText(as.character(title))
    # clean up
    remDr$quit()
  })
}

shinyApp(ui, server)

How can I fix this error?

jacpete commented 2 months ago

+1 for Support Ticket 107035