部署到shinyapps.io错误:发生错误。检查您的日志或联系应用程序作者以获得说明

时间:2017-12-05 06:52:37

标签: r shiny

我正在尝试部署一个在本地工作正常的Shinyapp。我像这样使用rsconnect:

# I use my actual token and secret
    rsconnect::setAccountInfo(name='myname',
                  token='<TOKEN>',
                  secret='<SECRET>')

然后,我在Rstudio的部署窗格中收到一条确认消息:

Deployment completed: https://myname.shinyapps.io/my_app/

但是,当我尝试访问该链接时,我只看到此消息:

ERROR: An error has occurred. Check your logs or contact the app author for clarification.

我已经从下面的Shiny GUI中粘贴了日志。

我的应用中直接有一个csv文件,可以为应用提供数据。我不确定我看到的问题是否与直接路径有关。

我在申请中没有使用setwd()

这是我的目录结构的屏幕: enter image description here

在server()中,我读入数据:

server <- function(input, output) {

  # get data
  ga_data <- read.csv("ga_data.csv", stringsAsFactors = F, header = T)

我不确定csv的读取是否是问题,这可能是一种转移。

以下是Shinyapps GUI中针对该应用程序的日志:

2017-12-05T06:35:09.578323+00:00 shinyapps[244428]: 
2017-12-05T06:35:09.578336+00:00 shinyapps[244428]: Starting R with process ID: '18'
2017-12-05T06:35:09.593403+00:00 shinyapps[244428]: Listening on http://127.0.0.1:32896
2017-12-05T06:35:09.593401+00:00 shinyapps[244428]: 
2017-12-05T06:35:09.423094+00:00 shinyapps[244428]: RJSONIO version: NA
2017-12-05T06:35:09.423059+00:00 shinyapps[244428]: R version: 3.3.3
2017-12-05T06:35:09.423078+00:00 shinyapps[244428]: knitr version: NA
2017-12-05T06:35:09.423074+00:00 shinyapps[244428]: rmarkdown version: NA
2017-12-05T06:35:09.423084+00:00 shinyapps[244428]: jsonlite version: 1.4
2017-12-05T06:35:09.423102+00:00 shinyapps[244428]: htmltools version: 0.3.5
2017-12-05T06:48:30.886750+00:00 shinyapps[244428]: Server version: 1.5.10-6
2017-12-05T06:48:30.886783+00:00 shinyapps[244428]: LANG: en_US.UTF-8
2017-12-05T06:48:30.886784+00:00 shinyapps[244428]: R version: 3.3.3
2017-12-05T06:48:30.886784+00:00 shinyapps[244428]: shiny version: 1.0.3
2017-12-05T06:48:30.886785+00:00 shinyapps[244428]: rmarkdown version: NA
2017-12-05T06:48:30.886785+00:00 shinyapps[244428]: knitr version: NA
2017-12-05T06:48:30.886798+00:00 shinyapps[244428]: RJSONIO version: NA
2017-12-05T06:48:30.886786+00:00 shinyapps[244428]: jsonlite version: 1.4
2017-12-05T06:48:30.886825+00:00 shinyapps[244428]: htmltools version: 0.3.5
2017-12-05T06:48:31.081733+00:00 shinyapps[244428]: 
2017-12-05T06:48:31.074740+00:00 shinyapps[244428]: Using jsonlite for JSON processing
2017-12-05T06:48:31.081735+00:00 shinyapps[244428]: Starting R with process ID: '248'
2017-12-05T06:48:31.112053+00:00 shinyapps[244428]: 
2017-12-05T06:48:31.112056+00:00 shinyapps[244428]: Listening on http://127.0.0.1:44798
2017-12-05T06:48:31.153820+00:00 shinyapps[244428]: Installing package into ‘/usr/local/lib/R/site-library’
2017-12-05T06:48:31.153822+00:00 shinyapps[244428]: (as ‘lib’ is unspecified)
2017-12-05T06:48:31.154157+00:00 shinyapps[244428]: Warning in utils::install.packages(package, ...) :
2017-12-05T06:48:31.154158+00:00 shinyapps[244428]:   'lib = "/usr/local/lib/R/site-library"' is not writable
2017-12-05T06:48:31.155312+00:00 shinyapps[244428]: Warning: Error in utils::install.packages: unable to install packages
2017-12-05T06:48:31.160190+00:00 shinyapps[244428]: Stack trace (innermost first):
2017-12-05T06:48:31.160191+00:00 shinyapps[244428]:     59: utils::install.packages
2017-12-05T06:48:31.160192+00:00 shinyapps[244428]:     58: withCallingHandlers
2017-12-05T06:48:31.160192+00:00 shinyapps[244428]:     57: p_install
2017-12-05T06:48:31.160193+00:00 shinyapps[244428]:     56: FUN
2017-12-05T06:48:31.160194+00:00 shinyapps[244428]:     53: pacman::p_load
2017-12-05T06:48:31.160194+00:00 shinyapps[244428]:     54: sapply
2017-12-05T06:48:31.160193+00:00 shinyapps[244428]:     55: lapply
2017-12-05T06:48:31.160195+00:00 shinyapps[244428]:     13: runApp
2017-12-05T06:48:31.160195+00:00 shinyapps[244428]:     12: fn
2017-12-05T06:48:31.160196+00:00 shinyapps[244428]:     11: doTryCatch
2017-12-05T06:48:31.160196+00:00 shinyapps[244428]:     10: tryCatchOne
2017-12-05T06:48:31.160196+00:00 shinyapps[244428]:      9: tryCatchList
2017-12-05T06:48:31.160197+00:00 shinyapps[244428]:      8: tryCatch
2017-12-05T06:48:31.160198+00:00 shinyapps[244428]:      7: connect$retry
2017-12-05T06:48:31.160198+00:00 shinyapps[244428]:      6: eval
2017-12-05T06:48:31.160199+00:00 shinyapps[244428]:      5: eval
2017-12-05T06:48:31.160199+00:00 shinyapps[244428]:      4: eval
2017-12-05T06:48:31.160200+00:00 shinyapps[244428]:      3: eval
2017-12-05T06:48:31.160200+00:00 shinyapps[244428]:      2: eval.parent
2017-12-05T06:48:31.160200+00:00 shinyapps[244428]:      1: local
2017-12-05T06:48:31.160485+00:00 shinyapps[244428]: Error : An error has occurred. Check your logs or contact the app author for clarification.

如果有人能帮助我克服这个错误,我将不胜感激。如果我能提供更多信息,请告诉我。

0 个答案:

没有答案