Error during deploy shiny app

Hi all,
during the deploy of my shiny app I get this error

Preparing to deploy document...DONE
Uploading bundle for document: 358995...Error: 
* Document depends on package "MASS" but it is not installed. Please
   resolve before continuing.

Looking on net for solution but I can't .... someone can help me

I'm not too familiar with how Shiny recognizes the 3rd party packages, but it seems like its not recognizing to install MASS. I would look into your scripts to see if you are loading it into your environment/if you're explicitly calling it up.

Hi, Raul, thanks for you answer...
MASS is a library present in base package of R so I think should be preinstalled in shinyapp server. Anyway I tried to put in my code library(MASS) but with the same error.

Considering that I deployed from my system in the same moment another app without any kind of problem....


Technically, MASS is a recommended package, not a base package, but it is still installed with R by default so it is strange for it to be missing.

Are you deploying to or to your own Shiny Server?

1 Like

Hi jcblum, I'm deploying to :slight_smile:

I added the tag to this post, so hopefully it will catch the attention of someone who has the right experience to help debug this issue.

1 Like

What is the output of rsconnect::appDependencies()?
What is the output of sessionInfo()?
What kind of Shiny application do you have: app.R, ui.R & server.R, an Rmd?

Hi Joshua , thanks for answer
my app is an app.R

these the outputs:

> rsconnect::appDependencies()

          package   version source
1              BH  1.66.0-1   CRAN
2              DT       0.4   CRAN
3            MASS    7.3-49   CRAN
4              R6     2.2.2   CRAN
5    RColorBrewer     1.1-2   CRAN
6            Rcpp   0.12.17   CRAN
7   RcppArmadillo 0.8.500.0   CRAN
8             TTR    0.23-3   CRAN
9      assertthat     0.2.0   CRAN
10      base64enc     0.1-3   CRAN
11          bindr     0.1.1   CRAN
12       bindrcpp     0.2.2   CRAN
13            cli     1.0.0   CRAN
14     colorspace     1.3-2   CRAN
15         crayon     1.3.4   CRAN
16      crosstalk     1.0.0   CRAN
17           curl       3.2   CRAN
18     data.table    1.11.2   CRAN
19      dichromat     2.0-0   CRAN
20         digest    0.6.15   CRAN
21          dplyr     0.7.5   CRAN
22       dygraphs   CRAN
23       forecast       8.3   CRAN
24       fracdiff     1.4-2   CRAN
25        ggplot2     2.2.1   CRAN
26           glue     1.2.0   CRAN
27      gridExtra       2.3   CRAN
28         gtable     0.2.0   CRAN
29         hexbin    1.27.2   CRAN
30      htmltools     0.3.6   CRAN
31    htmlwidgets     1.2.1 github
32         httpuv     1.4.3   CRAN
33           httr     1.3.1   CRAN
34       jsonlite       1.5   CRAN
35       labeling       0.3   CRAN
36          later     0.7.2   CRAN
37        lattice   0.20-35   CRAN
38       lazyeval     0.2.1   CRAN
39         lmtest    0.9-36   CRAN
40      lubridate     1.7.4   CRAN
41       magrittr       1.5   CRAN
42           mime       0.5   CRAN
43        munsell     0.4.3   CRAN
44           nlme 3.1-131.1   CRAN
45           nnet    7.3-12   CRAN
46        openssl     1.0.1   CRAN
47        packrat   0.4.9-2   CRAN
48         pillar     1.2.2   CRAN
49      pkgconfig     2.0.1   CRAN
50          plogr     0.2.0   CRAN
51         plotly     4.7.1   CRAN
52           plyr     1.8.4   CRAN
53       promises     1.0.1   CRAN
54          purrr     0.2.4   CRAN
55       quadprog     1.5-5   CRAN
56       quantmod    0.4-13   CRAN
57       reshape2     1.4.3   CRAN
58          rlang     0.2.1   CRAN
59         scales     0.5.0   CRAN
60          shiny     1.1.0   CRAN
61 shinydashboard     0.7.0   CRAN
62    sourcetools     0.1.7   CRAN
63        stringi     1.1.7   CRAN
64        stringr     1.3.1   CRAN
65         tibble     1.4.2   CRAN
66          tidyr     0.8.1   CRAN
67     tidyselect     0.2.4   CRAN
68       timeDate  3043.102   CRAN
69        tseries   0.10-44   CRAN
70           urca     1.3-0   CRAN
71          uroot     2.0-9   CRAN
72           utf8     1.1.3   CRAN
73    viridisLite     0.3.0   CRAN
74         xtable     1.8-2   CRAN
75            xts    0.10-2   CRAN
76           yaml    2.1.19   CRAN
77            zoo     1.8-1   CRAN

