Closed karchjd closed 6 months ago
Why is your app starting a server? I think that's the place I'd start.
shinyapps.io uses code like the following to run your application:
shiny::runApp(
host = HOST,
port = PORT,
...
)
The host, port, and a number of other runApp()
parameters are determined dynamically when your application starts.
Your start_app()
function is calling runApp()
, which is unnecessary and becomes a recursive runApp()
invocation.
Try having the app.R
produce the shinyApp()
result rather than starting a server.
Thanks so much for the fast help!! This solved my problem.
It seems that I got confused by the multiple different ways of deploying an app and forgot that for shinyapps.io, defining the app is sufficient.
Happy to help. In the future, the shinyapps.io community forum can also give advice: https://community.rstudio.com/c/shiny/shinyappsio/24
My shiny app (https://github.com/karchjd/lavaangui/tree/debug-shinyapp) runs perfectly locally and when I deploy it to https://www.heroku.com/ (https://lavaangui-64ec430ee663.herokuapp.com/#). When I deploy it to shinyapps.io, it deploys it successfully but visiting the webpage (https://solo-fsw.shinyapps.io/lavaangui/) leads to a timeout error:
Note that the app starts within a few seconds max locally and on heroku.
However, I don't get any errors in the logs:
I deploy my app like this: https://github.com/karchjd/lavaangui/blob/debug-shinyapp/dev/deploy.R