unable to deploy application in shiny apps IO

I'm trying to deploy to shiny apps an application. think the following logs will say more.
i add more descriptions at the end.

When it launches the app it wont start; just show console with the following output log:

( too long, also can't upload txt, so , its on paste bin: https://pastebin.com/PbKEuYEV )

the output of rsconnect::appDependencies() is the following:

                 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                     R6      2.3.0   CRAN
7             RBioFabric        0.4 github
8           RColorBrewer      1.1-2   CRAN
9                RSQLite      2.1.1   CRAN
10                  Rcpp      1.0.0   CRAN
11             animation        2.5   CRAN
12             assertive      0.3-5   CRAN
13        assertive.base      0.0-7   CRAN
14        assertive.code      0.0-1   CRAN
15        assertive.data      0.0-1   CRAN
16     assertive.data.uk      0.0-1   CRAN
17     assertive.data.us      0.0-1   CRAN
18   assertive.datetimes      0.0-2   CRAN
19       assertive.files      0.0-2   CRAN
20    assertive.matrices      0.0-1   CRAN
21      assertive.models      0.0-1   CRAN
22     assertive.numbers      0.0-2   CRAN
23  assertive.properties      0.0-4   CRAN
24  assertive.reflection      0.0-4   CRAN
25        assertive.sets      0.0-3   CRAN
26     assertive.strings      0.0-3   CRAN
27       assertive.types      0.0-3   CRAN
28            assertthat      0.2.0   CRAN
29             backports      1.1.2   CRAN
30                base64        2.0   CRAN
31             base64enc      0.1-3   CRAN
32                 bindr      0.1.1   CRAN
33              bindrcpp      0.2.2   CRAN
34                   bit     1.1-14   CRAN
35                 bit64      0.9-7   CRAN
36                  blob      1.1.1   CRAN
37                bsplus      0.1.1   CRAN
38                 callr      3.0.0   CRAN
39                   cli      1.0.1   CRAN
40                 clipr      0.4.1   CRAN
41            clisymbols      1.2.0   CRAN
42                  coda     0.19-1   CRAN
43             codetools     0.2-15   CRAN
44            colorspace      1.3-2   CRAN
45                crayon      1.3.4   CRAN
46             crosstalk      1.0.0   CRAN
47                  curl        3.2   CRAN
48            data.table     1.11.4   CRAN
49                  desc      1.2.0   CRAN
50              devtools      2.0.1   CRAN
51                digest     0.6.18   CRAN
52                 dplyr      0.7.6   CRAN
53              evaluate       0.12   CRAN
54                 fansi      0.4.0   CRAN
55               forcats      0.3.0   CRAN
56                    fs      1.2.6   CRAN
57               ggplot2      3.1.0   CRAN
58              ggridges      0.5.1   CRAN
59                    gh      1.0.1   CRAN
60                 git2r     0.23.0   CRAN
61                  glue      1.3.0   CRAN
62                gtable      0.2.0   CRAN
63                  here        0.1   CRAN
64                hexbin     1.27.2   CRAN
65                 highr        0.7   CRAN
66                   hms      0.4.2   CRAN
67             htmltools      0.3.6   CRAN
68           htmlwidgets        1.3   CRAN
69                httpuv      1.4.5   CRAN
70                  httr      1.3.1   CRAN
71                igraph      1.2.2   CRAN
72            igraphdata      1.0.1   CRAN
73                   ini      0.3.1   CRAN
74            intergraph      2.0-2   CRAN
75              jsonlite        1.5   CRAN
76                 knitr       1.20   CRAN
77              labeling        0.3   CRAN
78                 later      0.7.5   CRAN
79               lattice    0.20-35   CRAN
80              lazyeval      0.2.1   CRAN
81             lubridate      1.7.4   CRAN
82              magrittr        1.5   CRAN
83              markdown        0.8   CRAN
84               memoise      1.1.0   CRAN
85                  mgcv     1.8-24   CRAN
86                  mime        0.6   CRAN
87               munsell      0.5.0   CRAN
88                  ndtv     0.12.2   CRAN
89               network   1.13.0.1   CRAN
90        networkDynamic      0.9.0   CRAN
91                  nlme    3.1-137   CRAN
92               openssl      1.0.2   CRAN
93               packrat    0.4.9-3   CRAN
94                pander      0.6.2   CRAN
95                pillar      1.3.0   CRAN
96              pkgbuild 1.0.2.9000 github
97             pkgconfig      2.0.2   CRAN
98               pkgload      1.0.2   CRAN
99                 plogr      0.2.0   CRAN
100               plotly      4.8.0   CRAN
101                 plyr      1.8.4   CRAN
102               praise      1.0.0   CRAN
103          prettyunits      1.0.2   CRAN
104             processx      3.2.0   CRAN
105             promises      1.0.1   CRAN
106                   ps      1.2.0   CRAN
107                purrr      0.2.5   CRAN
108            rcmdcheck      1.3.0   CRAN
109                readr      1.1.1   CRAN
110              remotes      2.0.2   CRAN
111             reshape2      1.4.3   CRAN
112                rlang    0.3.0.1   CRAN
113            rmarkdown       1.10   CRAN
114            rprojroot      1.3-2   CRAN
115           rstudioapi        0.7   CRAN
116               scales      1.0.0   CRAN
117          sessioninfo      1.1.0   CRAN
118                shiny      1.1.0   CRAN
119         shinyWidgets      0.4.3   CRAN
120       shinydashboard      0.7.0   CRAN
121                skimr      1.0.3   CRAN
122                  sna        2.4   CRAN
123          sourcetools      0.1.7   CRAN
124       statnet.common      4.1.4   CRAN
125              stringi      1.2.4   CRAN
126              stringr      1.3.1   CRAN
127             testthat      2.0.0   CRAN
128               tibble      1.4.2   CRAN
129                tidyr      0.8.1   CRAN
130           tidyselect      0.2.4   CRAN
131              tinytex        0.9   CRAN
132              usethis      1.4.0   CRAN
133                 utf8      1.1.4   CRAN
134          viridisLite      0.3.0   CRAN
135           visNetwork      2.0.4   CRAN
136               visdat      0.5.1   CRAN
137              whisker      0.3-2   CRAN
138                withr      2.1.2   CRAN
139                 xfun        0.4   CRAN
140                xopen      1.0.0   CRAN
141               xtable      1.8-3   CRAN
142                 yaml      2.2.0   CRAN
Warning message:
In fileDependencies.R(file) :
  Failed to parse C:/Users/julio/AppData/Local/Temp/RtmpwVOrLj/file158048d6c0e/funcs/server.r ; dependencies in this file will not be discovered.

**some changes i've done since last time it worked: **

. added some Rdata files
. added some libraries ( skimr, ggridges,visdat,forcats )
. about the only custom library: RBioFabric, got a live demo working with just that library ( https://jaspa.shinyapps.io/RBioFabricShinyExample/ )

asking help as im running out of ideas;

  • the application wokrs on localhost.
  • the application runs on shiny server ( installed on a VM, linux mint )

news:

  • the shiny server worked, but plotly was weird, so stoped server, and updated ggplot2 ( cran ) and plotly ( cran )
  • after that it wont start. " Error: periodo = anio must be a symbol or a string, not a formula ; Execution halted"

In the code you have deployed to shinyapps.io you are trying to install a package:

2018-12-13T20:10:08.221267+00:00 shinyapps[600820]: Downloading GitHub repo jas1/RBioFabric@master
2018-12-13T20:10:10.768416+00:00 shinyapps[600820]: Installing 1 packages: jsonlite
2018-12-13T20:10:10.765832+00:00 shinyapps[600820]: jsonlite (1.5 -> 1.6) [CRAN]
2018-12-13T20:10:10.781392+00:00 shinyapps[600820]:   (convertido del aviso) 'lib = "/opt/R/3.5.1/lib/R/library"' is not writable
2018-12-13T20:10:10.781390+00:00 shinyapps[600820]: Error in value[[3L]](cond) :
2018-12-13T20:10:10.781394+00:00 shinyapps[600820]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>

You should install packages locally, and then make library() calls in the code you deploy. shinyapps.io will make sure the packages are installed. See the Using Your R Packages in the Cloud and Troubleshooting section of the documentation for more details.

Thanks josh for the quick reply :smiley: ! ,

not solved but closer i guess :stuck_out_tongue:

when upgrading R some package dependencies where not explicitly installed.

the only explicit install i have is:

devtools::install_github("jas1/RBioFabric")
library(RBioFabric)

and looks like ok as said on: 2.4.0.1 Important note on GitHub packages in:
http://docs.rstudio.com/shinyapps.io/getting-started.html#managing-r-versions

the error i got this time: ( just an extract on the last details)

2018-12-17T14:22:07.274165+00:00 shinyapps[600820]: Attaching package: ‘jsonlite’
2018-12-17T14:22:07.274700+00:00 shinyapps[600820]: The following object is masked from ‘package:purrr’:
2018-12-17T14:22:07.274701+00:00 shinyapps[600820]: 
2018-12-17T14:22:07.274702+00:00 shinyapps[600820]:     flatten
2018-12-17T14:22:07.275868+00:00 shinyapps[600820]: 
2018-12-17T14:22:07.478471+00:00 shinyapps[600820]: Downloading GitHub repo jas1/RBioFabric@master
2018-12-17T14:22:07.274702+00:00 shinyapps[600820]: 
2018-12-17T14:22:07.275866+00:00 shinyapps[600820]: The following object is masked from ‘package:shiny’:
2018-12-17T14:22:07.274166+00:00 shinyapps[600820]: 
2018-12-17T14:22:07.275867+00:00 shinyapps[600820]: 
2018-12-17T14:22:07.275867+00:00 shinyapps[600820]:     validate
2018-12-17T14:22:09.945984+00:00 shinyapps[600820]: 
2018-12-17T14:22:10.201043+00:00 shinyapps[600820]:   
   checking for file ‘/tmp/RtmpoqyXRE/remotes13cd56dbf/jas1-RBioFabric-7ad013e/DESCRIPTION’ ...
  
✔  checking for file ‘/tmp/RtmpoqyXRE/remotes13cd56dbf/jas1-RBioFabric-7ad013e/DESCRIPTION’
2018-12-17T14:22:10.227043+00:00 shinyapps[600820]: 
  
─  preparing ‘RBioFabric’:
2018-12-17T14:22:10.232668+00:00 shinyapps[600820]: 
  
   checking DESCRIPTION meta-information ...
  
✔  checking DESCRIPTION meta-information
2018-12-17T14:22:10.263747+00:00 shinyapps[600820]: 
  
─  checking for LF line-endings in source and make files and shell scripts
2018-12-17T14:22:10.267777+00:00 shinyapps[600820]: 
  
─  checking for empty or unneeded directories
2018-12-17T14:22:10.272302+00:00 shinyapps[600820]: 
  
─  building ‘RBioFabric_0.4.tar.gz’
2018-12-17T14:22:10.340283+00:00 shinyapps[600820]: 
  
   
2018-12-17T14:22:10.368726+00:00 shinyapps[600820]:   (convertido del aviso) 'lib = "/opt/R/3.5.1/lib/R/library"' is not writable
2018-12-17T14:22:10.368723+00:00 shinyapps[600820]: 
Error in value[[3L]](cond) : 
2018-12-17T14:22:10.368727+00:00 shinyapps[600820]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
2018-12-17T14:22:10.368727+00:00 shinyapps[600820]: Ejecución interrumpida

about 2.4 Using your R packages in the cloud:

  • R packages that do not run on Ubuntu Linux : checked, it works on my notebook w/ linux mint
  • R packages that require access to the display (such as Tcl/Tk): is there any quick & friendly way to check all dependency tree ? of an application ?

On the other hand, any good practices to debug this kind of stuff ?

ex: having a visualization of dependency tree for an application?
ex: from an application dependency tree, way to check wich packages are installed explicitly on the local reposiory ?
ex: when upgrading R , and libraries are download again, which are installed and wich not on your local system

Thanks in advance :smiley: !

You should not have any explicit package installs in the code you deploy.
Packages installed from GitHub will be detected and installed by shinyapps.io as well. If they are private packages you will need to enable a GitHub token on your account. Otherwise, it should just work.

  • commented the devtools::install_github
  • redeployed
  • and worked like charm !

I owe you a beer :beers: ! many thanks :smiley: !

for others with same problem:

  • remove all install.packages from any script of your application
  • remove all devtools:install_github after you installed the packages.

( or at least comment them :stuck_out_tongue: )

if still problems:

  • check for package dependencies

suggestions

  • may be add a dependency tree checker included on rstudio ?
  • that includes: visual aid, app dependencies, and local repository satisfied dependencies / missing ?

Thanks again :smile: :sunny: !

pd: ill select this answer as valid, as responses are spread on several posts. (credits to josh)

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