Closed nienkeg closed 5 years ago
The latest available version of PhantomJS on Ubuntu 14.04 is 1.9.0
Hopefully by the end of the year we will have transitioned the base images to Ubuntu 16.04 where 2.1.1 is the version.
Ok, thank you for the quick response. I'll try to find a workaround.
@jspiewak What is the current status on this?
No update at this time, sorry @mcdesignnl
@jspiewak is there any update on this request? It would be useful to have webshot installed for taking screen grabs of leaflet.
The base images have been Xenial based since 5/31
I just opened another one because I didn't see this. All my customers are using shinyapps.io and now they consider this PDF report as a key feature.
I tried adding library(RSelenium) but got the following error:
2018-11-15T20:20:04.971522+00:00 shinyapps[545510]: label: dt-timeseries-1 (with options)
2018-11-15T20:20:05.210417+00:00 shinyapps[545510]: ordinary text without R code
2018-11-15T20:20:05.121035+00:00 shinyapps[545510]: PhantomJS has crashed. Please read the bug reporting guide at
See the conversation in #180 It is possible for your application to install PhantomJS in a writeable directory and then consume it.
Hi,
Sorry to be a pain. I've tried several things to get PhantomJS working on the rstudio shiny apps server. Can anyone help me and tell me what I'm doing wrong. Here is my log message (note I added a check to see if it is installed and where):
2018-12-06T23:23:43.878407+00:00 shinyapps[332401]: [1] "phantomjs is installed - /usr/bin/phantomjs"
2018-12-06T23:23:43.912705+00:00 shinyapps[332401]:
2018-12-06T23:23:43.912708+00:00 shinyapps[332401]: Listening on http://127.0.0.1:40672
2018-12-06T23:23:48.586352+00:00 shinyapps[332401]: [1] "app-content"
2018-12-06T23:23:57.830854+00:00 shinyapps[332401]: QXcbConnection: Could not connect to display
2018-12-06T23:23:57.830857+00:00 shinyapps[332401]: PhantomJS has crashed. Please read the bug reporting guide at
2018-12-06T23:23:57.965948+00:00 shinyapps[332401]: [No stack trace available]
2018-12-06T23:23:57.830859+00:00 shinyapps[332401]: http://phantomjs.org/bug-reporting.html and file a bug report.
2018-12-06T23:23:57.957300+00:00 shinyapps[332401]: Aborted (core dumped)
2018-12-06T23:23:57.960717+00:00 shinyapps[332401]: Warning: Error in
@olangfor It has been resolved by https://github.com/rstudio/shinyapps-package-dependencies/pull/180
I tried this and I can see it is installed, but I am still getting an error. Sorry if I'm missing something.
There is no display available on shinyapps.io, these are headless servers. What specific call are you making?
Thanks @jspiewak appreciate the help
I'm using mapshot::mapshot to grab leaflet map image. This function is using webshot::webshot function.
And how are you installing phantomjs?
Given the reference to /usr/bin/phantomjs
, could you give the installation outlined here at try?
Thanks @jspiewak. This is the code I have in the global R file:
phantomjs_path <- webshot:::find_phantom() if (is.null(phantomjs_path)){ webshot::install_phantomjs() } else{ print(paste('phantomjs is installed -', phantomjs_path)) }
And you are still seeing /usr/bin/phantomjs
?
What other packages do you have installed, e.g. output from rsconnect::appDependencies()
?
I forced a install using by adding a line:
webshot::install_phantomjs() phantomjs_path <- webshot:::find_phantom() if (is.null(phantomjs_path)){ webshot::install_phantomjs() } else{ print(paste('phantomjs is installed -', phantomjs_path)) }
And get the following from the log, which I don't understand:
2018-12-07T19:48:50.480333+00:00 shinyapps[332401]: [1] "phantomjs is installed - /usr/bin/phantomjs" 2018-12-07T19:48:50.513675+00:00 shinyapps[332401]: 2018-12-07T19:48:50.469709+00:00 shinyapps[332401]: phantomjs has been installed to /home/shiny/bin
First one is the print I added (not sure where the second one is being called from)
My list of dependencies:
rsconnect::appDependencies() package version source 1 BH 1.66.0-1 CRAN 2 MASS 7.3-50 CRAN 3 Matrix 1.2-14 CRAN 4 R6 2.3.0 CRAN 5 RColorBrewer 1.1-2 CRAN 6 Rcpp 1.0.0 CRAN 7 TTR 0.23-3 CRAN 8 XML 3.98-1.16 CRAN 9 assertthat 0.2.0 CRAN 10 backports 1.1.2 CRAN 11 bindr 0.1.1 CRAN 12 bindrcpp 0.2.2 CRAN 13 broom 0.5.0 CRAN 14 cli 1.0.1 CRAN 15 colorspace 1.3-2 CRAN 16 crayon 1.3.4 CRAN 17 crosstalk 1.0.0 CRAN 18 curl 3.2 CRAN 19 data.table 1.11.8 CRAN 20 digest 0.6.18 CRAN 21 dplyr 0.7.8 CRAN 22 fansi 0.2.3 CRAN 23 ggplot2 3.1.0 CRAN 24 ggvis 0.4.4 CRAN 25 glue 1.3.0 CRAN 26 gtable 0.2.0 CRAN 27 highcharter 0.6.0 github 28 htmltools 0.3.6 CRAN 29 htmlwidgets 1.2 CRAN 30 httpuv 1.4.5 CRAN 31 igraph 1.2.2 CRAN 32 jsonlite 1.5 CRAN 33 labeling 0.3 CRAN 34 later 0.7.5 CRAN 35 lattice 0.20-35 CRAN 36 lazyeval 0.2.1 CRAN 37 lubridate 1.7.4 CRAN 38 magrittr 1.5 CRAN 39 mgcv 1.8-24 CRAN 40 mime 0.6 CRAN 41 munsell 0.5.0 CRAN 42 nlme 3.1-137 CRAN 43 packrat 0.4.9-3 CRAN 44 pillar 1.3.0 CRAN 45 pkgconfig 2.0.2 CRAN 46 plogr 0.2.0 CRAN 47 plyr 1.8.4 CRAN 48 promises 1.0.1 CRAN 49 purrr 0.2.5 CRAN 50 quantmod 0.4-13 CRAN 51 reshape2 1.4.3 CRAN 52 rlang 0.3.0.1 CRAN 53 rlist 0.4.6.1 CRAN 54 rpivotTable 0.3.0 CRAN 55 scales 1.0.0 CRAN 56 shiny 1.2.0 CRAN 57 shinydashboard 0.7.1 CRAN 58 shinyjs 1.0 CRAN 59 sourcetools 0.1.7 CRAN 60 stringi 1.2.4 CRAN 61 stringr 1.3.1 CRAN 62 tibble 1.4.2 CRAN 63 tidyr 0.8.2 CRAN 64 tidyselect 0.2.5 CRAN 65 utf8 1.1.4 CRAN 66 viridisLite 0.3.0 CRAN 67 whisker 0.3-2 CRAN 68 withr 2.1.2 CRAN 69 xtable 1.8-3 CRAN 70 xts 0.10-2 CRAN 71 yaml 2.2.0 CRAN 72 zoo 1.8-3 CRAN
Thanks @jspiewak really appreciate you helping me.
That doesn't look accurate, since it doesn't include webshot
, or mapview
, or leaflet
.
Are you certain you ran that in the directory of the application you deployed?
From inspection of that application, RSelenium
is still present.
@olangfor Could you please remove RSelenium if not required. It will install a older version of phantomjs which cannot work well with webshot.
Thanks @csliangy is not included RSelenium, sadly same error.
Sorry, I was pointing in the wrong directory:
package version source
1 BH 1.66.0-1 CRAN 2 DBI 1.0.0 CRAN 3 DT 0.4 CRAN 4 MASS 7.3-50 CRAN 5 Matrix 1.2-14 CRAN 6 R.methodsS3 1.7.1 CRAN 7 R.oo 1.22.0 CRAN 8 R.utils 2.6.0 CRAN 9 R6 2.3.0 CRAN 10 RColorBrewer 1.1-2 CRAN 11 Rcpp 1.0.0 CRAN 12 TTR 0.23-3 CRAN 13 XML 3.98-1.16 CRAN 14 assertthat 0.2.0 CRAN 15 backports 1.1.2 CRAN 16 base64enc 0.1-3 CRAN 17 bindr 0.1.1 CRAN 18 bindrcpp 0.2.2 CRAN 19 brew 1.0-6 CRAN 20 broom 0.5.0 CRAN 21 callr 2.0.4 CRAN 22 class 7.3-14 CRAN 23 classInt 0.2-3 CRAN 24 cli 1.0.1 CRAN 25 codetools 0.2-15 CRAN 26 colorspace 1.3-2 CRAN 27 convertGraph 0.1 CRAN 28 crayon 1.3.4 CRAN 29 crosstalk 1.0.0 CRAN 30 curl 3.2 CRAN 31 data.table 1.11.8 CRAN 32 debugme 1.1.0 CRAN 33 digest 0.6.18 CRAN 34 dplyr 0.7.8 CRAN 35 e1071 1.6-8 CRAN 36 evaluate 0.11 CRAN 37 fansi 0.2.3 CRAN 38 foreach 1.4.4 CRAN 39 gdalUtils 2.0.1.14 CRAN 40 gdtools 0.1.7 CRAN 41 ggplot2 3.1.0 CRAN 42 ggvis 0.4.4 CRAN 43 glue 1.3.0 CRAN 44 gridExtra 2.3 CRAN 45 gtable 0.2.0 CRAN 46 highcharter 0.6.0 github 47 highr 0.7 CRAN 48 hms 0.4.2 CRAN 49 htmltools 0.3.6 CRAN 50 htmlwidgets 1.2 CRAN 51 httpuv 1.4.5 CRAN 52 httr 1.3.1 CRAN 53 igraph 1.2.2 CRAN 54 iterators 1.0.10 CRAN 55 jsonlite 1.5 CRAN 56 kableExtra 0.9.0 CRAN 57 knitr 1.20 CRAN 58 labeling 0.3 CRAN 59 later 0.7.5 CRAN 60 lattice 0.20-35 CRAN 61 lazyeval 0.2.1 CRAN 62 leaflet 2.0.1 CRAN 63 lubridate 1.7.4 CRAN 64 magrittr 1.5 CRAN 65 mapproj 1.2.6 CRAN 66 maps 3.3.0 CRAN 67 mapview 2.4.0 CRAN 68 markdown 0.8 CRAN 69 mgcv 1.8-24 CRAN 70 mime 0.6 CRAN 71 munsell 0.5.0 CRAN 72 nlme 3.1-137 CRAN 73 openssl 1.0.2 CRAN 74 packrat 0.4.9-3 CRAN 75 pillar 1.3.0 CRAN 76 pkgconfig 2.0.2 CRAN 77 plogr 0.2.0 CRAN 78 plyr 1.8.4 CRAN 79 png 0.1-7 CRAN 80 processx 3.2.0 CRAN 81 profvis 0.3.5 CRAN 82 promises 1.0.1 CRAN 83 ps 1.2.0 CRAN 84 purrr 0.2.5 CRAN 85 quantmod 0.4-13 CRAN 86 raster 2.6-7 CRAN 87 readr 1.1.1 CRAN 88 reshape2 1.4.3 CRAN 89 rgdal 1.3-6 CRAN 90 rlang 0.3.0.1 CRAN 91 rlist 0.4.6.1 CRAN 92 rmarkdown 1.10 CRAN 93 rpivotTable 0.3.0 CRAN 94 rprojroot 1.3-2 CRAN 95 rstudioapi 0.8 CRAN 96 rvest 0.3.2 CRAN 97 satellite 1.0.1 CRAN 98 scales 1.0.0 CRAN 99 selectr 0.4-1 CRAN 100 sf 0.6-3 CRAN 101 shiny 1.2.0 CRAN 102 shinydashboard 0.7.1 CRAN 103 shinyjs 1.0 CRAN 104 showimage 1.0.0 CRAN 105 sourcetools 0.1.7 CRAN 106 sp 1.3-1 CRAN 107 spData 0.2.9.0 CRAN 108 stringi 1.2.4 CRAN 109 stringr 1.3.1 CRAN 110 svglite 1.2.1 CRAN 111 tibble 1.4.2 CRAN 112 tidyr 0.8.2 CRAN 113 tidyselect 0.2.5 CRAN 114 tinytex 0.6 CRAN 115 units 0.6-0 CRAN 116 utf8 1.1.4 CRAN 117 uuid 0.1-2 CRAN 118 viridis 0.5.1 CRAN 119 viridisLite 0.3.0 CRAN 120 webdriver 1.0.5 CRAN 121 webshot 0.5.1 CRAN 122 whisker 0.3-2 CRAN 123 withr 2.1.2 CRAN 124 xfun 0.3 CRAN 125 xml2 1.2.0 CRAN 126 xtable 1.8-3 CRAN 127 xts 0.10-2 CRAN 128 yaml 2.2.0 CRAN 129 zipcode 1.0 CRAN 130 zoo 1.8-3 CRAN
@olangfor Please also remove convertGraph, I observed the exact same issue when attempting to install phantomjs by convertGraph.
@csliangy Thank you so much. Never would have got to the bottom of it. @jspiewak thank you for helping.
Much appreciated!
Would it be possible to add phantomjs for the webshot package?
I've already seen the #68 topic. Someone is asking there as well if the webshot package will work. I tried adding
library(RSelenium)
to my code, and then calling the webshot package, but then I get the error 'CasperJS needs at least PhantomJS v1.9.1 or later.'