Update of RStudio Server forces shiny update even if renv is enabled. How to avoid?


We got the rstudio server upgraded in our organitzation by IT admins, and many developers are experiencing problems with our shiny apps, even if we use renv, because rstudio server forces us to upgrade the shiny package version to a newer one with many other dependencies also.

2022-02-07 11_11_04-RStudio Server_forcing_to_upgrade_shiny_package_breaking_complex_shiny_app

This breaks the app due to changes in the new packages not adapted to the code of the (complex app).

How can we force renv to keep taking control of the R pacakge versions to ensure that the complex app developed a couple of years ago keep running as expected?

Shall we just request a downgrade of the Rstudio Server to our IT admins????


I'm not sure that I completely understand your scenario. I thought deployed apps have their packages fixed, and wouldnt alter without redeployment. But perhaps your issue relates to the local versions of the apps that developers use, and deploy from ? If so I think the developers should call renv::restore() before they load their library dependencies, and before they redeploy

Hey, thanks. We've done so, of course, but then, Rstudio doesn't allow to load the shiny app again. Once renv::restore() finishes, shiny is at that earlier version, and RStudio doen't want to show the shiny app if we don't click at "upgrade" shiny (and dependencies). It seems a dead end.

In the short term you might roll back to using an earlier Rstudio server that is happy with your preferred shiny version. You might additionally engage with the Rstudio development team via their issues board, to share your concerns and follow their progress.
For example
dial back shiny 1.6.0 requirement · Issue #10230 · rstudio/rstudio (github.com)

Let me explain differently. We had a complex shiny app developed and working fine against R 3.6 for months. And we had package versions locked thanks to using renv in the project. So far, so good.

Then rstudio server was upgraded by IT admins to a version a few years newer. And since then, everytime we click at "Run app" on the Server.R file in that new RStudio (currently 2021.09.0 Build 351), RStudio shows the screenshot I showed in the first message of this thread. If we click at "no", no shiny up is shown. If we click at "yes", then a few packages are upgraded to new versions (shiny and dependencies, apparently), and some parts of the shiny app stopped working because of changes in functions in the new package versions, etc.

I agree with nirgrahamuk, your best bet is to file an issue on the GitHub repository, since the package library for your project is set by renv and the defined shiny version doesn't meet the minimum requirements of the latest RStudio version, it seems there is no way to get rid of the issue from the user side.

A walk around could be not to use RStudio for testing but a separate development environment with shiny-server which pulls from the branch you are working on, so instead of clicking "Run app" you would click "refresh" on a web browser.

For reference, we're planning to relax the shiny version requirements in the next release of RStudio -- see https://github.com/rstudio/rstudio/issues/10230 for more details.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.