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

escape codes presented by IDE when target application deleted #1026

Open
aronatkins opened this issue Nov 9, 2023 · 1 comment
Open

escape codes presented by IDE when target application deleted #1026

aronatkins opened this issue Nov 9, 2023 · 1 comment
Assignees

Comments

@aronatkins
Copy link
Contributor

image

Steps to reproduce:

  1. deploy a Shiny application to a Connect server using push-button deployment in the RStudio IDE
  2. delete that Shiny application from Connect
  3. attempt to redeploy using the publish button in the RStudio IDE

This message includes an escape code because the IDE attempts to rewrite the application lookup error with:

https://github.com/rstudio/rstudio/blob/8244ebc49cc3188f04aa26bb2c2377aeda315817/src/cpp/session/modules/SessionRSConnect.R#L212-L218

You can see similar information locally with:

tryCatch({
    rsconnect:::getAppById(appId, account, server, hostUrl)
}, error=function(e)conditionMessage(e))

That produces (redacted by hand):

[1] "\033[38;5;232mCan't find app with id \"APP_ID\"\033[39m\n\033[1mCaused by error in `GET()`:\033[22m\n\033[38;5;232m\033[33m!\033[38;5;232m <https://SERVER_HOSTNAME/__api__/applications/APP_ID> failed with HTTP status 404\nThe requested object does not exist.\033[39m"

The rsconnect:::getAppById() function should produce output that can be included by the IDE in its UI.

@hadley
Copy link
Member

hadley commented Nov 10, 2023

Probably need to locally set options(crayon.enabled = FALSE).

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

No branches or pull requests

2 participants