rstudio / shinydashboard

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

ShinyDash fails to render since R4.3 added to computer. #396

Closed DeliDouble closed 1 year ago

DeliDouble commented 1 year ago

Recently added R4.3 to my computer to play around with. despite this my apps that were using shinydashboard even though they are still compiled in R 4.2.2 do not render the site CSS needed to generate the dashboard. I tested this out in a smaller applet to verify that this was the issue. Whenever the app is uploaded to the posit connect server is returning 502 error when the app loads and will only occasionally render the shiny dash CSS. what makes this odd is that it will render the CSS on my local machine.

library(shiny)
library(shinydashboard)

ui <- fluidPage(
      dashboardHeader(title =  "Old Faithful Geyser Data"),
      sidebar <- dashboardSidebar(
        sliderInput("bins",
                    "Number of bins:",
                    min = 1,
                    max = 50,
                    value = 30)
      ),
      body <- dashboardBody(
        plotOutput("distPlot")
      ),
      skin="purple"
)

server <- function(input, output) {
    output$distPlot <- renderPlot({
        x    <- faithful[, 2]
        bins <- seq(min(x), max(x), length.out = input$bins + 1)
        hist(x, breaks = bins, col = 'darkgray', border = 'white',
             xlab = 'Waiting time to next eruption (in mins)',
             main = 'Histogram of waiting times')
    })
}
shinyApp(ui = ui, server = server)
gadenbuie commented 1 year ago

Hi @DeliDouble! In general, we recommend you re-install all packages when you upgrade R to a new minor version or higher. That said, in your case it's more likely that you're hitting a recent bug in the httpuv package, which was also just fixed. Please try installing the latest version of httpuv to see if that works for you.

DeliDouble commented 1 year ago

Yup that works. dang I need to get better at going through logs.

gadenbuie commented 1 year ago

No worries, I'm glad you got it sorted out!