0
votes

I am getting an error when trying to deploy a Shiny app. I had previously been able to deploy the same app successfully. I believe it has to do with the packages I am loading but I am having a hard time troubleshooting which ones. I think it has to do with a couple of the packages and I think I've identified that colorspace is cause an issue. When I remove colorspace I am getting the same error so I think it may be multiple packages.

Here is the code I am using:

#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
#    http://shiny.rstudio.com/
#

library(readxl) #good
library(ggplot2) #good
library(dplyr) #good
library(stringr) #good
library(tidyr) #good
library(magrittr) #good
library(lubridate) #good
library(openxlsx) #good
library(scales) # good
library(colorspace) # bad
library(shiny) # good
library(curl) # good
library(openxlsx) # good
library(ggthemes) # unsure
library(leaflet) # unsure
library(shinythemes) # unsure
library(showtext) # unsure

# Define UI for application that draws a histogram
ui <- fluidPage(

    # Application title
    titlePanel("Old Faithful Geyser Data"),

    # Sidebar with a slider input for number of bins 
    sidebarLayout(
        sidebarPanel(
            sliderInput("bins",
                        "Number of bins:",
                        min = 1,
                        max = 50,
                        value = 30)
        ),

        # Show a plot of the generated distribution
        mainPanel(
           plotOutput("distPlot")
        )
    )
)

# Define server logic required to draw a histogram
server <- function(input, output) {

    output$distPlot <- renderPlot({
        # generate bins based on input$bins from ui.R
        x    <- faithful[, 2]
        bins <- seq(min(x), max(x), length.out = input$bins + 1)

        # draw the histogram with the specified number of bins
        hist(x, breaks = bins, col = 'darkgray', border = 'white')
    })
}

# Run the application 
shinyApp(ui = ui, server = server)

deployApp.R

library(rsconnect)
deployApp(appName = "test2")

And here is the long error:

deployApp(appName = "test2") Preparing to deploy application...DONE Uploading bundle for application: 1002337...DONE Deploying bundle: 2183704 for application: 1002337 ... Waiting for task: 625897405 building: Parsing manifest building: Building image: 2303409 building: Installing system dependencies building: Fetching packages building: Installing packages building: Installing files building: Pushing image: 2303409

########################## Begin Task Log ################################

