I have been trying to debug this. The error seems to be related to either (a) reading the .csv file which contains all the strings needed to retrieve data from Yahoo Finance, or (b) the use of those strings in fromJSON or something in that process. I have tried setting encoding, but for some reason that generates an error (even though fromJSON documentation says I can); added it to the read.csv with no effect (found it only accepts latin1 when reading the file from disk).
Added this code based on an article regarding the same error I get:
Sys.setlocale("LC_CTYPE", "en_US.UTF-8")
Sys.setlocale("LC_ALL", "English")
with no effect.. The error looks like this:
2018-01-24T18:31:48.502578+00:00 shinyapps[260645]: Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, numerals = numerals, :
2018-01-24T18:31:48.502588+00:00 shinyapps[260645]: invalid multibyte string at '<a0>CLH18'
2018-01-24T18:31:52.944298+00:00 shinyapps[260645]: 53: type.convert
2018-01-24T18:31:52.750004+00:00 shinyapps[260645]: No encoding supplied: defaulting to UTF-8.
2018-01-24T18:31:52.919987+00:00 shinyapps[260645]: Warning: Error in type.convert: invalid multibyte string at '<a0>CLH18'
2018-01-24T18:31:52.944295+00:00 shinyapps[260645]: Stack trace (innermost first):
2018-01-24T18:31:52.944298+00:00 shinyapps[260645]: 52: read.table
2018-01-24T18:31:52.944299+00:00 shinyapps[260645]: 51: read.csv
2018-01-24T18:31:52.944300+00:00 shinyapps[260645]: 50: oil_prices [/srv/connect/apps/Market_Data/app.R#153]
2018-01-24T18:31:52.944300+00:00 shinyapps[260645]: 49: server [/srv/connect/apps/Market_Data/app.R#289]
2018-01-24T18:31:52.944301+00:00 shinyapps[260645]: 13
Any ideas would be very much appreciated. BTW it runs locally.