Have been successfully deploying several apps for a while with no issues, but I've just started getting the following error on deploys for a few different shiny apps that I'm trying to deploy to shinyapps.io:
Warning message:
renv took longer than expected (20 seconds) to activate the sandbox.
The sandbox can be disabled by setting:
RENV_CONFIG_SANDBOX_ENABLED = FALSE
within an appropriate start-up .Renviron file.
See `?renv::config` for more details.
── Preparing for deployment ────────────────────────────────────────────────────
✔ Deploying "dev-ufs-skills-data-catalogue" to "server: shinyapps.io / username: ..."
ℹ Creating application on server...
Error in `POST()`:
! <https://api.shinyapps.io/v1/applications/> failed with HTTP status
409
Application exists with name: dev-ufs-skills-data-catalogue
Backtrace:
▆
1. └─rsconnect::deployApp(...)
2. └─client$createApplication(...)
3. └─rsconnect:::POST_JSON(service, authInfo, "/applications/", json)
4. └─rsconnect:::POST(...)
5. └─rsconnect:::httpRequestWithBody(...)
6. └─rsconnect:::handleResponse(httpResponse, error_call = error_call)
7. └─rsconnect (local) reportError(json$error)
8. └─cli::cli_abort(...)
9. └─rlang::abort(...)
Execution halted
Error: Process completed with exit code 1.
I'm assuming the renv warning isn't relevant, but including just in case. I tried adding forceUpdate=TRUE to the deploy command, but that didn't help.
Any ideas on what's causing the deploy to not want to overwrite the existing app in this case?
same issue here - tried multiple times since last night (July 23, 2023)
Update:
Downgrading rsconnect via remotes::install_version("rsconnect", "0.8.29") solves the issue - see this post. Hope it also helps on your end, @richbielby.
Thanks for your quick reply! I have tried with the latest rsconnect and it does not work.
In this repo I have installed the latest rsconnect version (1.0.2), but still get the HTTP 409 error. I am using R version 4.2.1 for consistency reasons, as this is what we have in our development environment. However, using the latest rocker/R version also does not help. Do you have any ideas?
I think I have the same problem here (Debian Buster with R 3.5.2).
Everything was fine till 2 days ago.
Then rsconnect stops and tells me that I need to update the package (don't remember the exact message).
I update to 1.0.2.
Now both showProperties() and showLogs() give a "! Couldn't find any deployments matching supplied criteria." applications(), accounts() and accountInfo() show the right information, token included.
I have the similar issue, I updated to 1.0.2. and I get
── Preparing for deployment ────────────────────────────────────────────────────
Error in rsconnect::deployApp():
! This directory has been previously deployed in multiple places.
Please use appName, server or account to disambiguate.
Known applications:
• Spawner_Recruit_Bayes (server: shinyapps.io / userrname: XXXXX)
• Spawner_Recruit_Bayes (server: shinyapps.io / username: XXXXX):
Backtrace:
Hi @shaenzi
No I have never specified an appNmame. I am simply clidking RStudio Publish to Server Icon. Things I updated previously was separating file from single app.r to server.R and ui.R. So, in a way, I published to the server , either from single app.R, ui.R, and server.R from the same directory where the file is located. If that helps.
Is there some reason install.packages("rsconnect") still pulls the older version, and we have to use install_version to get the latest, without which we can no longer deploy to shinapps.io?
I think the installation takes your R version into account, and installs the version of the package that somehow fits (maybe was built under?) your R version.