rstudio / shiny

Easy interactive web applications with R
https://shiny.posit.co/
Other
5.37k stars 1.87k forks source link

Why shiny says that pip broken #2501

Closed beginner984 closed 5 years ago

beginner984 commented 5 years ago

Hi,

I have this shiny app its data table not working and not showing any table and says that

Listening on http://127.0.0.1:4994
ERROR: [uv_write] broken pipe

This is code of my shiny


library(shiny)
library(shinydashboard)
library(shinyBS)
library(DT)

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(

  ),
  dashboardBody(

    mainPanel(

      tabsetPanel(

        tabPanel("Data", value=2,

                 fluidRow(

                   valueBoxOutput("vbox1", width = 2),
                   valueBoxOutput("vbox2", width = 2),
                   valueBoxOutput("vbox3", width = 2),
                   valueBoxOutput("vbox4", width = 2),
                   valueBoxOutput("vbox5", width = 2),
                   valueBoxOutput("vbox6", width = 2)

                 ),

                 fluidRow(

                   column(width = 4,  box(title = "Iris", width = NULL, solidHeader = FALSE, d3heatmapOutput("heatmap", width = "100%", height="600px"))),
                   column(width = 4,  box(title = "MT Cars", width = NULL, solidHeader = FALSE, dataTableOutput("dat2"))),
                   column(width = 4,  box(title = "Old Faithful Gyser", width = NULL, solidHeader = FALSE, dataTableOutput("dat3"))))

        )
      )
    )
  ))

server <- function(input, output) {

  output$heatmap <- renderPlotly({plot_ly(iris, type = "heatmap")})
  output$dat2 <- renderDataTable({datatable(mtcars,extensions = 'Responsive' )})
  output$dat3 <- renderDataTable({datatable(faithful,rownames = FALSE, options = list(autoWidth = TRUE)  )})

}

shinyApp(ui, server)

Any help please

YsoSirius commented 5 years ago

The error you mention is already here #2371, but it is not breaking anything (as far as I know).

The tables are working and showing up, but the heatmap is not, as you are using a wrong render-function. For d3heatmapOutput it should be renderD3heatmap from the d3heatmap package. If you really want to plot a plotly-heatmap then it should be plotlyOutput instead of d3heatmapOutput.

So I dont think this is a new issue and should therefore be closed and rather posted on stackoverflow.

beginner984 commented 5 years ago

Sorry, I am on windows 8, on my computer no table showing also sayingERROR: [uv_write] broken pipe

I tried internet explorer and mozilla firefox browsers for both no table or heatmap showing

YsoSirius commented 5 years ago

Can you include the output of sessionInfo() or better sessioninfo::session_info() ?

beginner984 commented 5 years ago

Thank you


> sessioninfo::session_info()
- Session info --------------------------------------------------
  setting  value                       
version  R version 3.5.3 (2019-03-11)
os       Windows 8.1 x64             
system   x86_64, mingw32             
ui       RStudio                     
language (EN)                        
collate  English_United States.1252  
ctype    English_United States.1252  
tz       Asia/Tehran                 
date     2019-06-16                  

- Packages ------------------------------------------------------
  ! package        * version  date       lib source           
assertthat       0.2.1    2019-03-21 [1] CRAN (R 3.5.3)   
backports        1.1.4    2019-04-10 [1] CRAN (R 3.5.3)   
base64enc        0.1-3    2015-07-28 [1] CRAN (R 3.5.2)   
BBmisc         * 1.11     2017-03-10 [1] CRAN (R 3.5.3)   
BiocGenerics   * 0.28.0   2018-10-30 [1] Bioconductor     
bitops           1.0-6    2013-08-17 [1] CRAN (R 3.5.2)   
broom            0.5.2    2019-04-07 [1] CRAN (R 3.5.3)   
caTools          1.17.1.2 2019-03-06 [1] CRAN (R 3.5.2)   
checkmate        1.9.3    2019-05-03 [1] CRAN (R 3.5.3)   
cli              1.1.0    2019-03-19 [1] CRAN (R 3.5.3)   
R cluster          2.0.7-1  <NA>       [2] <NA>             
  codetools        0.2-16   2018-12-24 [1] CRAN (R 3.5.2)   
