No detail on errors in Shinyapps.io logs

I am getting this error message after deployment to Shinyapps.io:

`
2020-04-08T08:14:51.170999+00:00 shinyapps[2045921]: Error in value[3L] : Argument 2 must be length 23, not 138

2020-04-08T08:14:51.171001+00:00 shinyapps[2045921]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne ->

2020-04-08T08:14:51.171002+00:00 shinyapps[2045921]: Execution halted
`

I have tried as much as possible to replicate the package versions locally and I cannot replicate the error on my machine. I am not explicitly calling tryCatch anywhere in my code. So much is clear to me: somehwere a condition with length 23 is expected but 138 is received.

As I cannot replicate the error locally, it is very difficult to provide a reprex (if I could do that I would have probably solved the issue...), so my question is rather how to "force" the logs to produce a bit more information - like a call stack at least and which line in the code executed which function which apparently called tryCatch ... I have tried options(shiny.fullstacktrace = TRUE) but no luck.

Sorry for the lack of more clarity - any ideas much appreciated.
Thanks

1 Like

This is a hard one. Thank you for the full explanation!

Are you combining data that could possible have different lengths?

Try setting options(shiny.trace = TRUE).

#' \item{shiny.trace (defaults to FALSE)}{Print messages sent between the R server and the web
#' browser client to the R console. This is useful for debugging. Possible
#' values are "send" (only print messages sent to the client),
#' "recv" (only print messages received by the server), TRUE
#' (print all messages), or FALSE (default; don't print any of these
#' messages).}

Hopefully this will tell you what the input values were being set to so that you can try to replicate on your side.

If not, download the bundled application from shinyapps.io and try reproducing the error there. See 3.5 Downloading your application

Hope this points you in the right direction!

Thanks @barret. The complication is also because I am in fact using Travis CI to automate the deployment process and apparently I couldn't replicate the exact package ecosystem (library I guess) on the Travis machine as on my own. Deployment from my machine using the UI and also using rsconnect::deployApp()was working fine.

In the end I managed to solve the problems with renv using this vignette as a guide: https://rstudio.github.io/renv/articles/ci.html

1 Like