#StackBounty: #r #shiny #shinyapps Error related to check_container_alive when publish a shiny app to shinyapps.io

Bounty: 100

I have designed the a shiny app. When I tried to publish this app on shinyapps.io, I got the following error message.

Error: Unhandled Exception: Child Task 958419875 error: Unhandled
Exception: Timeout waiting for ‘_check_container_alive’ after 0:00:30
Execution halted

I have used shinyapps.io to publish other shiny apps, but this is the first time I encountered this error. The only thing I can think of for now is it is the first time I used an R package, shinyStore, not from CRAN, but from github. I am wondering if this may casue some issues.

Below is the R code. Please let me know how I can solve this issue.

### This script creates an example of using the shinyStore package

# Load packages
library(shiny)
library(shinyStore)

ui <- fluidPage(
  headerPanel("shinyStore Example"),
  sidebarLayout(
    sidebarPanel = sidebarPanel(
      initStore("store", "shinyStore-ex1"),
      textInput(inputId = "Text1", label = "Enter some texts")
    ),
    mainPanel = mainPanel(
      fluidRow(
        numericInput(inputId = "Number1", label = "Enter a number", value = NA),
        sliderInput(inputId = "Slider1", label = "Pick a number", min = 0, max = 100, value = 50),
        actionButton("save", "Save", icon("save")),
        actionButton("clear", "Clear", icon("stop"))
      )
    )
  )
)

server <- function(input, output, session) {
  observe({
    if (input$save <= 0){
      updateTextInput(session, inputId = "Text1", value = isolate(input$store)$Text1)
      updateNumericInput(session, inputId = "Number1", value = isolate(input$store)$Number1)
      updateSliderInput(session, inputId = "Slider1", value = isolate(input$store)$Slider1)
    }
    updateStore(session, name = "Text1", isolate(input$Text1))
    updateStore(session, name = "Number1", isolate(input$Number1))
    updateStore(session, name = "Slider1", isolate(input$Slider1))
  })
  
  observe({
    if (input$clear > 0){
      updateTextInput(session, inputId = "Text1", value = NA)
      updateNumericInput(session, inputId = "Number1", value = NA)
      updateSliderInput(session, inputId = "Slider1", value = 50)
      
      updateStore(session, name = "Text1", value = NA)
      updateStore(session, name = "Number1", value = NA)
      updateStore(session, name = "Slider1", value = 50)
    }
  })
}

shinyApp(ui, server)


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.