colorspace       1.4-1    2019-03-18 [1] CRAN (R 3.5.3)   
colourpicker   * 1.0      2017-09-27 [1] CRAN (R 3.5.3)   
corrplot       * 0.84     2017-10-16 [1] CRAN (R 3.5.2)   
crayon           1.3.4    2017-09-16 [1] CRAN (R 3.5.2)   
crosstalk        1.0.0    2016-12-21 [1] CRAN (R 3.5.2)   
curl             3.3      2019-01-10 [1] CRAN (R 3.5.2)   
d3heatmap      * 0.6.1.2  2018-02-01 [1] CRAN (R 3.5.2)   
data.table       1.12.2   2019-04-07 [1] CRAN (R 3.5.3)   
DBI            * 1.0.0    2018-05-02 [1] CRAN (R 3.5.2)   
dbplyr         * 1.4.0    2019-04-23 [1] CRAN (R 3.5.3)   
dendextend       1.12.0   2019-05-11 [1] CRAN (R 3.5.3)   
digest           0.6.19   2019-05-20 [1] CRAN (R 3.5.3)   
dplyr          * 0.8.1    2019-05-14 [1] CRAN (R 3.5.3)   
DT             * 0.6      2019-05-09 [1] CRAN (R 3.5.3)   
foreach          1.4.4    2017-12-12 [1] CRAN (R 3.5.2)   
gclus            1.3.2    2019-01-07 [1] CRAN (R 3.5.2)   
gdata            2.18.0   2017-06-06 [1] CRAN (R 3.5.2)   
generics         0.0.2    2018-11-29 [1] CRAN (R 3.5.2)   
ggplot2        * 3.1.1    2019-04-07 [1] CRAN (R 3.5.3)   
glue             1.3.1    2019-03-12 [1] CRAN (R 3.5.3)   
gplots           3.0.1.1  2019-01-27 [1] CRAN (R 3.5.3)   
graph          * 1.60.0   2018-10-30 [1] Bioconductor     
gridExtra      * 2.3      2017-09-09 [1] CRAN (R 3.5.2)   
gtable           0.3.0    2019-03-25 [1] CRAN (R 3.5.3)   
gtools         * 3.8.1    2018-06-26 [1] CRAN (R 3.5.2)   
heatmaply      * 0.16.0   2019-05-11 [1] CRAN (R 3.5.3)   
highcharter    * 0.7.0    2019-01-15 [1] CRAN (R 3.5.3)   
htmltools      * 0.3.6    2017-04-28 [1] CRAN (R 3.5.2)   
htmlwidgets      1.3      2018-09-30 [1] CRAN (R 3.5.2)   
httpuv           1.5.1    2019-04-05 [1] CRAN (R 3.5.3)   
httr             1.4.0    2018-12-11 [1] CRAN (R 3.5.2)   
igraph           1.2.4.1  2019-04-22 [1] CRAN (R 3.5.3)   
iterators        1.0.10   2018-07-13 [1] CRAN (R 3.5.2)   
jsonlite         1.6      2018-12-07 [1] CRAN (R 3.5.2)   
KernSmooth       2.23-15  2015-06-29 [1] CRAN (R 3.5.2)   
later            0.8.0    2019-02-11 [1] CRAN (R 3.5.2)   
lattice        * 0.20-38  2018-11-04 [1] CRAN (R 3.5.2)   
lazyeval         0.2.2    2019-03-15 [1] CRAN (R 3.5.3)   
lubridate        1.7.4    2018-04-11 [1] CRAN (R 3.5.2)   
magrittr         1.5      2014-11-22 [1] CRAN (R 3.5.2)   
R MASS             7.3-51.1 <NA>       [2] <NA>             
  mime             0.6      2018-10-05 [1] CRAN (R 3.5.2)   
miniUI           0.1.1.1  2018-05-18 [1] CRAN (R 3.5.3)   
munsell          0.5.0    2018-06-12 [1] CRAN (R 3.5.2)   
R nlme             3.1-137  <NA>       [2] <NA>             
  nycflights13   * 1.0.0    2018-06-26 [1] CRAN (R 3.5.3)   
