Publishing to connect server halts at "Capturing R dependencies from renv.lock" - why?

I'm trying to publish my Shiny app to a Posit Connect server for the first time. I can log into the server through my browser, and I followed the instructions for publishing using the "Publish -> Shiny App" button in browser. In my local Rstudio I've clicked the publish button, connected to the Connect server, and finally clicked Publish. This all seems good.

However, the deployment halts a few seconds after the renv.lock step. The full deployment tab output is below with some details censored. Unfortunately the error message is not informative, and googling hasn't turned up anything useful (so far). Is anyone able to diagnose what's going wrong?

── Preparing for deployment ────────────────────────────────────────────────────
✔ Deploying "gregs_shiny_app" to "server: fake_url / username: gstacey"
ℹ Creating application on server...
✔ Created application with id 2
ℹ Bundling 229 files: '.dockerignore', '.RData', 'compose-shiny-server.conf', 'dat.groups.RData', 'dat.RData', 'dat.stats.1.RData', 'dat.stats.2.RData', 'Dockerfile', 'global.R', 'mousexeno.code-workspace', 'prismDat.RData', 'README.md', 'renv.lock', 'restart.txt', 'server.R', 'test.pptx', 'test.pzfx', 'ui.R', …, 'www/js/main.js', and 'www/js/storage.js'
ℹ Capturing R dependencies from renv.lock
- Operation canceled.
Execution halted

To follow up, I've tried the solutions in "Dependency discovery" here https://cloud.r-project.org/web/packages/rsconnect/rsconnect.pdf. Specifically I've removed the renv.lock file and set options(rsconnect.packrat = TRUE) in both the console and global.R. The error message is slightly different but still fails quickly at the dependency step:

── Preparing for deployment ────────────────────────────────────────────────────
✔ Re-deploying "gregs_shiny_app" to "server: fake_url / username: gstacey"
ℹ Looking up application with id "1"...
✔ Found application <http://fake_url /content/612f602b-9cc2-bd61-9600-6b5d5ec2385c/>
ℹ Bundling 229 files: '.dockerignore', '.RData', 'compose-shiny-server.conf', 'dat.groups.RData', 'dat.RData', 'dat.stats.1.RData', 'dat.stats.2.RData', 'Dockerfile', 'global.R', 'mousexeno.code-workspace', 'prismDat.RData', 'README.md',  'restart.txt', 'server.R', 'test.pptx', 'test.pzfx', 'ui.R', …, 'www/js/main.js', and 'www/js/storage.js'
ℹ Capturing R dependencies with renv
[230/230] - Operation canceled.
Execution halted

I'm having the same issue with a simple shiny test app that includes a private gitlab repo. I've had earlier versions appear to deploy but unable to get github libraries to install. For some reason now that I've reset everything and started over, I can only get to this message, almost instantly after publishing

── Preparing for deployment ────────────────────────────────────────────────────
✔ Re-deploying "ixis-1" to "server: xyzpdq-384430540:9393 username: hello"
ℹ Looking up application with id "12"...
✔ Found application <http://hello-world:9393/content/xyzpdq-8cd7-4142-818e-123456978/>
ℹ Bundling 3 files: '.Rprofile', 'app.R', and 'renv.lock'
ℹ Capturing R dependencies from renv.lock
- Operation canceled.
Execution halted

I haven't successfully deployed my app, but I did get around this error by downgrading rsconnect as per here Unable to deploy on shinyapp.io - #3 by OGORO. Specifically

remotes::install_version("rsconnect", "0.8.29")

and attempting to republish now gets me to this error:

Preparing to deploy application...DONE
Uploading bundle for application: 2...Warning: 
DONE
Error in if (is.null(application$owner_username) || accountDetails$username ==  : 
  missing value where TRUE/FALSE needed
Calls: <Anonymous>

Can you try updating to the dev version of renv and rsconnect?

Exact same errors/issues here, I have it failing at capturing R dependencies from renv.lock. My colleague pulled it from git to another location and is now getting the username error.

Either install the latest version of rsconnect-1.0.1 and development renv (1.0.0.9000)

remotes::install_github("rstudio/renv") 
remotes::install_version("rsconnect", "1.0.1")

or revert to rsconnect-0.8.29

remotes::install_version("rsconnect", "0.8.29")
1 Like

This topic was automatically closed 54 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.