Error in deploying a Shinyapp to shinyapps.io

Dear friends,

I am trying to deploy an application to shinyapps.io. The app works perfectly on my local computer.
But during build, it launches a browser but with such page:

An error has occurred
The application failed to start: exited unexpectedly with code 1


Attaching package: ‘shinydashboard’

The following object is masked from ‘package:graphics’:

    box


Attaching package: ‘shinyjs’

The following object is masked from ‘package:shiny’:

    runExample

The following objects are masked from ‘package:methods’:

    removeClass, show


Attaching package: ‘shinyWidgets’

The following object is masked from ‘package:shinyjs’:

    alert


Attaching package: ‘shinydashboardPlus’

The following object is masked from ‘package:shinyWidgets’:

    progressBar

The following objects are masked from ‘package:shinydashboard’:

    box, dashboardHeader, dashboardPage, dashboardSidebar, messageItem,
    notificationItem, taskItem

The following object is masked from ‘package:graphics’:

    box

Error in value[[3L]](cond) : 
  invalid multibyte character in parser at line 28
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

Any ideas on the source of problem?
Best KH

This seems like a local encoding issue, try setting options(encoding = "UTF-8") before deploying (Or a more suitable encoding for your specific case)

Thank you for your input, andresrcs!

I am not quite following here. I tried setting the code in my console as you suggested. options(encoding = "UTF-8").
Then I attempted to run the App on my local server. It gave me an error as this:

Warning in readLines(file, warn = FALSE) :
  invalid input found on input connection 'www/SymptomData.R'
Error in source("www/SymptomData.R", local = T) : 
  www/SymptomData.R:28:32: unexpected INCOMPLETE_STRING
27: PWHO<-PWHO[,-c(3:5,7:13)]
28: rownames(PWHO)[rownames(PWHO)=='Côte d
                                   ^

After I deleted certain lines of code, it gave me another error as:

Warning in readLines(file, warn = FALSE) :
  invalid input found on input connection 'www/SymptomData.R'
Warning in file(file, "rt") :
  InternetOpenUrl failed: 'The operation timed out'
Error in file(file, "rt") : cannot open the connection

Was I doing your way correctly?
Many thanks and stay healthy!

anyway, you have inspired me on the problem of encoding. So I just followed the error message to check which line included special characters, and got rid of them, now the deployment works well :smiley:
Many thanks!