pillar           1.4.1    2019-05-28 [1] CRAN (R 3.5.3)   
pipeR            0.6.1.3  2016-04-04 [1] CRAN (R 3.5.3)   
pkgconfig        2.0.2    2018-08-16 [1] CRAN (R 3.5.2)   
plotly         * 4.9.0    2019-04-10 [1] CRAN (R 3.5.3)   
plyr           * 1.8.4    2016-06-08 [1] CRAN (R 3.5.2)   
png              0.1-7    2013-12-03 [1] CRAN (R 3.5.2)   
pool           * 0.1.4.2  2019-01-07 [1] CRAN (R 3.5.3)   
promises         1.0.1    2018-04-13 [1] CRAN (R 3.5.2)   
purrr          * 0.3.2    2019-03-15 [1] CRAN (R 3.5.3)   
quantmod         0.4-14   2019-03-24 [1] CRAN (R 3.5.3)   
R6               2.4.0    2019-02-14 [1] CRAN (R 3.5.2)   
rAmCharts      * 2.1.10   2019-02-12 [1] CRAN (R 3.5.3)   
RBGL           * 1.58.2   2019-03-22 [1] Bioconductor     
RColorBrewer   * 1.1-2    2014-12-07 [1] CRAN (R 3.5.2)   
Rcpp             1.0.1    2019-03-17 [1] CRAN (R 3.5.3)   
registry         0.5-1    2019-03-05 [1] CRAN (R 3.5.2)   
reshape        * 0.8.8    2018-10-23 [1] CRAN (R 3.5.2)   
rlang            0.3.4    2019-04-07 [1] CRAN (R 3.5.3)   
rlist            0.4.6.1  2016-04-04 [1] CRAN (R 3.5.3)   
rstudioapi       0.10     2019-03-19 [1] CRAN (R 3.5.3)   
scales           1.0.0    2018-08-09 [1] CRAN (R 3.5.2)   
seriation        1.2-5    2019-05-30 [1] CRAN (R 3.5.3)   
sessioninfo      1.1.1    2018-11-05 [1] CRAN (R 3.5.2)   
shiny          * 1.3.2    2019-04-22 [1] CRAN (R 3.5.3)   
shinyBS        * 0.61     2015-03-31 [1] CRAN (R 3.5.2)   
shinydashboard * 0.7.1    2018-10-17 [1] CRAN (R 3.5.2)   
shinyHeatmaply * 0.1.0    2017-03-28 [1] CRAN (R 3.5.3)   
stringi          1.4.3    2019-03-12 [1] CRAN (R 3.5.3)   
stringr          1.4.0    2019-02-10 [1] CRAN (R 3.5.2)   
tibble           2.1.2    2019-05-29 [1] CRAN (R 3.5.3)   
tidyr            0.8.3    2019-03-01 [1] CRAN (R 3.5.2)   
tidyselect       0.2.5    2018-10-11 [1] CRAN (R 3.5.2)   
TSP              1.1-7    2019-05-22 [1] CRAN (R 3.5.3)   
TTR              0.23-4   2018-09-20 [1] CRAN (R 3.5.3)   
UpSetR         * 1.4.0    2019-05-22 [1] CRAN (R 3.5.3)   
Vennerable     * 3.0      2013-07-24 [1] R-Forge (R 3.5.3)
viridis        * 0.5.1    2018-03-29 [1] CRAN (R 3.5.2)   
viridisLite    * 0.3.0    2018-02-01 [1] CRAN (R 3.5.2)   
webshot          0.5.1    2018-09-28 [1] CRAN (R 3.5.2)   
whisker          0.3-2    2013-04-28 [1] CRAN (R 3.5.2)   
withr            2.1.2    2018-03-15 [1] CRAN (R 3.5.2)   
wordcloud      * 2.6      2018-08-24 [1] CRAN (R 3.5.3)   
xtable         * 1.8-4    2019-04-21 [1] CRAN (R 3.5.3)   
xts              0.11-2   2018-11-05 [1] CRAN (R 3.5.3)   
yaml             2.2.0    2018-07-25 [1] CRAN (R 3.5.2)   
zoo              1.8-6    2019-05-28 [1] CRAN (R 3.5.3)   

[1] C:/Users/Lenovo/Documents/R/win-library/3.5
[2] C:/Program Files/R/R-3.5.3/library

R -- Package was removed from disk.
wch commented 5 years ago

It turns out that the broken pipe message is just an unnecessarily-scary message that gets printed out when the browser closes a connection at an unexpected time. We will make a patch to the httpuv package to make it stop reporting this.

(Duplicate of #2371)