I maintain an R package that conducts long-running analyses via a Shiny app. It loads data from a file, conducts an analysis (displaying a progress bar to the user), then displays results.
When I launch the app via RStudio, running in the Google Chrome browser, and leave an analysis running overnight, the script continues to run, displaying regular output in the R terminal. However, when I revisit the Chrome window in the morning, the window displays the app in its initial state (i.e. no evidence that a file has been opened or analyses commenced).
I presume that Chrome is treating the tab as inactive, 'snoozing' it, then re-launching the tab (hence severing the original connection with the R session) when I revisit it.
I'd like the package to be as simple for users to use as possible, so hope to find a solution that doesn't involve fiddling with browser settings (end users may use other browsers too). Is there any way that a Shiny app can be configured to avoid this behaviour?