Friday, November 14, 2025

A Shinyapps Misfire

Posit, the company behind the open source RStudio IDE that I use for R coding and many other R-related products and services, operates an online server for Shiny web applications at shinyapps.io. As with their other services (and as is common with many web services these days), they offer various pricing tiers, including a free tier that I use. The free tier, as one would expect, comes with a variety of limitations, including lack of direct customer support. (Free tier users are encouraged to use their community forums for help.) I use my shinyapps account primarily for developing applications for nonprofit clients of INFORMS Pro Bono Analytics (PBA). Those clients host the completed applications on their own accounts (whether free or paid).

Recently, my account was suspended after I did a test run of a program I was writing for a  PBA client. It took some digging to find out why, but once I did the support staff at Posit very quickly restored my account, for which I am grateful. It turns out that, in addition to limitations on number of applications hosted and usage amounts (time, memory, ...), there are certain things an application in a free account cannot do that an application in a paid account can do. As best I can tell, the following things can get your account suspended and/or cause your application to crash:

  •  launching a headless browser (such as Google Chrome or Chromium); or
  •  trying to launch background processes (parallel workers, system scripts, ...).

I'm not sure that launching background scripts/processes will result in account suspension, but I have it on good authority that they can cause applications to bomb or act funny (for instance, because the server silently blocked the background process). Also, the above list is by no means guaranteed to be comprehensive. There may be other ways to get your account suspended.

In my case, the Shiny application I was testing used the leaflet library to draw maps and the mapview library (which in turn uses the webshot2 library) to create PNG images of those maps. I did not realize that one of those (I think webshot2 but don't count on my being correct) uses a headless browser (Chromium?) to do the HTML to PNG conversion. OOPS!

Apparently there are legitimate reasons for Posit to be concerned about headless browsers -- ways they can be abused (?). I just wish that the response to their use in the free tier were an aborted application launch with explanation and not account suspension. Possibly my account was suspended because I tried multiple times to get the application running ... because I had no idea it was doing something not permitted.

Anyway, I'm back up and running, and now I know better than to try that approach to HTML -> PNG conversion. 

 

No comments:

Post a Comment

Due to intermittent spamming, comments are being moderated. If this is your first time commenting on the blog, please read the Ground Rules for Comments. In particular, if you want to ask an operations research-related question not relevant to this post, consider asking it on Operations Research Stack Exchange.