rstudio / rsconnect

Publish Shiny Applications, RMarkdown Documents, Jupyter Notebooks, Plumber APIs, and more
http://rstudio.github.io/rsconnect/
134 stars 82 forks source link

Inaccurate feedback from logs (restartApp()) #864

Closed ChaitaC closed 1 year ago

ChaitaC commented 1 year ago

RStudio Version 2023.08.0-daily+46 R-4.1.0 rsconnect

RemoteType: github RemoteSha: a3d883cbf3ff37fce603a7276cf7cbbec2c0ef12 Problem: The rsconnect::restartApp() function is designed to work exclusively with Shiny Servers. However, when a user attempts to use it for an app deployed on a Connect server, the logs provide inaccurate feedback.

Steps:

  1. Deploy an app on Posti Connect
  2. Navigate to IDE --> console
  3. Run rsconnect::restartApp( appName = "Your_app_name", server = "test_box", account = "Your_account_name")

Actual Result: restarting fails with the following error message

rsconnect::restartApp(appName = "appname", account = "testaccount", 
server = "test_box")
Restarting application...
Error in `POST()`:
! <http://xxxxxxx:xxx/__api__/applications/xxxx/deploy> failed with
 HTTP status 500

Run `rlang::last_trace()` to see where the error occurred.
> rlang::last_trace()
<error/rsconnect_http_500>
Error in `POST()`:
! <http://xxxxxxxx:xxxx/__api__/applications/xxxx/deploy> failed 
with HTTP status 500
ChaitaC commented 1 year ago

Verified

> rsconnect::restartApp( appName = "purgeapp-retest", server = "test_box", account = "chaitatest")
Error in `rsconnect::restartApp()`:
! `server` must be shinyapps.io
Run `rlang::last_trace()` to see where the error occurred.