Publish error in shiny

I am running a simple shiny app


ui <- fluidPage( 
  textInput("ID", "Enter your ID:", "5"), 

server <- function(input, output, session) { 
  output$tbl <- renderTable({ 
    conn <- dbConnect( 
      drv = RMySQL::MySQL(), 
      dbname = "shinydemo", 
      host = "", 
      username = "guest", 
      password = "guest") 
    on.exit(dbDisconnect(conn), add = TRUE) 
    query <- paste0("SELECT * FROM City WHERE ID = '", input$ID, "';") 
    dbGetQuery(conn, query) 

shinyApp(ui, server)

It works fine locally in RStudio but when i try to publish it , the deployment fails with error :

Listening on
Error in function (type, msg, asError = TRUE)  : 
  SSL certificate problem: unable to get local issuer certificate
Timing stopped at: 0.85 0.22 1.99

Can someone please help

Hi, which application server are you deploying to?

If it's, you might try the fixes described at SSL certificate problem when deploying to and let us know if any of them work for you.

Similar issue resolved in a support ticket by bypassing the certificate check:

options(rsconnect.check.certificate = FALSE)

This can be caused by outdated CA certificates on the host. Updating the root CA certificates on the OS is another alternative.