deployApp failure, what is the source?

I am attempting to deploy my first shiny app. It runs fine on my local environment but I get the following error on deploy.

> Reading package lists...
> Building ################################# End Task Log ################################# 
> Error: Unhandled Exception: Child Task 677343096 failed: Error building image: Error fetching XML (4.0-0) source. <CRANPackageSource repo='http://cran.rstudio.org'> unable to satisfy package: XML (4.0-0)
> In addition: Warning messages:
> 1: In FUN(X[[i]], ...) :
>   Package 'XML 4.0-0' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores
> 2: In FUN(X[[i]], ...) :
>   Package 'XML 4.0-0' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores
> 3: In FUN(X[[i]], ...) :
>   Package 'XML 4.0-0' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores
> 4: In FUN(X[[i]], ...) :
>   Package 'XML 4.0-0' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores

I am running a CRAN package 'rdfanalysis'. Perhaps this is causing the problem?

My dependencies log:

         package    version source
1             BH   1.69.0-1   CRAN
2     DiagrammeR      1.0.1   CRAN
3  DiagrammeRsvg        0.1   CRAN
4           MASS     7.3-50   CRAN
5         Matrix     1.2-14   CRAN
6             R6      2.4.0   CRAN
7   RColorBrewer      1.1-2   CRAN
8           Rcpp      1.0.3   CRAN
9           Rook      1.1-1   CRAN
10            V8        2.3   CRAN
11           XML      4.0-0   CRAN
12    assertthat      0.2.1   CRAN
13     backports      1.1.4   CRAN
14     base64enc      0.1-3   CRAN
15          brew      1.0-6   CRAN
16           cli      1.1.0   CRAN
17         clipr      0.6.0   CRAN
18     codetools     0.2-15   CRAN
19    colorspace      1.4-1   CRAN
20        crayon      1.3.4   CRAN
21          curl        3.3   CRAN
22        digest     0.6.20   CRAN
23    downloader        0.4   CRAN
24         dplyr      0.8.3   CRAN
25      ellipsis    0.2.0.1   CRAN
26      evaluate       0.14   CRAN
27         fansi      0.4.0   CRAN
28       foreach      1.4.7   CRAN
29       ggplot2      3.2.0   CRAN
30      ggridges      0.5.1   CRAN
31          glue      1.3.1   CRAN
32     gridExtra        2.3   CRAN
33        gtable      0.3.0   CRAN
34         highr        0.8   CRAN
35           hms      0.5.0   CRAN
36     htmltools      0.3.6   CRAN
37   htmlwidgets        1.3   CRAN
38        httpuv      1.5.1   CRAN
39        igraph    1.2.4.1   CRAN
40    influenceR      0.1.0   CRAN
41     iterators     1.0.12   CRAN
42      jsonlite        1.6   CRAN
43         knitr       1.23   CRAN
44      labeling        0.3   CRAN
45         later      0.8.0   CRAN
46       lattice    0.20-35   CRAN
47      lazyeval      0.2.2   CRAN
48      magrittr        1.5   CRAN
49      markdown        1.0   CRAN
50          mgcv     1.8-24   CRAN
51          mime        0.7   CRAN
52       munsell      0.5.0   CRAN
53          nlme    3.1-137   CRAN
54        pillar      1.4.2   CRAN
55     pkgconfig      2.0.2   CRAN
56         plogr      0.2.0   CRAN
57          plyr      1.8.4   CRAN
58        praise      1.0.0   CRAN
59      promises      1.0.1   CRAN
60         purrr      0.3.2   CRAN
61   rdfanalysis 0.0.0.9000 github
62         readr      1.3.1   CRAN
63      reshape2      1.4.3   CRAN
64         rgexf     0.15.3   CRAN
65         rlang      0.4.0   CRAN
66     rmarkdown       1.14   CRAN
67    rstudioapi       0.10   CRAN
68          rsvg        1.3   CRAN
69        scales      1.0.0   CRAN
70         shiny      1.3.2   CRAN
71   sourcetools      0.1.7   CRAN
72     stargazer      5.2.2   CRAN
73       stringi      1.4.3   CRAN
74       stringr      1.4.0   CRAN
75      testthat      2.1.1   CRAN
76        tibble      2.1.3   CRAN
77         tidyr      0.8.3   CRAN
78    tidyselect      0.2.5   CRAN
79       tinytex       0.14   CRAN
80          utf8      1.1.4   CRAN
81         vctrs      0.2.0   CRAN
82       viridis      0.5.1   CRAN
83   viridisLite      0.3.0   CRAN
84    visNetwork      2.0.9   CRAN
85         withr      2.1.2   CRAN
86          xfun        0.8   CRAN
87        xtable      1.8-4   CRAN
88          yaml      2.2.0   CRAN
89       zeallot      0.1.0   CRAN
Warning messages:
1: In FUN(X[[i]], ...) :
  Package 'XML 4.0-0' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores
