shinyapps.io application runtime error

Originally developed (and works) on Windows 10, using RStudio 1.2, Microsoft R Open 3.5.3 (and using Microsoft R MRAN snapshot 2019-04-15, except for various packages derived from github, and linstalled using devtools::install_github).

(a 'demonstration' version of this app is at http://vkelim.3322.org and http://vkelim.dsmynas.com but both installations are not very reliable as they are not running on proper servers).

'Crashes' after the web-browser window opens, with the log as shown below.

I can download the 'bundle' from shinyapps.io, install the bundle onto a Ubuntu 18.04.3 LTS, download packages according to the 'packrat' instructions (installing bundles using 'packrat', RStudio document ), and then successfully launch the app using runApp().

One thing that seems strange is that installation using rsconnect (from the Windows machine), doesn't take very long. But installing via the 'bundle' downloaded from shinyapps.io, onto the same Windows i7 machine takes about fifteen minutes. It takes even longer on my Ubuntu machine (a 2-core i5), because absolutely all the packages need to be re-compiled from source. Is shinyapps.io actually installing all the packages that I require?

David

shinyapps.io log:

2020-03-14T13:44:40.900457+00:00 shinyapps[1948296]: 
2020-03-14T13:44:40.900460+00:00 shinyapps[1948296]: Listening on http://127.0.0.1:43544
2020-03-14T13:44:46.385970+00:00 shinyapps[1948296]: $demonstration
2020-03-14T13:44:46.385972+00:00 shinyapps[1948296]: [1] FALSE
2020-03-14T13:44:46.397120+00:00 shinyapps[1948296]: [1] "Session Count: 1"
2020-03-14T13:44:46.385972+00:00 shinyapps[1948296]: 
2020-03-14T13:44:46.766152+00:00 shinyapps[1948296]: Warning: Error in module: Must provide a data frame with at least one column.
2020-03-14T13:44:46.769964+00:00 shinyapps[1948296]:   72: stop
2020-03-14T13:44:46.769965+00:00 shinyapps[1948296]:   71: module
2020-03-14T13:44:46.769965+00:00 shinyapps[1948296]:   66: callModule
2020-03-14T13:44:46.769965+00:00 shinyapps[1948296]:   65: module
2020-03-14T13:44:46.769966+00:00 shinyapps[1948296]:   60: callModule
2020-03-14T13:44:46.769966+00:00 shinyapps[1948296]:   59: server
2020-03-14T13:44:46.770160+00:00 shinyapps[1948296]: Error in module(childScope$input, childScope$output, childScope, ...) : 
2020-03-14T13:44:46.789415+00:00 shinyapps[1948296]: Warning: Error in observeEventExpr: attempt to apply non-function
2020-03-14T13:44:46.770161+00:00 shinyapps[1948296]:   Must provide a data frame with at least one column.
2020-03-14T13:44:46.791558+00:00 shinyapps[1948296]:   70: observeEventExpr
2020-03-14T13:44:46.791559+00:00 shinyapps[1948296]:   13: runApp
2020-03-14T13:44:46.791559+00:00 shinyapps[1948296]:   12: fn
2020-03-14T13:44:46.791560+00:00 shinyapps[1948296]:    7: connect$retry
2020-03-14T13:44:46.791560+00:00 shinyapps[1948296]:    6: eval
2020-03-14T13:44:46.791561+00:00 shinyapps[1948296]:    5: eval
2020-03-14T13:44:46.805421+00:00 shinyapps[1948296]: Warning: Error in observeEventExpr: attempt to apply non-function
2020-03-14T13:44:46.807723+00:00 shinyapps[1948296]:   70: observeEventExpr
2020-03-14T13:44:46.807723+00:00 shinyapps[1948296]:   13: runApp
2020-03-14T13:44:46.807724+00:00 shinyapps[1948296]:   12: fn
2020-03-14T13:44:46.807724+00:00 shinyapps[1948296]:    7: connect$retry
2020-03-14T13:44:46.807724+00:00 shinyapps[1948296]:    5: eval
2020-03-14T13:44:46.807724+00:00 shinyapps[1948296]:    6: eval
2020-03-14T13:44:46.987168+00:00 shinyapps[1948296]:   70: observeEventExpr
2020-03-14T13:44:46.808679+00:00 shinyapps[1948296]: Warning: Error in observeEventExpr: attempt to apply non-function
2020-03-14T13:44:46.810906+00:00 shinyapps[1948296]:   70: observeEventExpr
2020-03-14T13:44:46.810907+00:00 shinyapps[1948296]:   13: runApp
2020-03-14T13:44:46.810908+00:00 shinyapps[1948296]:    5: eval
2020-03-14T13:44:46.984807+00:00 shinyapps[1948296]: Warning: Error in observeEventExpr: attempt to apply non-function
2020-03-14T13:44:46.810907+00:00 shinyapps[1948296]:   12: fn
2020-03-14T13:44:46.987171+00:00 shinyapps[1948296]:    5: eval
2020-03-14T13:44:46.810908+00:00 shinyapps[1948296]:    7: connect$retry
2020-03-14T13:44:46.988156+00:00 shinyapps[1948296]: Warning: Error in observeEventExpr: attempt to apply non-function
2020-03-14T13:44:46.810908+00:00 shinyapps[1948296]:    6: eval
2020-03-14T13:44:46.990426+00:00 shinyapps[1948296]:    7: connect$retry
2020-03-14T13:44:46.987169+00:00 shinyapps[1948296]:   13: runApp
2020-03-14T13:44:46.987170+00:00 shinyapps[1948296]:   12: fn
2020-03-14T13:44:46.987170+00:00 shinyapps[1948296]:    7: connect$retry
2020-03-14T13:44:46.987170+00:00 shinyapps[1948296]:    6: eval
2020-03-14T13:44:46.990426+00:00 shinyapps[1948296]:    6: eval
2020-03-14T13:44:46.990425+00:00 shinyapps[1948296]:   13: runApp
2020-03-14T13:44:46.990426+00:00 shinyapps[1948296]:   12: fn
2020-03-14T13:44:46.990425+00:00 shinyapps[1948296]:   70: observeEventExpr
2020-03-14T13:44:46.990427+00:00 shinyapps[1948296]:    5: eval
2020-03-14T13:44:46.995417+00:00 shinyapps[1948296]: [1] "Session Count: 0"
  • Cite output of "rsconnect::appDependencies()"
1                  BH   1.69.0-1   CRAN
2                 DBI      1.0.0   CRAN
3                  DT     0.12.3 github
4              DTedit      1.0.0 github
5        DailyMeasure      1.5.3 github
6                MASS   7.3-51.1   CRAN
7              Matrix     1.2-15   CRAN
8                  R6      2.4.0   CRAN
9        RColorBrewer      1.1-2   CRAN
10            RSQLite      2.1.1   CRAN
11               Rcpp      1.0.1   CRAN
12           RcppTOML      0.1.5   CRAN
13          airtabler      0.1.6 github
14            askpass        1.1   CRAN
15         assertthat      0.2.1   CRAN
16          base64enc      0.1-3   CRAN
17                bit     1.1-14   CRAN
18              bit64      0.9-7   CRAN
19               blob      1.1.1   CRAN
20                cli      1.1.0   CRAN
21         colorspace      1.4-1   CRAN
22            configr      0.3.4   CRAN
23             crayon      1.3.4   CRAN
24          crosstalk      1.0.0   CRAN
25               curl        3.3   CRAN
26           dMeasure      0.9.4 github
27       dbConnection      0.3.0 github
28             dbplyr 1.4.2.9000 github
29             digest     0.6.18   CRAN
30              dplyr    0.8.0.1   CRAN
31           evaluate       0.13   CRAN
32              fansi      0.4.0   CRAN
33                 fs      1.2.7   CRAN
34            ggplot2      3.1.1   CRAN
35               glue      1.3.1   CRAN
36             gtable      0.3.0   CRAN
37              highr        0.8   CRAN
38                hms      0.4.2   CRAN
39          htmltools      0.3.6   CRAN
40        htmlwidgets        1.3   CRAN
41             httpuv      1.5.1   CRAN
42               httr      1.4.0   CRAN
43                ini      0.3.1   CRAN
44           jsonlite        1.6   CRAN
45              knitr       1.22   CRAN
46           labeling        0.3   CRAN
47              later      0.8.0   CRAN
48            lattice    0.20-38   CRAN
49           lazyeval      0.2.2   CRAN
50           magrittr        1.5   CRAN
51           markdown        0.9   CRAN
52            memoise      1.1.0   CRAN
53               mgcv     1.8-27   CRAN
54               mime        0.6   CRAN
55            munsell      0.5.0   CRAN
56               nlme    3.1-137   CRAN
57               odbc      1.1.6   CRAN
58            openssl        1.3   CRAN
59             pillar      1.3.1   CRAN
60              pipeR    0.6.1.3   CRAN
61          pkgconfig      2.0.2   CRAN
62              plogr      0.2.0   CRAN
63               plyr      1.8.4   CRAN
64               pool    0.1.4.2   CRAN
65        prettyunits      1.0.2   CRAN
66             printr        0.1   CRAN
67           promises      1.0.1   CRAN
68              purrr 0.3.3.9000 github
69           reshape2      1.4.3   CRAN
70           rintrojs      0.2.2 github
71              rlang      0.3.4   CRAN
72          rmarkdown       1.12   CRAN
73             scales      1.0.0   CRAN
74              shiny      1.3.1   CRAN
75         shinyFiles      0.7.2   CRAN
76       shinyWidgets      0.5.1 github
77    shinycssloaders      0.2.1 github
78     shinydashboard      0.7.1   CRAN
79 shinydashboardPlus      0.7.5 github
80            shinyjs        1.0   CRAN
81        shinytoastr      2.1.1   CRAN
82             sodium        1.1   CRAN
83        sourcetools      0.1.7   CRAN
84            stringi      1.4.3   CRAN
85            stringr      1.4.0   CRAN
86                sys        3.1   CRAN
87             tibble      2.1.1   CRAN
88              tidyr      0.8.3   CRAN
89         tidyselect      0.2.5   CRAN
90            tinytex       0.12   CRAN
91               utf8      1.1.4   CRAN
92        viridisLite      0.3.0   CRAN
93              withr      2.1.2   CRAN
94               xfun        0.6   CRAN
95             xtable      1.8-3   CRAN
96               yaml      2.2.0   CRAN

There probably was a problem with using MRAN (rather than CRAN), so I did an install on a Ubuntu virtual machine, using R version 3.6.3, and 'pure' CRAN packages plus selected packages from specified github respositories (installed with devtools::install_github). This Ubuntu installation mostly worked, although there was some non-functioning logic in limited UI components.

Sadly, the shinyapps.io install (from a local Ubuntu install) crashes soon after start :frowning:

2020-03-15T06:42:53.633269+00:00 shinyapps[1950426]: Welcome to GPStat!, part of the Daily Measure software suite.
2020-03-15T06:42:53.693778+00:00 shinyapps[1950426]: 
2020-03-15T06:42:53.693780+00:00 shinyapps[1950426]: Listening on http://127.0.0.1:38447
2020-03-15T06:42:57.795424+00:00 shinyapps[1950426]: $demonstration
2020-03-15T06:42:57.795425+00:00 shinyapps[1950426]: [1] FALSE
2020-03-15T06:42:57.812959+00:00 shinyapps[1950426]: [1] "Session Count: 1"
2020-03-15T06:42:57.795436+00:00 shinyapps[1950426]: 
2020-03-15T06:42:57.883020+00:00 shinyapps[1950426]: Warning: Error in myreactive: could not find function "myreactive"
2020-03-15T06:42:57.887443+00:00 shinyapps[1950426]:   63: private$set_reactive
2020-03-15T06:42:57.887695+00:00 shinyapps[1950426]: Error in myreactive(value) : could not find function "myreactive"
2020-03-15T06:42:57.887443+00:00 shinyapps[1950426]:   62: <Anonymous>
2020-03-15T06:42:57.890573+00:00 shinyapps[1950426]: [1] "Session Count: 0"

...despite what I thought was fairly strong testing to make sure the value was a reactive!

the private$set_reactive method is an R6 method, created with a custom function.
For some reason, trying to 'print' within this method did not result in output to the shinyapps.io log, although it does result in an output to the Console when within the local (Windows or Ubuntu) install of Rstudio.

.private(dMeasure, "set_reactive", function(myreactive, value) {
  # reactive (if shiny/reactive environment is available) is set to 'value'
  # myreactive is passed by reference
  # print(myreactive)
  # print(deparse(sys.call(-1)))
  if (requireNamespace("shiny", quietly = TRUE) && shiny::is.reactive(myreactive)) {
    myreactive(value)
  }
})

This is all rather baffling!

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