[2019-06-27T19:32:38.644208763+0000] Execute script: packages/build/sys.sh + set -e + apt-get update -qq + apt-get install -y libapparmor-dev Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: libapparmor1 The following NEW packages will be installed: libapparmor-dev The following packages will be upgraded: libapparmor1 1 upgraded, 1 newly installed, 0 to remove and 99 not upgraded. Need to get 97.3 kB of archives. After this operation, 230 kB of additional disk space will be used. Get:1 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapparmor1 amd64 2.10.95-0ubuntu2.11 [29.5 kB] Get:2 http://us-east-1.ec2.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libapparmor-dev amd64 2.10.95-0ubuntu2.11 [67.8 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 97.3 kB in 0s (7814 kB/s) (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 119344 files and directories currently installed.) Preparing to unpack .../libapparmor1_2.10.95-0ubuntu2.11_amd64.deb ... Unpacking libapparmor1:amd64 (2.10.95-0ubuntu2.11) over (2.10.95-0ubuntu2.10) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... Setting up libapparmor1:amd64 (2.10.95-0ubuntu2.11) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... Selecting previously unselected package libapparmor-dev:amd64. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 119344 files and directories currently installed.) Preparing to unpack .../libapparmor-dev_2.10.95-0ubuntu2.11_amd64.deb ... Unpacking libapparmor-dev:amd64 (2.10.95-0ubuntu2.11) ... Processing triggers for man-db (2.7.5-1) ... Setting up libapparmor-dev:amd64 (2.10.95-0ubuntu2.11) ... [2019-06-27T19:32:46.867741305+0000] Installing R package: withr (2.1.2) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘withr’ ... * DONE (withr) [2019-06-27T19:32:47.177306610+0000] Installing R package: viridisLite (0.3.0) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘viridisLite’ ... * DONE (viridisLite) [2019-06-27T19:32:47.420665470+0000] Installing R package: crayon (1.3.4) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘crayon’ ... * DONE (crayon) [2019-06-27T19:32:47.701859695+0000] Installing R package: zeallot (0.1.0) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘zeallot’ ... * DONE (zeallot) [2019-06-27T19:32:47.936696726+0000] Installing R package: xtable (1.8-4) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘xtable’ ... * DONE (xtable) [2019-06-27T19:32:48.197319585+0000] Installing R package: magrittr (1.5) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘magrittr’ ... * DONE (magrittr) [2019-06-27T19:32:48.432917932+0000] Installing R package: labeling (0.3) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘labeling’ ... * DONE (labeling) [2019-06-27T19:32:48.644273152+0000] Installing R package: rlang (0.4.0) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘rlang’ ... * DONE (rlang) [2019-06-27T19:32:48.944480920+0000] Installing R package: stringi (1.4.3) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘stringi’ ... * DONE (stringi) [2019-06-27T19:32:49.394737083+0000] Installing R package: rematch (1.0.1) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘rematch’ ... * DONE (rematch) [2019-06-27T19:32:49.608705910+0000] Installing R package: purrr (0.3.2) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘purrr’ ... * DONE (purrr) [2019-06-27T19:32:49.884405044+0000] Installing R package: plogr (0.2.0) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘plogr’ ... * DONE (plogr) [2019-06-27T19:32:50.151117758+0000] Installing R package: mime (0.7) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘mime’ ... * DONE (mime) [2019-06-27T19:32:50.380404050+0000] Installing R package: sys (3.2) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘sys’ ... * DONE (sys) [2019-06-27T19:32:50.623448406+0000] Installing R package: fansi (0.4.0) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘fansi’ ... * DONE (fansi) [2019-06-27T19:32:50.880863199+0000] Installing R package: packrat (0.5.0) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘packrat’ ... * DONE (packrat) [2019-06-27T19:32:51.153169848+0000] Installing R package: utf8 (1.1.4) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘utf8’ ... * DONE (utf8) [2019-06-27T19:32:51.417330005+0000] Installing R package: sourcetools (0.1.7) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘sourcetools’ ... * DONE (sourcetools) [2019-06-27T19:32:51.706764719+0000] Installing R package: gtable (0.3.0) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘gtable’ ... * DONE (gtable) [2019-06-27T19:32:52.003780539+0000] Installing R package: R6 (2.4.0) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘R6’ ... * DONE (R6) [2019-06-27T19:32:52.226633826+0000] Installing R package: RColorBrewer (1.1-2) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘RColorBrewer’ ... * DONE (RColorBrewer) [2019-06-27T19:32:52.446557961+0000] Installing R package: lattice (0.20-38) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘lattice’ ... * DONE (lattice) [2019-06-27T19:32:52.764007778+0000] Installing R package: nlme (3.1-139) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘nlme’ ... * DONE (nlme) [2019-06-27T19:32:53.283749888+0000] Installing R package: MASS (7.3-51.1) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘MASS’ ... * DONE (MASS) [2019-06-27T19:32:53.616860274+0000] Installing R package: yaml (2.2.0) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘yaml’ ... * DONE (yaml) [2019-06-27T19:32:53.922424843+0000] Installing R package: backports (1.1.4) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘backports’ ... * DONE (backports) [2019-06-27T19:32:54.307518695+0000] Installing R package: pkgconfig (2.0.2) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * installing binary package ‘pkgconfig’ ... * DONE (pkgconfig) [2019-06-27T19:32:54.563268370+0000] Installing R package: hms (0.4.2) * installing to library ‘/opt/R/3.6.0/lib/R/library’ * insta################################# End Task Log ################################# Error: Unhandled Exception: Child Task 625897406 error: Unhandled Exception: HTTP 599: Timeout during request

1

1 Answers

0
votes

I found the fix. I am using SASS and bootstrap to modify my apps CSS. In order to deploy the app you need to move all the r files and your final .css file to a new folder.

Otherwise, when you go to deploy your app, it fails on the "installing files" section. I guess the deploy cannot recognize the .json and .sass files etc.