2: In FUN(X[[i]], ...) :
  Package 'XML 4.0-0' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores
3: In FUN(X[[i]], ...) :
  Package 'XML 4.0-0' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores
4: In FUN(X[[i]], ...) :
  Package 'XML 4.0-0' was installed from sources; Packrat will assume this package is available from a CRAN-like repository during future restores
Read the advice at

My ui.R

library("shiny")
library("dplyr")


ui <- fluidPage(
  titlePanel("The Effect of Immigration on Social Policy Preferences - Model Specifications"),
  
  sidebarPanel(
    tags$style("#mspeciv {
                    font-size:10.5px;
           }"),
    checkboxGroupInput("mspeciv", 
                       label = h6("Immigration Measure"), 
                       choices = list("Stock" = "Stock", 
                                      "Flow" = "Flow"),
                       selected = c("Stock","Flow")),
    tags$style("#mspecdv {
                    font-size:10.5px;
           }"),
    checkboxGroupInput("mspecdv", 
                       label = h6("Policy Preferences Measure"), 
                       choices = list("Jobs" = "Jobs",
                                      "Income Diff" = "IncDiff",
                                      "Unemployment" = "Unemp",
                                      "Old Age" = "OldAge",
                                      "Housing" = "House",
                                      "Health" = "Health",
                                      "Scale" = "Scale"),
                       selected = c("Jobs", "IncDiff","Unemp","OldAge","House","Health","Scale")),
    tags$style("#mspecivx {
                    font-size:10.5px;
           }"),
    checkboxGroupInput("mspecivx",
                       label = h6("Control Variables"),
                       choices = list("Social Spending" = "socx_ivC",
                                      "Unemployment" = "unemprate_ivC",
                                      "Employment" = "emplrate_ivC",
                                      "GDP per Capita" = "gdp_ivC"),
                       selected = c("socx_ivC","unemprate_ivC","emplrate_ivC","gdp_ivC")), 
    width = 3),
  
  mainPanel(
    plotOutput("spec_curve")
  ))

My server.R

library("shiny")
library("ggplot2")
library("rdfanalysis")
library("dplyr")


load("dfcri.Rdata")

server <- function(input, output) {
  
  output$spec_curve <- renderPlot({
    
    filterdf <- reactive({
      dfcri %>% filter(df$dv_type %in% input$mspecdv & df$iv_type %in% input$mspeciv & df$indepv %in% input$mspecivx)
    })
    
    plot_rdf_spec_curve(filterdf(), "est", "lb", "ub", lower_to_upper = 1.5, est_label = "Marginal Effect")
  }, height = 550)
}

I am grateful for any help and hope I can give back too. Thanks!

-Nate

XML 4.0 is not available from CRAN:

https://cran.rstudio.com/web/packages/XML/index.html

Try uninstalling it and reinstalling it.

1 Like

Josh, thanks so much, that was it!

I uninstalled the XML package and reinstalled.

1 Like

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