Error when deploying app at shinyapps.io

I have an app that is failing to deploy in shinyapps.io. The data is in the same folder the .R files are. Locally it runs perfectly. Any help would be greatly appreciated. (fc_auxiliares.R is a helper script with plotting functions)

Error

Error in renv_snapshot_validate_report(valid, prompt, force) : 
  aborting snapshot due to pre-flight validation failure
Calls: <Anonymous> ... snapshotRenvDependencies -> <Anonymous> -> renv_snapshot_validate_report

CODE

options(shiny.maxRequestSize = 200*1024^2)

# Package names
library(shinydashboard)
library(flexdashboard)
library(shinythemes)
library(shinyWidgets)
library(shinyjs)
library(thematic)
library(glue)
library(ggplot2)
library(stringr)
library(connectapi)
library(tidyverse)
library(RColorBrewer)
library(ggmap)
library(maps)
library(geosphere)
library(dplyr)
library(plotly)
library(sp)
library(viridis)
library(geojsonio)
#Load data
datos = read.csv('data_aeropuertos.csv') 
datos$mes_name <- factor(datos$mes_name, levels=c('Ene', 'Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'))
datos$fecha_datetime <- factor(datos$fecha_datetime, levels=c('Lun','Mar','Mie','Jue','Vie','Sab','Dom'))
aeropuertos = read.csv('aeropuertos_detalle.csv', sep=';') 
library(geojsonio)
provincias <- geojson_read("provincias.json", what = "sp") 

#Helper functions 2 plot
source('fc_auxiliares.R')

ui <- fluidPage(theme = shinytheme("readable"),
    titlePanel(h1("...", align="center")),
   
    fluidRow(width=12, style = "background-color: #95c2c9; padding: 10px", 
             h5('...'),
             p('....') ),
    
    
    # #------------------------------------------------------------------------------------------------------------
    fluidRow(width=12,style = "background-color: #badbe0; padding: 20px ",
             # h5('..'),
             
             p("...."),
             ),
    
    # #------------------------------------------------------------------------------------------------------------
    fluidRow(align='left',style="text-align: justify;",
        column(width = 6, 
               plotlyOutput('VUELOS.X.ANIO')),

        column(width = 6, h3('...'),
                            p(".....")     
                 
        ) ),
    # #------------------------------------------------------------------------------------------------------------
    fluidRow(style = "border: 4px double blue;",align='center',style="text-align: justify;",

        column(width = 6, h3('....'),
              
               p(".."),
               ),

        column(width = 6,align='center',
               radioGroupButtons(inputId = "radio_vuelos_mes",
                   label = "",
                   choices = c('Todos', 'Domestico', 'Internacional'),
                   selected = 'Todos',
                   status = "success"),
               plotlyOutput('VUELOS.MES')
        ) ),
    # #------------------------------------------------------------------------------------------------------------
    fluidRow(align='center',style="text-align: justify;",
        column(width = 8,align='center',
               radioGroupButtons(inputId = "radio_vuelos_semanal",
                                 label = "",
                                 choices = c('Todos', '2019', '2020','2021', '2022','2023'),
                                 selected = 'Todos',
                                 status = "info"),
               plotlyOutput('VUELOS.SEMANAL')
        ),


        column(width = 4, align='center',style="text-align: justify;",
               h3('....'),
               
               p("....")
        ) ) ,
    # #------------------------------------------------------------------------------------------------------------

    fluidRow(style = "border: 4px double blue;",align='center',style="text-align: justify;",
        column(width = 3,h3("....."),
             
               p(".......")
               
        ),
        column(width = 9, align='center',
               radioGroupButtons(inputId = "radio_promDiario",
                                 label = "",
                                 choices = c('Todos', 'Domestico', 'Internacional'),
                                 selected = 'Todos',
                                 status = "success"),
               plotlyOutput('PROM.DIARIO')
        ) ),
    #------------------------------------------------------------------------------------------------------------

    fluidRow(align='center',style="text-align: justify;",
        column(width = 8,     align='center',
               radioGroupButtons(inputId = "radio_empresas",
                                 label = "",
                                 choices = c('Todos', '2019', '2020','2021', '2022','2023'),
                                 selected = 'Todos',
                                 status = "info"),
               plotlyOutput('TOP.EMPRESAS')
        ),
        column(width =4, h3('.....'),
            
               p("....")
               
        )  ),
    #------------------------------------------------------------------------------------------------------------
    fluidRow(style = "border: 4px double blue;",align='center',style="text-align: justify;",
             column(width = 4, h3('......'),
                    p("....."),
                    
                    p("....")
             ),
             column(width = 8,align='center',
               radioGroupButtons(inputId = "radio_par_ori_dest",
                                 label = "",
                                 choices = c('Todos', '2019', '2020','2021', '2022','2023'),
                                 selected = 'Todos',
                                 status = "info"),
               plotlyOutput('ORI.DEST'))
             ),
    #------------------------------------------------------------------------------------------------------------
    fluidRow(align='center',style="text-align: justify;",
        column(width = 6, align = "center",
               plotlyOutput('MAPITA')
        ),
        column(width=6, align='center', style="text-align: justify;", 
               h3('......'), 
               
               p("......"),
               radioGroupButtons(inputId = "rd_mapa",
                                 label = "",
                                 choices = c('Todos', '2019', '2020','2021', '2022','2023'),
                                 selected = 'Todos',
                                 status = "info"),
               sliderInput("slider_mapa", "Seleccionar rango de número de vuelos anuales",
                           min = 0, max = 1100, value = c(300, 500))
               
               
               )),
    
    )



