Shiny app published to RStudio Connect runs into "status 137" error

Trying to run a shiny app on R Studio Connect. App justs displays an html widget from library(vitessceR) but while trying to run on the platform the app fails to load and I get the following log:

08/23 21:39:08.695 (GMT)

Listening on

08/23 21:39:13.943 (GMT)

sh: line 1: 14221 Killed /opt/R/4.2.1/lib/R/bin/Rscript --no-save --no-restore --no-site-file --no-init-file --default-packages=NULL -e "con <- socketConnection(port=11240, open='wb', blocking=TRUE);serialize(Sys.getenv(), con);close(con)"

08/23 21:39:13.944 (GMT)

Warning in system(paste(act.cmd, collapse = " "), intern = TRUE) :

08/23 21:39:13.944 (GMT)

running command '. '/home/rstudio-connect/.cache/R/basilisk/1.8.0/0/etc/profile.d/' && conda activate && /opt/R/4.2.1/lib/R/bin/Rscript --no-save --no-restore --no-site-file --no-init-file --default-packages=NULL -e "con <- socketConnection(port=11240, open='wb', blocking=TRUE);serialize(Sys.getenv(), con);close(con)"' had status 137

The app runs fine locally, something about R Studio Connect does not want to run this library.

It looks like your app is trying to activate a Conda environment and launch its own R process--in general, what you'll want to do is push your code to Connect, which will take responsibility for restoring the R and Python environments and launching the processes.

It is on Connect.

Maybe I don't quite understand something. So if a library stands up its own conda environ on R Studio Connect , that library function will get terminated due to memory? How will I get that library to tell Connect to run its own Python environment?

See this article on deploying reticulated content: Reticulate - RStudio :: Solutions

Even if your project isn't using reticulate the directions may help.

You'll want to make sure your manifest contains both an r an python section, so that connect knows to rebuild both an r and python environment. You can generate the manifest locally with rsconnect::writeManifest()to inspect it before you deploy.

This will take some time to figure out.
The library that seems to be causing issues is Bioconductor - basilisk and I didn't even configure this library to run in this app. The app relies on vitessceR ( which uses zellkonverter to parse its data into formats it can read/write from, BOTH of these use Basilisk to "freeze" python dependencies via Reticulate. So I don't know if that resource helps much because not only do I need to figure out how to manage conda environments for reticulate on RSC, without using reticulate, but also figure out which basilisk environment is causing the error (its probably both) . I'm starting by looking at what RSC needs to know from reticulate and figuring out what basilisk is telling reticulate to do.