Warning message:
In fileDependencies.R(file) :
  Failed to parse C:/Users/Massimo/AppData/Local/Temp/Rtmpobf8AJ/filecc0287347f/code.r ; dependencies in this file will not be discovered.

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default

[1] LC_COLLATE=Italian_Italy.1252  LC_CTYPE=Italian_Italy.1252    LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C                   LC_TIME=Italian_Italy.1252

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] bindrcpp_0.2.2       dygraphs_1.1.1.4     xts_0.10-2           zoo_1.8-1            forecast_8.3         gridExtra_2.3        scales_0.5.0
[8] lubridate_1.7.4      tibble_1.4.2         dplyr_0.7.5          data.table_1.11.2    reshape2_1.4.3       plotly_4.7.1         ggplot2_2.2.1
[15] DT_0.4               shinydashboard_0.7.0 shiny_1.1.0

loaded via a namespace (and not attached):
[1] tidyselect_0.2.4     urca_1.3-0           purrr_0.2.4          lattice_0.20-35      colorspace_1.3-2     htmltools_0.3.6      viridisLite_0.3.0
[8] yaml_2.1.19          rlang_0.2.1          later_0.7.2          pillar_1.2.2         glue_1.2.0           TTR_0.23-3           bindr_0.1.1
[15] plyr_1.8.4           quantmod_0.4-13      stringr_1.3.1        timeDate_3043.102    munsell_0.4.3        gtable_0.2.0         htmlwidgets_1.2.1
[22] tseries_0.10-44      BiocInstaller_1.28.0 httpuv_1.4.3         lmtest_0.9-36        curl_3.2             parallel_3.4.4       Rcpp_0.12.17
[29] xtable_1.8-2         promises_1.0.1       jsonlite_1.5         mime_0.5             fracdiff_1.4-2       packrat_0.4.9-2      digest_0.6.15
[36] stringi_1.1.7        grid_3.4.4           quadprog_1.5-5       tools_3.4.4          magrittr_1.5         lazyeval_0.2.1       tidyr_0.8.1
[43] pkgconfig_2.0.1      rsconnect_0.8.8      assertthat_0.2.0     httr_1.3.1           R6_2.2.2             uroot_2.0-9          nlme_3.1-131.1
[50] nnet_7.3-12          compiler_3.4.4

Do you also have a file code.r?

Yes to test my R script before to put in server part of my app.... but I excluded that code during deploy... I tryied also to move in another folder only file app.r and my data (in csv format)


Could you please enable the option rsconnect.error.trace and then deploy again and include the full log?

Josh, I put this options(rsconnect.error.trace = TRUE) in my app.R, deploy but I get the same message in the Deploy panel full log!

Preparing to deploy document...DONE

Uploading bundle for document: 360002...Errore:

  • Document depends on package "MASS" but it is not installed. Please

resolve before continuing.

Esecuzione interrotta

Please perform the deploy from the console with rsconnect::deployApp()

The fact that it says "deploy document", but you say that you have an app.R is very suspicious to me.

Hi! Welcome to RStudio Community!

It looks like your code was not formatted correctly to make it easy to read for people trying to help you. Formatting code allows for people to more easily identify where issues may be occuring, and makes it easier to read, in general. I have edited you post to format the code properly.

In the future please put code that is inline (such as a function name, like mutate or filter) inside of backticks (`mutate`) and chunks of code (including things like console output and error messages) can be put between sets of three backticks:

example <- foo %>%
  filter(a == 1)

This process can be done automatically by highlighting your code, either inline or in a chunk, ad clicking the </> button on the toolbar of the reply window!

This will help keep our community tidy and help you get the help you are looking for!

For more information, please take a look at the community's FAQ on formating code

Hi Josh, follow your indication, but get the same error

Preparing to deploy application...DONE

Uploading bundle for application: 360412...Error:

* Application depends on package "MASS" but it is not installed. Please resolve before continuing.

If you think can be useful i can copy all my code or attach app.r file and a sample of my data..


Ops, sorry.
Thank you


Yes please.
You can direct message me if you don't want to make it public.

Thank you Josh,

please change name of data file in dati

sorry , variables and comment are in Italian

Hi josh did you received the files???