将闪亮的应用程序发布到 Shinyapps.io 时与 check_container_alive 相关的错误

www*_*www 5 r shiny shinyapps shinystore

我设计了一个闪亮的应用程序。当我尝试在 上发布此应用程序时shinyapps.io,收到以下错误消息。

错误:未处理的异常:子任务 958419875 错误:未处理的异常:在 0:00:30 执行停止后等待“_check_container_alive”超时

我曾经shinyapps.io发布过其他闪亮的应用程序,但这是我第一次遇到此错误。我现在唯一能想到的是这是我第一次使用 R 包,shinyStore,不是来自 CRAN,而是来自 github。我想知道这是否会引起一些问题。

下面是R代码。请让我知道如何解决这个问题。

### 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)
Run Code Online (Sandbox Code Playgroud)

更新

几天后,我尝试shinyapps.io使用相同的代码再次发布该应用程序,并且成功了。现在我的猜测是我和 之间存在一些连接问题 shinyapps.io,或者shinyapps.io安装shinyStore软件包时遇到了一些困难。如果有人可以对此错误消息提供解释,我将接受该答案并奖励赏金。