server <- function(input, output) {    

    # NRO VUELOS X ANIO
    output$VUELOS.X.ANIO = renderPlotly({ despegues_x_anio(datos) })
   
    # ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 
    # NRO VUELOS X MES
    anio_vuelos_x_mes = reactive({ input$radio_vuelos_mes }) #Obtengo el chbox elegido; luego accedo a el usando anio_vuelos_x_mes()
    output$VUELOS.MES= renderPlotly({vuelos_mensuales(datos , anio_vuelos_x_mes() ) }) #Ejecuto la fc para plotear el grafico
    
    # ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 
    # VUELOS X DIA DE LA SEMANA
    anio_vuelo_semanal = reactive ({ input$ radio_vuelos_semanal})
    output$VUELOS.SEMANAL = renderPlotly({vuelos_semanales(datos , anio_vuelo_semanal() ) }) 
    
    # ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 
    # PROMEDIO DIARIO DE VUELOS
    tipo_vuelo_promDiario = reactive ({ input$radio_promDiario})
    output$PROM.DIARIO = renderPlotly({promedio_dia(datos, tipo_vuelo_promDiario() ) }) 
    
    # ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 
    # TOP EMRPESAS
    aerol = reactive ({ input$radio_empresas})
    output$TOP.EMPRESAS = renderPlotly({airlines(datos, aerol() ) }) 
    
    # ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 
    # PARES ORIGEN-DESTINO
    rd_ori_dest = reactive ({ input$radio_par_ori_dest})
    output$ORI.DEST = renderPlotly({pair_airports(datos , rd_ori_dest() ) }) 
    
    
    # ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- 
    radio_map  = reactive ({ input$rd_mapa})
    limInf = reactive({input$slider_mapa[1]})
    limSup = reactive({input$slider_mapa[2]})
    output$MAPITA = renderPlotly({plot_mapa(provincias, datos , aeropuertos , radio_map(), limInf(), limSup() ) }) 
    
}



shinyApp(ui = ui, server = server)

I'm also having this issue after updating rsconnect.

I tried updating the "cli" package and it seems to work now. (also updated shiny)

Does anyone have an update or any ideas?

I have this issue when deploying via a GitHub Action. When I use an older docker base image (rocker/shiny:4.2.0) I get
Error: HTTP 426 GET https://api.shinyapps.io/v1/users/current/ The rsconnect package is out of date.

With a later image (rocker/shiny:4.3.1) I get the pre-flight validation failure mentioned above.

I also tried explicitly installing cli, rsconnect, and renv in the docker image, doesn't help.
The deployment from my local environment with deployApp(...) first fails with

Error: Unhandled Exception: Child Task 1329944255 error: Unhandled Exception: 599
In addition: Warning message:
package ‘remotes’ was built under R version 4.1.3

...but on a second attempt it works (?). I still didn't get it to work again using the Dockerfile, and it was working some weeks ago.

These issues are related:
https://stackoverflow.com/questions/76775820/how-to-adress-this-error-error-in-renv-snapshot-validate-reportvalid-prompt

https://forum.posit.co/t/shinyapps-io-deploy-error-409-application-exists-with-name/170488/3

Any help is appreciated!

Did you managed it to work?

After trying a lot of things I finally got the deployment to work again. I'm using rocker/shiny:4.3.1 as docker base image with shiny 1.7.3. In the docker build, I manually downgrade rsconnect again, as it was working before, with
remotes::install_version("rsconnect", "0.8.29")
According to this thread
https://forum.posit.co/t/shinyapps-io-deploy-error-409-application-exists-with-name/170488/13
there was a fix by Posit some 9 days ago, that's why the downgrade works again.