How to properly configure Google Chrome on (because of webshot2)

I made a Shiny app, which allows users to download specific plots based on the data they upload. While the app works perfectly on my computer, it fails to download the plots once deployed on One of the downloaded charts is created with flextable::save_as_image(), which makes use of {webshot2}. Based on my conversations with @cderv , this function is the culprit and he is right because when I remove that chart, everything works perfectly. The log message on is: 'google-chrome' and 'chromium-browser' were not found. Try setting the CHROMOTE_CHROME environment variable or adding one of these executables to your PATH.

As a {golem} user, I edited my golem-config.yml, which now looks like this:

  golem_name: TechEvalsExtractor
  app_prod: no
  app_prod: yes
  CHROMOTE_CHROME: /usr/bin/google-chrome
  golem_wd: F:/Projects/TechEvalsExtractor

But I am still have the same issue. So my question is: how do I configure Google Chrome on
Thank you

New vignette for pagedown also use Chrome and I had similar question as you do but without answers. This may help you: GitHub - RLesur/chrome_print_shiny: How to use pagedown::chrome_print() in a Shiny app?

Please report back on solution if you happen to find anything. Also, I'm also curious if Chromium would work instead of Chrome.

IMO, the very first problem is certainly related to system dependencies.
In, system dependencies are managed through this repository: GitHub - rstudio/shinyapps-package-dependencies: Collection of bash scripts that install R package system dependencies
As you can see in the list of packages (shinyapps-package-dependencies/packages at master · rstudio/shinyapps-package-dependencies · GitHub), the system dependencies for {chromote} (ie Chrome) are not declared.
So, Chrome is not installed in your deployment.


Chromium cannot easily be installed in Shinyapps. This is because Shinyapps uses containers with a focal distro: until bionic, Chromium was available as a deb file. However since disco, Chromium is only distributed as a snap package but snapd does not work in containers.

1 Like

Here is a minimal shiny application which works on

# force the use of pagedown to install chrome on (this is a workaround)
# force the use of curl because chromote needs it (see

ui <- fluidPage(
    downloadButton("downloadScreenshot", "Download screenshot")

server <- function(input, output) {
    message(curl::curl_version()) # check curl is installed
    if (identical(Sys.getenv("R_CONFIG_ACTIVE"), "shinyapps")) {
                args = c("--disable-gpu", 
                         "--disable-dev-shm-usage", # required bc the target easily crashes
                         c("--force-color-profile", "srgb"))

    output$downloadScreenshot <- downloadHandler(
        filename = function() {
            paste("screenshot-", Sys.Date(), ".png", sep="")
        content = function(file) {
            webshot2::webshot("", file)

shinyApp(ui = ui, server = server)

Some comments:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.