I have a Shiny for R app that has been deployed to shinyapp.io for several years and which I am now trying to deploy to Cloud Connect. Deployment using rsconnect::deployApp() returns an error consistently. I am not sure how to resolve this as the last_trace() output is pretty much the same as the error shown below. Any help would be greatly appreciated.
For context, I am deploying from Rstudio using a free tier Cloud Connect account.
── Preparing for deployment ──────────────────────────────────────────────────────────────
ℹ This is rsconnect 1.11.0
✔ Re-deploying "pmxcode" using "server: connect.posit.cloud / username: aaaaaaaa"
ℹ Looking up content with id "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"...
✔ Found content
ℹ Bundling 51 files: R//_disable_autoload.R, R//app_config.R, R//app_server.R, R//app_ui.R, R//covariates_server.R, R//covariates_ui.R, R//get_code.R, R//get_labelunit.R, R//get_model_lib_index.R, R//golem_utils_ui.R, R//info.R, R//modals.R, R//new_model_server.R, R//new_model_ui.R, R//pmxcode-package.R, R//resources.R, R//run_app.R, R//utils_code.R, …, DESCRIPTION, and app.R
ℹ Capturing R dependencies from renv.lock
✔ Found 62 dependencies
✔ Created bundle of size: 291,193b
ℹ Uploading bundle...
Error in `rsconnect::deployApp()`:
! Could not upload bundle.
Run `rlang::last_trace()` to see where the error occurred.
I'd suggest you paste the output of rang::last_trace() anyway, just in case...
It's not related to the error probably, but "_disable_autoload.R" is not necessary anymore, it's ignored by Connect Cloud. Try to drop it also, even if it seems unrelated to the error... Who knows
Thanks for chiming in. Removing the \_disable\_ autoload.R file did not change the outcomes. The deployment is still ending in failure with the same message.
As mentioned, the last_trace() does not provide any more information than the original error message.
> rlang::last_trace( drop = FALSE)
<error/rlang_error>
Error in `rsconnect::deployApp()`:
! Could not upload bundle.
---
Backtrace:
▆
1. └─rsconnect::deployApp(...)
2. └─cli::cli_abort("Could not upload bundle.")
3. └─rlang::abort(...)
I see. It seems like the deployment fails in the loading step, so may there be an issue with the configuration of your cloud connect account, a wrong token or similar? Try to delete the account in the "Publish" panel and reset it from scratch maybe?
After deleting my account information in Rstudio, I do not seem to be able to reconnect from the app (I can via the website - so my credentials seem OK). I tried multiple times after closing out of Rstudio and reopening the app.
ℹ Opening login page - confirm the code entered matches the code: RFWH-CSLF.
Error in if (errorCode == "authorization_pending") { :
the condition has length > 1
In the meantime, I've managed to deploy my app via the Posit Cloud Connect website and integration with my Github repo. So, I have this workaround at least
I don't know that this will change anything since I'm not sure yet what the problem is, but there have been a couple patch releases to rsconnect so you might try installing version 1.11.2.
If you could share the content id or the time of the error, i can check our logs to see if there is anything illuminating.
Thanks @samp and @emmawalter45 , updating rsconnect to the latest version seems to have done the trick.
For reference, I've used rsconnect::connectCloudUser() to reset my account connection to Cloud Connect. Then the deployment of my app went without a hitch.