Coorsaa/shinyMlr

Error when starting the app

Closed this issue · 8 comments

@jakob-r I get an error when trying to start the app in master branch after installing it from github:

> devtools::install_github("mlr-org/shinyMlr/package")
...
> shinyMlr::runShinyMlr()
Loading required package: shiny

Listening on http://127.0.0.1:3806
Warning: Error in ..stacktraceon..: object '..' not found
Stack trace (innermost first):
    2: runApp
    1: shinyMlr::runShinyMlr
Error : object '..' not found

I think we need a bit more of information here. It seem's to work on my system and on travis. You have the latest mlr and shiny versions? Can you post your sessionInfo()?

latest shiny, mlr, shinydashboard.

> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

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

other attached packages:
[1] shiny_1.0.3  shinyMlr_1.0

loaded via a namespace (and not attached):
[1] R6_2.2.0          htmltools_0.3.5   tools_3.3.3       Rcpp_0.12.8       shinythemes_1.1.1 digest_0.6.12     xtable_1.8-2      httpuv_1.3.3      mime_0.5   

and the traceback

> traceback()
6: Sys.sleep(0.001)
5: withCallingHandlers(expr, error = function(e) {
       if (is.null(attr(e, "stack.trace", exact = TRUE))) {
           calls <- sys.calls()
           attr(e, "stack.trace") <- calls
           stop(e)
       }
   })
4: captureStackTraces({
       scheduleFlush()
       while (!.globals$stopped) {
           serviceApp()
           Sys.sleep(0.001)
       }
   })
3: ..stacktraceoff..(captureStackTraces({
       scheduleFlush()
       while (!.globals$stopped) {
           serviceApp()
           Sys.sleep(0.001)
       }
   }))
2: runApp(appDir = system.file("application", package = "shinyMlr"), 
       ...)
1: runShinyMlr()

Hmm. Weird error. Can you check if this line works:

shiny::runApp(appDir = [path to some shiny app])

Basically that's the only thing runShinyMlr does. I fear that it is a plattform specific problem.

when I'm in my local shinyMlr folder and call runApp() it starts correctly. However, I still got this error when I try do do it with runShinyMlr()

Really seems platform specific. On my Mac everything works fine.

I have found a way to fix this issue on Windows. I know nothing about package building, so forgive me if I say something stupid. But when I look in the location of the shinyMlr package on my computer:

C:\Program Files\R\R-3.4.4\library\shinyMlr\application

All that is in there is what is in your:

https://github.com/mlr-org/shinyMlr/tree/master/package/inst/application

So, all server.R has in it is ../../../server.R. I don't know if this means it is pointing to other things should have been installed in other locations, and they haven't. But one hack that works is to:

  1. Install the shinyMlr package in R. (I had a bit of a nightmare with this and had to manually install dependencies, as well as make sure I had both 32 bit and 64 bit Java's installed or RWeka -- because of rJava -- won't work).
  2. Clone the shinyMlr GitHub repository.
  3. Delete everything in C:\Program Files\R\R-3.4.4\library\shinyMlr\application (or whatever version of R you have).
  4. Copy everything from the shinyMlr repository (in my case C:\Data\GitHub\shinyMlr) into the location of point 3. That's the versions of server.R, ui.R that actually contain code -- as well as all folders such as helper, data, etc. Probably not all of these are needed, but some definitely are and it works with all!

Obviously that's a bit of a hack solution -- but it works -- and I hope that helps users get up and running (current method in readme won't work offline), and you guys pinpoint the problem/solution.

[One other small issue, the .pdf or .html file extensions aren't automatically appended to report filenames -- currently I have to do it manually.]

Hi all,

same error as @Coorsaa while trying to run shinyMlr inside this docker container.

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.19.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C              LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] mlr_2.12.1           ParamHelpers_1.10    BlandAltmanLeh_0.3.1 chron_2.3-52         plotly_4.7.1        
 [6] htmlwidgets_1.2      leaflet_2.0.0        raster_2.6-7         mapview_2.4.0        scales_0.5.0        
