I'm struggling to find a way to upload my flexdashboard app to shinyapp.io. It is an interactive app where I read and write docs (also use source function for example).
The rmd gets deployed, but when opening it on shinyapss.io I get the following
Error: An error has occurred. Check your logs or contact the app author for clarification.
I have tried to change path routes, start a shinyapp project, a Rproject, and so many things ...
Here is the logs from rsconnect::showLogs
2020-06-23T20:41:05.018776+00:00 shinyapps[2494849]:
2020-06-23T20:41:04.962682+00:00 shinyapps[2494849]: The following objects are masked from 'package:shiny':
2020-06-23T20:41:05.018777+00:00 shinyapps[2494849]:
2020-06-23T20:41:04.962683+00:00 shinyapps[2494849]:
2020-06-23T20:41:05.029917+00:00 shinyapps[2494849]:
2020-06-23T20:41:05.031322+00:00 shinyapps[2494849]:
2020-06-23T20:41:05.031322+00:00 shinyapps[2494849]: date, intersect, setdiff, union
2020-06-23T20:41:05.031321+00:00 shinyapps[2494849]: The following objects are masked from 'package:base':
2020-06-23T20:41:05.029918+00:00 shinyapps[2494849]: Attaching package: 'lubridate'
|.. | 2%
2020-06-23T20:41:05.029918+00:00 shinyapps[2494849]:
2020-06-23T20:41:05.035336+00:00 shinyapps[2494849]: ordinary text without R code
2020-06-23T20:41:05.030640+00:00 shinyapps[2494849]: The following object is masked from 'package:cowplot':
2020-06-23T20:41:05.018046+00:00 shinyapps[2494849]: Attaching package: 'kableExtra'
2020-06-23T20:41:05.030640+00:00 shinyapps[2494849]:
2020-06-23T20:41:05.030641+00:00 shinyapps[2494849]:
2020-06-23T20:41:05.031322+00:00 shinyapps[2494849]:
|.. | 3%
2020-06-23T20:41:05.049968+00:00 shinyapps[2494849]: Warning in file(filename, "r", encoding = encoding) :
2020-06-23T20:41:05.030641+00:00 shinyapps[2494849]: stamp
2020-06-23T20:41:05.035973+00:00 shinyapps[2494849]: label: unnamed-chunk-2
2020-06-23T20:41:05.049971+00:00 shinyapps[2494849]: no fue posible abrir el archivo 'RPS/rps.r': No such file or directory
2020-06-23T20:41:05.052159+00:00 shinyapps[2494849]:
2020-06-23T20:41:05.071180+00:00 shinyapps[2494849]: 150: source
2020-06-23T20:41:05.071185+00:00 shinyapps[2494849]: 133: knitr::knit
2020-06-23T20:41:05.035338+00:00 shinyapps[2494849]:
2020-06-23T20:41:05.071181+00:00 shinyapps[2494849]: 149: eval
2020-06-23T20:41:05.071185+00:00 shinyapps[2494849]: 132:
2020-06-23T20:41:05.051163+00:00 shinyapps[2494849]: Quitting from lines 101-290 (DashBoard.Rmd)
2020-06-23T20:41:05.071183+00:00 shinyapps[2494849]: 139: block_exec
2020-06-23T20:41:05.071186+00:00 shinyapps[2494849]: 96: origRenderFunc
2020-06-23T20:41:05.071182+00:00 shinyapps[2494849]: 142: evaluate::evaluate
2020-06-23T20:41:05.071186+00:00 shinyapps[2494849]: 110: shiny::renderUI
2020-06-23T20:41:05.071182+00:00 shinyapps[2494849]: 143: evaluate_call
2020-06-23T20:41:05.071186+00:00 shinyapps[2494849]: 111: doc
2020-06-23T20:41:05.064356+00:00 shinyapps[2494849]: Warning: Error in file: no se puede abrir la conexión
2020-06-23T20:41:05.071184+00:00 shinyapps[2494849]: 137: process_group.block
2020-06-23T20:41:05.071184+00:00 shinyapps[2494849]: 138: call_block
2020-06-23T20:41:05.071214+00:00 shinyapps[2494849]: 95: output$reactivedoc
2020-06-23T20:41:05.071183+00:00 shinyapps[2494849]: 141: evaluate
2020-06-23T20:41:05.071186+00:00 shinyapps[2494849]: 109: func
2020-06-23T20:41:05.071179+00:00 shinyapps[2494849]: 151: file
2020-06-23T20:41:05.071184+00:00 shinyapps[2494849]: 134: process_file
2020-06-23T20:41:05.071216+00:00 shinyapps[2494849]: 12: fn
2020-06-23T20:41:05.071217+00:00 shinyapps[2494849]: 7: connect$retry
2020-06-23T20:41:05.071182+00:00 shinyapps[2494849]: 148: eval
2020-06-23T20:41:05.071185+00:00 shinyapps[2494849]: 127:
2020-06-23T20:41:05.071217+00:00 shinyapps[2494849]: 6: eval
2020-06-23T20:41:05.071216+00:00 shinyapps[2494849]: 13: rmarkdown::run
2020-06-23T20:41:05.071217+00:00 shinyapps[2494849]: 5: eval
2020-06-23T20:41:05.071215+00:00 shinyapps[2494849]: 15:
And here is the line where I suppose it is failing
source("RPS/rps.R")
But I also use the write and read functions as follows:
write_csv(tabla,"RPS/rps.csv")
tabla <- read_csv("RPS/rps.csv")
I know the problem may be because of this. Here is the call to my directory where I have developed the app.
getwd()
[1] "/Users/albtorval/Documents/Aprendizaje/Trabajos/IAJuegos"
I want to change it to
setwd("~/Documents/Aprendizaje/Trabajos/JuegosIA")
But I can't. What else can I try? Should I desist?