Knitr publish issue: PhantomJS and File permission

..When I published my app to shinyapps.io, I came across the following issues:

  • PhantomJS
  • file(con, "rb"): cannot open the connection

The full log in the output pdf file:

PhantomJS not found. You can install it with webshot::install phantomjs(). If it
is installed, please make sure the phantomjs executable can be found via the PATH variable.
Warning in normalizePath(f2): path[1]="./webshot6c3d201217.pdf": No such file or
directory
Warning in file(con, "rb"): cannot open file ’./webshot6c3d201217.pdf’: No such
file or directory
 Error in file(con, "rb"): cannot open the connection
A tibble: 0 x 2
... with 2 variables: group <chr>, sort.order <dbl>
PhantomJS not found. You can install it with webshot::install phantomjs(). If it
is installed, please make sure the phantomjs executable can be found via the PATH variable.
Warning in normalizePath(f2): path[1]="./webshot6c23dc44d3.pdf": No such file or
directory
Warning in file(con, "rb"): cannot open file ’./webshot6c23dc44d3.pdf’: No such
file or directory
Error in file(con, "rb"): cannot open the connection
1 Like

Hi!

I'm dealing with the same issue. Have you found any solution to this?

Best!

Yes, there is a workaround:

Add this to your server.R:

if (is.null(suppressMessages(webshot:::find_phantom()))) { webshot::install_phantomjs() }