[11] RPostgreSQL_0.6-2    DBI_0.8              broom_0.4.4          maps_3.3.0           knitr_1.20          
[16] rmarkdown_1.9        maptools_0.9-2       sp_1.2-7             lazyeval_0.2.1       nortest_1.0-4       
[21] reshape2_1.4.3       jsonlite_1.5         forcats_0.3.0        stringr_1.3.1        dplyr_0.7.4         
[26] purrr_0.2.4          readr_1.1.1          tidyr_0.8.0          tibble_1.4.2         ggplot2_2.2.1       
[31] tidyverse_1.2.1      anytime_0.3.0        lubridate_1.7.4      sf_0.6-3             pacman_0.4.6        
[36] here_0.1             shiny_1.1.0         

loaded via a namespace (and not attached):
 [1] colorspace_1.3-2    class_7.3-14        gdalUtils_2.0.1.14  rgdal_1.2-20        rprojroot_1.3-2    
 [6] satellite_1.0.1     base64enc_0.1-3     rstudioapi_0.7      RApiDatetime_0.0.3  xml2_1.2.0         
[11] splines_3.4.4       codetools_0.2-15    R.methodsS3_1.7.1   mnormt_1.5-5        shinythemes_1.1.1  
[16] shinyMlr_1.0        png_0.1-7           R.oo_1.22.0         compiler_3.4.4      httr_1.3.1         
[21] backports_1.1.2     Matrix_1.2-14       assertthat_0.2.0    cli_1.0.0           later_0.7.2        
[26] htmltools_0.3.6     tools_3.4.4         bindrcpp_0.2.2      gtable_0.2.0        glue_1.2.0         
[31] Rcpp_0.12.16        parallelMap_1.3     cellranger_1.1.0    nlme_3.1-137        udunits2_0.13      
[36] iterators_1.0.9     crosstalk_1.0.0     psych_1.8.3.3       rvest_0.3.2         mime_0.5           
[41] devtools_1.13.5     hms_0.4.2           promises_1.0.1      parallel_3.4.4      BBmisc_1.11        
[46] yaml_2.1.19         curl_3.2            memoise_1.1.0       stringi_1.2.2       foreach_1.4.4      
[51] spDataLarge_0.2.6.5 e1071_1.6-8         checkmate_1.8.5     spData_0.2.8.3      rlang_0.2.0        
[56] pkgconfig_2.0.1     evaluate_0.10.1     lattice_0.20-35     bindr_0.1.1         plyr_1.8.4         
[61] magrittr_1.5        R6_2.2.2            pillar_1.2.1        haven_1.1.1         foreign_0.8-69     
[66] withr_2.1.2         units_0.5-1         survival_2.41-3     modelr_0.1.1        crayon_1.3.4       
[71] grid_3.4.4          readxl_1.0.0        data.table_1.11.4   git2r_0.21.0        digest_0.6.15      
[76] classInt_0.2-3      webshot_0.5.0       xtable_1.8-2        httpuv_1.4.3        R.utils_2.6.0      
[81] stats4_3.4.4        munsell_0.4.3       viridisLite_0.3.0  
> traceback()
13: .Call("_later_execCallbacks", PACKAGE = "later", timeoutSecs)
12: execCallbacks(timeoutSecs)
11: run_now(timeoutMs/1000)
10: service(timeout)
9: serviceApp()
8: ..stacktracefloor..(serviceApp())
7: withCallingHandlers(expr, error = doCaptureStack)
6: globals$domain$wrapSync(expr)
5: promises::with_promise_domain(createStackTracePromiseDomain(), 
       expr)
4: captureStackTraces({
       while (!.globals$stopped) {
           ..stacktracefloor..(serviceApp())
           Sys.sleep(0.001)
       }
   })
3: ..stacktraceoff..(captureStackTraces({
       while (!.globals$stopped) {
           ..stacktracefloor..(serviceApp())
           Sys.sleep(0.001)
       }
   }))
2: runApp(appDir = system.file("application", package = "shinyMlr"), 
       ...)
1: shinyMlr::runShinyMlr()

When I try the solution proposed by @jakob-r shiny::runApp(appDir = [path to some shiny app]) with another shiny app everything works fine.

Hope we could find a way to fix this ;)

this should be fixed now