app will deploy but not parse

In hopes of helping others, please note that commenting out a multi-byte character (ex. ñ) will make parsing fail, even if deployment to shinyappsio is successful. Just remove them completely from app.R before deploying.

The following logs were based on this code.

r
library(shiny)

# unusedV <- c('Cañada College', 67)    # with a multi-byte char

FPg <- fluidPage(  
  titlePanel("to recreate the error: deployed but not parsed"),
  fluidRow( column(12,               # one column
    sliderInput(inputId ='n', label ='how many random numbers?', 
                              1, 3, value = 1, step = 1), 
    textOutput( outputId = 'ShowIt')  ) )
  )
Svr <- function(input, output) {
  output$ShowIt <- renderPrint({ cat('I got ', runif(input$n) ) })
  }                                  # uniform distrib. each from 0 to 1
shinyApp(ui = FPg, server = Svr)
> rsconnect::showLogs()
2019-05-02T03:02:38.925383+00:00 shinyapps[904259]: htmltools version: 0.3.6
2019-05-02T03:02:39.065902+00:00 shinyapps[904259]: 
2019-05-02T03:02:38.925368+00:00 shinyapps[904259]: RJSONIO version: NA
2019-05-02T03:02:39.060296+00:00 shinyapps[904259]: Using jsonlite for JSON processing
2019-05-02T03:02:39.098463+00:00 shinyapps[904259]: 
2019-05-02T03:02:39.084682+00:00 shinyapps[904259]: Warning in readLines(file, warn = FALSE) :
2019-05-02T03:02:39.065904+00:00 shinyapps[904259]: Starting R with process ID: '18'
2019-05-02T03:02:39.084683+00:00 shinyapps[904259]:   invalid input found on input connection '/srv/connect/apps/temp/app.R'
2019-05-02T03:02:39.098464+00:00 shinyapps[904259]: Listening on http://127.0.0.1:38468
2019-05-02T03:06:09.500133+00:00 shinyapps[904259]: Server version: 1.7.2-7
2019-05-02T03:06:09.500166+00:00 shinyapps[904259]: R version: 3.5.1
2019-05-02T03:06:09.500168+00:00 shinyapps[904259]: shiny version: 1.3.1
2019-05-02T03:06:09.500468+00:00 shinyapps[904259]: Using pandoc at /opt/connect/ext/pandoc2
2019-05-02T03:06:09.658450+00:00 shinyapps[904259]: Using jsonlite for JSON processing
2019-05-02T03:06:09.663689+00:00 shinyapps[904259]: 
2019-05-02T03:06:09.500170+00:00 shinyapps[904259]: httpuv version: 1.5.1
2019-05-02T03:06:09.663691+00:00 shinyapps[904259]: Starting R with process ID: '19'
2019-05-02T03:06:09.500205+00:00 shinyapps[904259]: rmarkdown version: NA
2019-05-02T03:06:09.687332+00:00 shinyapps[904259]: Warning in readLines(file, warn = FALSE) :
2019-05-02T03:06:09.500238+00:00 shinyapps[904259]: jsonlite version: 1.6
2019-05-02T03:06:09.500237+00:00 shinyapps[904259]: knitr version: NA
2019-05-02T03:06:09.687334+00:00 shinyapps[904259]:   invalid input found on input connection '/srv/connect/apps/temp/app.R'
2019-05-02T03:06:09.500254+00:00 shinyapps[904259]: htmltools version: 0.3.6
2019-05-02T03:06:09.712847+00:00 shinyapps[904259]: Error in value[[3L]](cond) : Error sourcing /srv/connect/apps/temp/app.R
2019-05-02T03:06:09.500160+00:00 shinyapps[904259]: LANG: en_US.UTF-8
2019-05-02T03:06:09.712849+00:00 shinyapps[904259]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
2019-05-02T03:06:09.500254+00:00 shinyapps[904259]: RJSONIO version: NA
2019-05-02T03:06:09.689092+00:00 shinyapps[904259]:   invalid multibyte character in parser at line 5
2019-05-02T03:06:09.712850+00:00 shinyapps[904259]: Execution halted
2019-05-02T03:06:09.689090+00:00 shinyapps[904259]: Error in parse(file, keep.source = FALSE, srcfile = src, encoding = enc) : 
2019-05-02T03:06:15.439576+00:00 shinyapps[904259]: LANG: en_US.UTF-8
2019-05-02T03:06:15.439536+00:00 shinyapps[904259]: Server version: 1.7.2-7
2019-05-02T03:06:15.439886+00:00 shinyapps[904259]: Using pandoc at /opt/connect/ext/pandoc2
2019-05-02T03:06:15.439578+00:00 shinyapps[904259]: R version: 3.5.1
2019-05-02T03:06:15.594690+00:00 shinyapps[904259]: 
2019-05-02T03:06:15.439583+00:00 shinyapps[904259]: shiny version: 1.3.1
2019-05-02T03:06:15.594693+00:00 shinyapps[904259]: Starting R with process ID: '36'
2019-05-02T03:06:15.589127+00:00 shinyapps[904259]: Using jsonlite for JSON processing
2019-05-02T03:06:15.636880+00:00 shinyapps[904259]: Execution halted
2019-05-02T03:06:15.439721+00:00 shinyapps[904259]: jsonlite version: 1.6
2019-05-02T03:06:15.615295+00:00 shinyapps[904259]:   invalid input found on input connection '/srv/connect/apps/temp/app.R'
2019-05-02T03:06:15.439584+00:00 shinyapps[904259]: httpuv version: 1.5.1
2019-05-02T03:06:15.615290+00:00 shinyapps[904259]: Warning in readLines(file, warn = FALSE) :
2019-05-02T03:06:15.439609+00:00 shinyapps[904259]: rmarkdown version: NA
2019-05-02T03:06:15.617254+00:00 shinyapps[904259]: Error in parse(file, keep.source = FALSE, srcfile = src, encoding = enc) : 
2019-05-02T03:06:15.439723+00:00 shinyapps[904259]: RJSONIO version: NA
2019-05-02T03:06:15.636876+00:00 shinyapps[904259]: Error in value[[3L]](cond) : Error sourcing /srv/connect/apps/temp/app.R
2019-05-02T03:06:15.439610+00:00 shinyapps[904259]: knitr version: NA
2019-05-02T03:06:15.617256+00:00 shinyapps[904259]:   invalid multibyte character in parser at line 5
2019-05-02T03:06:15.439724+00:00 shinyapps[904259]: htmltools version: 0.3.6
2019-05-02T03:06:15.636878+00:00 shinyapps[904259]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
> rsconnect::appDependencies()
       package  version source
1           BH 1.69.0-1   CRAN
2           R6    2.4.0   CRAN
3         Rcpp    1.0.0   CRAN
4       crayon    1.3.4   CRAN
5       digest   0.6.18   CRAN
6    htmltools    0.3.6   CRAN
7       httpuv    1.5.1   CRAN
8     jsonlite      1.6   CRAN
9        later    0.8.0   CRAN
10    magrittr      1.5   CRAN
11        mime      0.6   CRAN
12    promises    1.0.1   CRAN
13       rlang    0.3.1   CRAN
14       shiny    1.3.1   CRAN
15 sourcetools    0.1.7   CRAN
16      xtable    1.8-3   CRAN

Hi @mfh, as suggested in here, I think setting options(encoding = "UTF-8") before calling deployApp() fixes this issue (please mark this as the solution if it does)