Shiny App does not load

Dear All,

I am relatively new to shiny, so sorry if this is a "stupid" question.

I am currently trying to create my first shiny app, but if I create a shiny web app and simply click the "Run App" button R does not load the app.

This is the default shiny app I am trying to execute:


# Define UI for application that draws a histogram
ui <- fluidPage(

    # Application title
    titlePanel("Old Faithful Geyser Data"),

    # Sidebar with a slider input for number of bins 
                        "Number of bins:",
                        min = 1,
                        max = 50,
                        value = 30)

        # Show a plot of the generated distribution

# Define server logic required to draw a histogram
server <- function(input, output) {

    output$distPlot <- renderPlot({
        # generate bins based on input$bins from ui.R
        x    <- faithful[, 2]
        bins <- seq(min(x), max(x), length.out = input$bins + 1)

        # draw the histogram with the specified number of bins
        hist(x, breaks = bins, col = 'darkgray', border = 'white')

# Run the application 
shinyApp(ui = ui, server = server)

In addition here is the sessionInfo():
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

[1] LC_COLLATE=German_Austria.1252 LC_CTYPE=German_Austria.1252 LC_MONETARY=German_Austria.1252
[4] LC_NUMERIC=C LC_TIME=German_Austria.1252

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

other attached packages:
[1] shiny_1.6.0

loaded via a namespace (and not attached):
[1] compiler_4.1.0 fastmap_1.1.0 ellipsis_0.3.2 magrittr_2.0.1 R6_2.5.0 promises_1.2.0.1
[7] later_1.2.0 htmltools_0.5.1.1 tools_4.1.0 Rcpp_1.0.6 digest_0.6.27 xtable_1.8-4
[13] httpuv_1.6.1 lifecycle_1.0.0 mime_0.11 rlang_0.4.11

thanks for any advice or solution.

1 Like

Your code seems to work for me when I save it as app.R. Does anything happen when you click the "Run App" button?

I'm definitely outside my comfort/knowledge zone here, but it seems others (maybe) have reported similar issues with 4.1 and so I wonder if you might try to test this in 4.05 and see if the issue persists?

Thanks for your answer.

When I click the run app button the console shows:

Loading required package: shiny

and the red stop sign is visible, but there is nothing happening.

I tried it with 4.0.5 but I have the same problem there.

I’m curious, do you have a pop up blocker enabled? By default, for me anyway, running the app pulls up a separate window. Have you tried switching the behavior to “Run External” on app run?

Thank you for your answer.

I disabled the pop-up blocker in chrome but that did not change anything. I also tried "Run External".
I tried to run a markdown script and if I do that there is a separate window that pops up and shows me the document. So I guess RStudio is able to create that additional window.

I have the same problem and did the same protocol to revert back to 4.0.5 and nothing happen. The console spin endlessly and nothing happen

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.