Deploying R Shiny app - Error. Application failed to start

Hello,

I have an R Shiny app that has been working well unti last week. Initially, I got an error that the app was Out of memory, but that error has since disappeared, and now when I try to deploy the app, the log just shows a list of packages being loaded, with multiple saying that there is no package of that name.

I recently updated all of my packages as well, and I think that may be one of the issuess, but I'm having trouble understanding specifically what is wrong.

The app works fine locally, but it is just when it is deployed that it does not work.

The log has messages like this:
2022-03-23T10:32:26.361699+00:00 shinyapps[5111197]: Loading required package: epitools
2022-03-23T10:32:26.361619+00:00 shinyapps[5111197]: rename, round_any
2022-03-23T10:32:26.361756+00:00 shinyapps[5111197]: Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
2022-03-23T10:32:26.361854+00:00 shinyapps[5111197]: Loading required package: ggpubr
2022-03-23T10:32:26.361900+00:00 shinyapps[5111197]: Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
2022-03-23T10:32:26.361949+00:00 shinyapps[5111197]: there is no package called ‘ggpubr’
2022-03-23T10:32:26.361806+00:00 shinyapps[5111197]: there is no package called ‘epitools’
2022-03-23T10:32:26.361998+00:00 shinyapps[5111197]: Loading required package: shinythemes
2022-03-23T10:32:26.362044+00:00 shinyapps[5111197]: Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
2022-03-23T10:32:26.362094+00:00 shinyapps[5111197]: there is no package called ‘shinythemes’

