Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to replace existing shinyapps.io already published #1013

Closed
rasanderson opened this issue Oct 5, 2023 · 2 comments · Fixed by #1021
Closed

Unable to replace existing shinyapps.io already published #1013

rasanderson opened this issue Oct 5, 2023 · 2 comments · Fixed by #1021
Assignees

Comments

@rasanderson
Copy link

rasanderson commented Oct 5, 2023

If a shiny application has already been published on shinyapps.io it is no longer possible to replace it. Using version 1.0.1 of rsconnect a message box pops up in RStudio asking the user to confirm that the existing app will be replaced. After confirming, the following error is displayed:

Creating application on server...
Error in `POST()`:
<[https://api.shinyapps.io/v1/applications/]> failed with HTTP status
409
Application exists with name: expt_design
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

After downgrading rsconnect to version 0.8.29 and retrying an error message is displayed on Ubuntu 20.04, but not Windows 10. In Windows 10 downgrading to 0.8.29 provides a successful workaround for the problem. But in Ubuntu 20.04 the system detects that rsconnect is out-of-date and refuses to process it. Error message in Ubuntu 20.04 is:

Preparing to deploy document...Error: HTTP 426
GET https://api.shinyapps.io/v1/applications/?filter=account_id:668772&filter=type:shiny&filter=name:expt_design&count=100&offset=0
The rsconnect package is out of date.
 Please update to the latest available on CRAN.
Execution halted
The current environment shown by sessionInfo() in Ubuntu 20.04 is below:
sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.10       rstudioapi_0.14   knitr_1.43        magrittr_2.0.3    xtable_1.8-4      R6_2.5.1         
 [7] rlang_1.1.1       fastmap_1.1.1     tools_4.1.2       checkmate_2.2.0   xfun_0.39         cli_3.6.1        
[13] jquerylib_0.1.4   withr_2.5.0       askpass_1.1       htmltools_0.5.5   ellipsis_0.3.2    openssl_2.0.6    
[19] yaml_2.3.7        digest_0.6.31     rprojroot_2.0.3   lifecycle_1.0.3   shiny_1.7.4       later_1.3.1      
[25] sass_0.4.6        htmlwidgets_1.6.2 promises_1.2.0.1  curl_5.0.0        rsconnect_0.8.28  cachem_1.0.8     
[31] evaluate_0.21     mime_0.12         rmarkdown_2.21    bslib_0.4.2       compiler_4.1.2    learnr_0.11.4    
[37] backports_1.4.1   jsonlite_1.8.4    httpuv_1.6.11    
aronatkins added a commit that referenced this issue Oct 10, 2023
The stub deployment is subsequently used to look-up the application by name.
This lets showLogs, configureApp, setProperty, and unsetProperty interact with
shinyapps.io when the client lacks a deployment record.

Does not address issues with publishing, such as #1013.

Fixes #985
Fixes #989
@aronatkins aronatkins self-assigned this Oct 10, 2023
aronatkins added a commit that referenced this issue Oct 11, 2023
The stub deployment is subsequently used to look-up the application by name.
This lets showLogs, configureApp, setProperty, and unsetProperty interact with
shinyapps.io when the client lacks a deployment record.

Does not address issues with publishing, such as #1013.

Fixes #985
Fixes #989
@aronatkins aronatkins linked a pull request Oct 25, 2023 that will close this issue
@aronatkins
Copy link
Contributor

Would you mind testing the development version of rsconnect to confirm that we have resolved this problem?

remotes::install_github("rstudio/rsconnect")

@rasanderson
Copy link
Author

Hi - all works well now, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants