r - 将 Shiny 应用程序部署到 shinyapps.io 时出现问题
问题描述
运行以下代码将一个非常简单的 Shiny 应用程序部署到shinyapps.io
:
rm(list = ls())
library(shiny)
library(rsconnect)
ui <- fluidPage("Hello World",
sliderInput(inputId = "num",
label = "Choose a Number",
value = 25,
min = 1,
max = 100),
plotOutput("hist"))
server <- function(input, output)
{
output$hist <- renderPlot({
hist(rnorm(input$num))
})
}
shinyApp(ui = ui, server = server)
rsconnect::setAccountInfo(name='xxx redacted xxx', token='xxx redacted xxx', secret='xxx redacted xxx')
rsconnect::deployApp(".") # we're already in the correct directory
它不工作。我可以从shinyapps.io
仪表板中看到该应用程序,但是当我尝试在我的网络浏览器中启动它时,我会看到一个旋转的轮子并最终显示一条消息:
Attaching package: ‘rsconnect’
The following object is masked from ‘package:shiny’:
serverInfo
Error in value[[3L]](cond) : HTTP 409 POST https://api.shinyapps.io/v1/applications/2371290/deploy Unable to dispatch task for application=2371290, there are 1 tasks in progress Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution halted
出现。有人可以帮忙吗?我以前从未这样做过,我有点困惑。
运行 Microsoft R 客户端 3.5.2/RStudio 1.3/Windows 10。
谢谢你。
编辑:日志文件内容...
2020-05-28T14:51:42.591212+00:00 shinyapps[2371290]: R version: 3.5.2
2020-05-28T14:51:42.591131+00:00 shinyapps[2371290]: Server version: 1.8.2.1-12
2020-05-28T14:51:42.591211+00:00 shinyapps[2371290]: LANG: en_US.UTF-8
2020-05-28T14:51:42.591213+00:00 shinyapps[2371290]: shiny version: 1.2.0
2020-05-28T14:51:42.591213+00:00 shinyapps[2371290]: httpuv version: 1.4.5.1
2020-05-28T14:51:42.591213+00:00 shinyapps[2371290]: rmarkdown version: (none)
2020-05-28T14:51:42.591226+00:00 shinyapps[2371290]: knitr version: (none)
2020-05-28T14:51:42.708336+00:00 shinyapps[2371290]:
2020-05-28T14:51:42.591349+00:00 shinyapps[2371290]: Using pandoc: /opt/connect/ext/pandoc2
2020-05-28T14:51:42.704612+00:00 shinyapps[2371290]: Using jsonlite for JSON processing
2020-05-28T14:51:42.591226+00:00 shinyapps[2371290]: RJSONIO version: (none)
2020-05-28T14:51:42.591226+00:00 shinyapps[2371290]: jsonlite version: 1.6
2020-05-28T14:51:42.591226+00:00 shinyapps[2371290]: htmltools version: 0.3.6
2020-05-28T14:51:42.708337+00:00 shinyapps[2371290]: Starting R with process ID: '25'
2020-05-28T14:51:42.746463+00:00 shinyapps[2371290]:
2020-05-28T14:51:42.747094+00:00 shinyapps[2371290]:
2020-05-28T14:51:42.747093+00:00 shinyapps[2371290]: The following object is masked from ‘package:shiny’:
2020-05-28T14:51:42.747094+00:00 shinyapps[2371290]: serverInfo
2020-05-28T14:51:42.746464+00:00 shinyapps[2371290]: Attaching package: ‘rsconnect’
2020-05-28T14:51:42.746465+00:00 shinyapps[2371290]:
2020-05-28T14:51:42.747094+00:00 shinyapps[2371290]:
2020-05-28T14:51:43.101717+00:00 shinyapps[2371290]: Preparing to deploy application...DONE
2020-05-28T14:51:46.026109+00:00 shinyapps[2371290]: Uploading bundle for application: 2371290...DONE
2020-05-28T14:51:46.032758+00:00 shinyapps[2371290]: Deploying bundle: 3200741 for application: 2371290 ...
2020-05-28T14:51:46.480750+00:00 shinyapps[2371290]: Waiting for task: 738249988
2020-05-28T14:51:47.584835+00:00 shinyapps[2371290]: building: Processing bundle: 3200741
2020-05-28T14:51:48.625497+00:00 shinyapps[2371290]: building: Parsing manifest
2020-05-28T14:51:49.670153+00:00 shinyapps[2371290]: building: Building image: 3578706
2020-05-28T14:51:50.755095+00:00 shinyapps[2371290]: building: Fetching packages
2020-05-28T14:51:51.803751+00:00 shinyapps[2371290]: building: Installing packages
解决方案
推荐阅读
- angular - 使用 route.snapshot 获取路由参数的问题
- scikit-learn - Bunch 对象不可调用 - scikit-learn rcv1 数据集
- julia - 如何获取 julia 包的 UUID
- batch-file - 是否有公开 start 命令搜索的路径的 API?
- typescript - 调度 thunk 动作创建者在 TypeScript 中不匹配
- reactjs - 一个人如何拥有指向不同 React.js 应用程序的链接菜单
- machine-learning - BatchNorm1d 需要二维输入?
- python - 如何从函数的闭包中访问/修改变量?
- c++ - 除数之和不大于数字时确定数字的因素,程序将不接受大于10000的限制
- reactjs - 如何在 redux-form 中使用自定义组件?