rstudio / shinydashboard

Shiny Dashboarding framework
https://rstudio.github.io/shinydashboard/
Other
892 stars 300 forks source link

Shiny App randomly crashes #244

Closed richpauloo closed 6 years ago

richpauloo commented 6 years ago

I get a similar error to this issue.

The app will work, but randomly it will crash and always give the same error:

Listening on http://127.0.0.1:4100
Warning: Error in sample.int: invalid first argument
Stack trace (innermost first):
    75: sample.int
    74: sample_n_basic
    73: sample_n.data.frame
    72: sample_n
    71: eval
    70: eval
    69: %>%
    68: observeEventHandler [#38]
     4: <Anonymous>
     3: do.call
     2: print.shiny.appobj
     1: <Promise>
ERROR: [on_request_read] connection reset by peer

After reading the linked issue, I updated my version of shiny, but the error persists. Here's a printout of my session info. If you have any idea what may be causing this, please let me know!

> devtools::session_info()
Session info ----------------------------------------------------------------------------
 setting  value                       
 version  R version 3.4.0 (2017-04-21)
 system   x86_64, darwin15.6.0        
 ui       RStudio (1.0.143)           
 language (EN)                        
 collate  en_US.UTF-8                 
 tz       America/Los_Angeles         
 date     2017-09-11                  

Packages --------------------------------------------------------------------------------
 package    * version date       source                              
 assertthat   0.2.0   2017-04-11 CRAN (R 3.4.0)                      
 base       * 3.4.0   2017-04-21 local                               
 bindr        0.1     2016-11-13 CRAN (R 3.4.0)                      
 bindrcpp   * 0.2     2017-06-17 CRAN (R 3.4.0)                      
 compiler     3.4.0   2017-04-21 local                               
 data.table * 1.10.4  2017-02-01 CRAN (R 3.4.0)                      
 datasets   * 3.4.0   2017-04-21 local                               
 devtools     1.13.3  2017-08-02 CRAN (R 3.4.1)                      
 digest       0.6.12  2017-01-27 CRAN (R 3.4.0)                      
 dplyr      * 0.7.2   2017-07-20 CRAN (R 3.4.0)                      
 glue         1.1.1   2017-06-21 CRAN (R 3.4.1)                      
 graphics   * 3.4.0   2017-04-21 local                               
 grDevices  * 3.4.0   2017-04-21 local                               
 htmltools    0.3.6   2017-04-28 CRAN (R 3.4.0)                      
 httpuv       1.3.5   2017-07-04 CRAN (R 3.4.1)                      
 jsonlite     1.5     2017-06-01 CRAN (R 3.4.0)                      
 magrittr     1.5     2014-11-22 CRAN (R 3.4.0)                      
 memoise      1.1.0   2017-04-21 CRAN (R 3.4.0)                      
 methods    * 3.4.0   2017-04-21 local                               
 mime         0.5     2016-07-07 CRAN (R 3.4.0)                      
 pkgconfig    2.0.1   2017-03-21 CRAN (R 3.4.0)                      
 R6           2.2.2   2017-06-17 CRAN (R 3.4.0)                      
 Rcpp         0.12.12 2017-07-15 cran (@0.12.12)                     
 rlang        0.1.2   2017-08-09 CRAN (R 3.4.1)                      
 rsconnect    0.8     2017-05-08 CRAN (R 3.4.0)                      
 shiny      * 1.0.5   2017-08-23 CRAN (R 3.4.1)                      
 shinyswipr * 0.1.0   2017-09-02 Github (nstrayer/shinyswipr@4584b11)
 stats      * 3.4.0   2017-04-21 local                               
 tibble       1.3.4   2017-08-22 cran (@1.3.4)                       
 tools        3.4.0   2017-04-21 local                               
 utils      * 3.4.0   2017-04-21 local                               
 withr        2.0.0   2017-07-28 CRAN (R 3.4.1)                      
 xtable       1.8-2   2016-02-05 CRAN (R 3.4.0) 
bborgesr commented 6 years ago

Without posting a reproducible example, there's not much I can do to help you... It seems like you're (either directly or indirectly) passing an argument to sample() that isn't valid. So, unlike the issue you linked to, your error is more likely coming from your own code, than from Shiny or shinydashboard. Do you have a small reproducible example you can share?

richpauloo commented 6 years ago

Hello, and sorry for wasting your time. This issue can be closed. I figured out the error, and it's wasn't Shiny, but as you suggested, an error in how I was sampling data. Thanks for pointing that out though! :)

bborgesr commented 6 years ago

Glad you figured it out! These types of questions can also be posted in our Shiny Google group: https://groups.google.com/forum/?nomobile=true#!forum/shiny-discuss

Since a lot more people subscribe to that, there's a greater chance you'll get an answer. It's also more appropriate when you need help with your app/are not sure what's wrong. Please include sample code/minimal reproducible example there as well.

This issue tracker is mostly used for reporting concrete bugs and to make new feature request.

richpauloo commented 6 years ago

Thank you for sharing these resources Barbara!

On Wed, Sep 13, 2017 at 2:28 AM, Barbara Borges Ribeiro < notifications@github.com> wrote:

Glad you figured it out! These types of questions can also be posted in our Shiny Google group: https://groups.google.com/ forum/?nomobile=true#!forum/shiny-discuss

Since a lot more people subscribe to that, there's a greater chance you'll get an answer. It's also more appropriate when you need help with your app/are not sure what's wrong. Please include sample code/minimal reproducible example there as well.

This issue tracker is mostly used for reporting concrete bugs and to make new feature request.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rstudio/shinydashboard/issues/244#issuecomment-329111714, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ25q8MTS65kULwkjqcM5rRjTBY6d6Bfks5sh6AwgaJpZM4PT70u .

-- Rich Pauloo (415) 275-4981