Checking current status of shinyapps.io and deployment work with R Version 3.5.1

shinyappsio

#1

Does shinyapps.io deployment work with 3.5.1 currently?
Getting the Error: Unhandled Exception: Child Task 550712597 error:

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] shinyWidgets_0.4.3    rsconnect_0.8.8       ClimatePrimers_0.10.3 maps_3.3.0            ncdf4_1.16            ff_2.2-14             bit_1.1-14           
 [8] SDMTools_1.1-221      rts_1.0-45            RCurl_1.95-4.11       bitops_1.0-6          pander_0.6.2          rmarkdown_1.10        knitr_1.20           
[15] scales_0.5.0          gridExtra_2.3         ggthemes_4.0.0        reshape2_1.4.3        plyr_1.8.4            proj4_1.0-8           rgeos_0.3-28         
[22] rgdal_1.3-4           rasterVis_0.45        latticeExtra_0.6-28   RColorBrewer_1.1-2    lattice_0.20-35       raster_2.6-7          maptools_0.9-3       
[29] sp_1.3-1              ini_0.3.1             shinyRGL_0.1.0        markdown_0.8          rgl_0.99.16           gplots_3.0.1          plotly_4.8.0         
[36] ggplot2_3.0.0         DT_0.4                dygraphs_1.1.1.6      xts_0.11-0            zoo_1.8-3             leaflet_2.0.1         dplyr_0.7.6          
[43] shinythemes_1.1.1     shiny_1.1.0          

loaded via a namespace (and not attached):
 [1] devtools_1.13.6         webshot_0.5.0           httr_1.3.1              rprojroot_1.3-2         tools_3.5.1             backports_1.1.2         R6_2.2.2               
 [8] KernSmooth_2.23-15      lazyeval_0.2.1          colorspace_1.3-2        manipulateWidget_0.10.0 withr_2.1.2             tidyselect_0.2.4        curl_3.2               
[15] git2r_0.23.0            compiler_3.5.1          caTools_1.17.1.1        hexbin_1.27.2           stringr_1.3.1           digest_0.6.15           foreign_0.8-70         
[22] R.utils_2.6.0           pkgconfig_2.0.1         htmltools_0.3.6         htmlwidgets_1.2         rlang_0.2.1             rstudioapi_0.7          bindr_0.1.1            
[29] jsonlite_1.5            crosstalk_1.0.0         gtools_3.8.1            R.oo_1.22.0             magrittr_1.5            Rcpp_0.12.18            munsell_0.5.0          
[36] viridis_0.5.1           R.methodsS3_1.7.1       stringi_1.1.7           yaml_2.2.0              RJSONIO_1.3-0           grid_3.5.1              parallel_3.5.1         
[43] gdata_2.18.0            promises_1.0.1          crayon_1.3.4            miniUI_0.1.1.1          pillar_1.3.0            glue_1.3.0              evaluate_0.11          
[50] data.table_1.11.4       httpuv_1.4.5            gtable_0.2.0            purrr_0.2.5             tidyr_0.8.1             assertthat_0.2.0        mime_0.5               
[57] xtable_1.8-2            later_0.7.3             viridisLite_0.3.0       tibble_1.4.2            memoise_1.1.0           bindrcpp_0.2.2

Preparing to deploy application...DONE
Uploading bundle for application: 453460...DONE
Deploying bundle: 1591922 for application: 453460 ...
Waiting for task: 550717388
  building: Processing bundle: 1591922
  building: Parsing manifest
  building: Installing files
  building: Pushing image: 1619129
  deploying: Starting instances
################################ Begin Task Log ################################ 
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
[2018-09-18T16:01:54.093893110+0000] Creating dir /srv/connect/apps/Global_n2o
[2018-09-18T16:01:54.097285942+0000] Creating dir /srv/connect/apps/Global_n2o/GRACEnet_May21_2018
[2018-09-18T16:01:54.100359880+0000] Creating dir /srv/connect/apps/Global_n2o/GRACEnet_May21_2018/JPG
[2018-09-18T16:01:54.103428243+0000] Copying file GRACEnet_May21_2018/JPG/INWLREAP.jpg
[2018-09-18T16:01:54.107003744+0000] Copying file GRACEnet_May21_2018/JPG/wyphace_desc.jpg
[2018-09-18T16:01:54.110399486+0000] Creating dir /srv/connect/apps/Global_n2o/GRACEnet_May21_2018/csv
[2018-09-18T16:01:54.113477336+0000] Copying file GRACEnet_May21_2018/csv/MeasGrazingPlants.csv
[2018-09-18T16:01:54.117049171+0000] Creating dir /srv/connect/apps/Global_n2o/GIS
[2018-09-18T16:01:54.120020146+0000] Copying file GIS/ipcc_zonesupd_2017.sbx
################################# End Task Log ################################# 
Error: Unhandled Exception: Child Task 550717565 error: Unhandled Exception: Timeout waiting for '_check_container_alive' after 0:00:30
Execution halted

Thanks!


Update on R 3.5.0 on shinyapps.io
#2

Yes, R 3.5.1 is supported on shinyapps.io

From what I can see, your application is failing to start and exits before anything is logged.

What is the structure of your application? That is, do you have an app.R, a ui.R and server.R, is it a Shiny RMarkdown based application, etc.?


#3

I have it formatted as shiny_globalwork_app.R with the UI.R and server.R in there. There is a www and rsconnect folder stored within the directory as well. As well as a number of csv or other data files that are loaded in my _app.R in the directory. Do they need to be split apart?


#4

Try renaming shiny_globalwork_app.R to app.R.


#5

Perfect, that worked! Now running into issues with library packages though. Do I need to upload the R packages as well, or how can I change my code to better access/recognize the packages?

rm( list=ls( ) )
list.of.packages <- c("shiny", "shinythemes",  "shinyBS",  "dplyr", "leaflet", "xts","dygraphs","DT", "lubridate", "plotly", "gplots", "markdown", "shinyBS", "maps", "ggmap", "proto", "rjson",
                      "ini", "sp", "maptools", "raster", "rasterVis", "rgdal", "rgeos", "proj4", "RColorBrewer",  "reshape2", "ggplot2", "RgoogleMaps", "geosphere", "jpeg", "mapproj",
                      "ggthemes", "gridExtra", "scales", "knitr", "rmarkdown", "pander", "zoo", "rts", "SDMTools", "ff", # "devtools", # "ggplotly",
                      "ncdf4", "glue", "dplyr" )
# I turned these two lines off as it was creating it's own error. Runs with those commented out but now running into another issue (seen in image). 
# new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
# if(length(new.packages)) install.packages(new.packages)
lapply(list.of.packages, require, character.only = TRUE)


And then getting an issue with colorFactor from the leaflet package which is the part actually making it fail.


#6

You need to declare the libraries without the fanciness so that the rsconnect package can discover them and record them in the manifest that is uploaded to shinyapps.io


#7

Perfect, changing to the standard library('packagename') for all the packages worked. Is there a better or move convenient way to do this, or could something like my lapply function be added in the future? I have 45 lines of code just loading libraries now.

Thanks for all the support!


#8

You could request an enhancement in the rsconnect repo, or open a pull request if you are really motivated.