I've installed all of these packages, and they work locally. However, there are two different paths from .libPaths(), but after trying again to reinstall, I get a message that the downloaded binary packages are in 'C:\Users{username}\AppData\Local\Temp\RtmpM3BcUL\downloaded_packages' - this appears to be a temporary folder, so perhaps the issue is that the app cannot find the packages here?

  • My output of "rsconnect::appDependencies()" is:
    package version source
    1 DBI 1.1.2 CRAN
    2 KernSmooth 2.23-20 CRAN
    3 MASS 7.3-56 CRAN
    4 Matrix 1.4-0 CRAN
    5 R.cache 0.15.0 CRAN
    6 R.methodsS3 1.8.1 CRAN
    7 R.oo 1.24.0 CRAN
    8 R.utils 2.11.0 CRAN
    9 R6 2.5.1 CRAN
    10 RColorBrewer 1.1-2 CRAN
    11 Rcpp 1.0.8.3 CRAN
    12 askpass 1.1 CRAN
    13 assertthat 0.2.1 CRAN
    14 backports 1.4.1 CRAN
    15 base64enc 0.1-3 CRAN
    16 bit 4.0.4 CRAN
    17 bit64 4.0.5 CRAN
    18 blob 1.2.2 CRAN
    19 broom 0.7.12 CRAN
    20 bslib 0.3.1 CRAN
    21 cachem 1.0.6 CRAN
    22 callr 3.7.0 CRAN
    23 cellranger 1.1.0 CRAN
    24 class 7.3-20 CRAN
    25 classInt 0.4-3 CRAN
    26 cli 3.2.0 CRAN
    27 clipr 0.8.0 CRAN
    28 colorspace 2.0-3 CRAN
    29 commonmark 1.8.0 CRAN
    30 cpp11 0.4.2 CRAN
    31 crayon 1.5.0 CRAN
    32 curl 4.3.2 CRAN
    33 data.table 1.14.2 CRAN
    34 dbplyr 2.1.1 CRAN
    35 digest 0.6.29 CRAN
    36 dplyr 1.0.8 CRAN
    37 dtplyr 1.2.1 CRAN
    38 e1071 1.7-9 CRAN
    39 ellipsis 0.3.2 CRAN
    40 evaluate 0.15 CRAN
    41 fansi 1.0.2 CRAN
    42 farver 2.1.0 CRAN
    43 fastmap 1.1.0 CRAN
    44 fontawesome 0.2.2 CRAN
    45 forcats 0.5.1 CRAN
    46 fs 1.5.2 CRAN
    47 gargle 1.2.0 CRAN
    48 generics 0.1.2 CRAN
    49 ggplot2 3.3.5 CRAN
    50 glue 1.6.2 CRAN
    51 googledrive 2.0.0 CRAN
    52 googlesheets4 1.0.0 CRAN
    53 gridExtra 2.3 CRAN
    54 gtable 0.3.0 CRAN
    55 haven 2.4.3 CRAN
    56 highr 0.9 CRAN
    57 hms 1.1.1 CRAN
    58 htmltools 0.5.2 CRAN
    59 httpuv 1.6.5 CRAN
    60 httr 1.4.2 CRAN
    61 ids 1.0.1 CRAN
    62 isoband 0.2.5 CRAN
    63 jquerylib 0.1.4 CRAN
    64 jsonlite 1.8.0 CRAN
    65 knitr 1.37 CRAN
    66 labeling 0.4.2 CRAN
    67 labelled 2.9.0 CRAN
    68 later 1.3.0 CRAN
    69 lattice 0.20-45 CRAN
    70 lifecycle 1.0.1 CRAN
    71 lubridate 1.8.0 CRAN
    72 magrittr 2.0.2 CRAN
    73 mgcv 1.8-39 CRAN
    74 mime 0.12 CRAN
    75 miniUI 0.1.1.1 CRAN
    76 modelr 0.1.8 CRAN
    77 munsell 0.5.0 CRAN
    78 nlme 3.1-155 CRAN
    79 openssl 2.0.0 CRAN
    80 pillar 1.7.0 CRAN
    81 pkgconfig 2.0.3 CRAN
    82 plyr 1.8.6 CRAN
    83 prettyunits 1.1.1 CRAN
    84 processx 3.5.2 CRAN
    85 progress 1.2.2 CRAN
    86 promises 1.2.0.1 CRAN
    87 proxy 0.4-26 CRAN
    88 ps 1.6.0 CRAN
    89 purrr 0.3.4 CRAN
    90 questionr 0.7.7 CRAN
    91 rappdirs 0.3.3 CRAN
    92 readr 2.1.2 CRAN
    93 readxl 1.3.1 CRAN
    94 rematch 1.0.1 CRAN
    95 rematch2 2.1.2 CRAN
    96 reprex 2.0.1 CRAN
    97 reshape 0.8.8 CRAN
    98 rlang 1.0.2 CRAN
    99 rmarkdown 2.13 CRAN
    100 rprojroot 2.0.2 CRAN
    101 rstudioapi 0.13 CRAN
    102 rvest 1.0.2 CRAN
    103 sass 0.4.0 CRAN
    104 scales 1.1.1 CRAN
    105 selectr 0.4-2 CRAN
    106 shiny 1.7.1 CRAN
    107 sourcetools 0.1.7 CRAN
    108 stringi 1.7.6 CRAN
    109 stringr 1.4.0 CRAN
    110 styler 1.7.0 CRAN
    111 sys 3.4 CRAN
    112 tibble 3.1.6 CRAN
    113 tidyr 1.2.0 CRAN
    114 tidyselect 1.1.2 CRAN
    115 tidyverse 1.3.1 CRAN
    116 tinytex 0.37 CRAN
    117 tzdb 0.2.0 CRAN
    118 utf8 1.2.2 CRAN
    119 uuid 1.0-4 CRAN
    120 vctrs 0.3.8 CRAN
    121 viridisLite 0.4.0 CRAN
    122 vroom 1.5.7 CRAN
    123 withr 2.5.0 CRAN
    124 xfun 0.30 CRAN
    125 xml2 1.3.3 CRAN
    126 xtable 1.8-4 CRAN
    127 yaml 2.3.5 CRAN

  • The url of my app is https://rammpsdrc.shinyapps.io/RAMMPS_DRCDashboard/

Please if you have any ideas about how to resolve this, I would be very grateful!

Thank you.

I would recommend you use renv to manage your projects dependencies.
I know rsconnect itself uses packrat (which renv is an effort to replace), yet by using renv to manage my local project dependencies, I find that rsconnect has an easier than otherwise job of deploying to foreign servers.
Hopefully this approach would help you.