Locale problem at shinyapps

Hi! I'm just receiving an error at shinyapps with an app that was deploying without problemas days before.

During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C" 
2: Setting LC_COLLATE failed, using "C" 
3: Setting LC_TIME failed, using "C" 
4: Setting LC_MESSAGES failed, using "C" 
5: Setting LC_MONETARY failed, using "C" 
6: Setting LC_PAPER failed, using "C" 
7: Setting LC_MEASUREMENT failed, using "C" 
Error in parse(file, keep.source = FALSE, srcfile = src, encoding = enc) : 
  /srv/connect/apps/vizpns_dev/app.R:44:17: unexpected input
43:             uf = "Unidades da Federação",
44:             regi�
                    ^
Error in value[[3L]](cond) : 
  Error sourcing /srv/connect/apps/vizpns_dev/app.R
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

The special character in question is ã, inside the following code:

mutate(
        abr_tipo = recode(
            abr_tipo,
            uf = "Unidades da Federação",
            região = "Grandes Regiões",
            urb_rur = "Situação urbano/rural",
            gescol_resp_max = "Escolaridade do responsável pelo domicílio",
            rend_per_capita = "Rendimento domiciliar per capita",
            sexo = "Sexo",
            raça = "Raça/Cor",
            fx_idade = "Faixa de idade",
            fx_idade_18 = "Faixa de idade (18 anos ou mais)",
            capital = "Capitais",
            gescol = "Escolaridade",
            total = "Total"
        )

I run this before setting the UI and Server, creating an object for multiple purposes. I can start the app locally without problems. My session info:

R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=pt_BR.UTF-8      
 [2] LC_NUMERIC=C              
 [3] LC_TIME=pt_BR.UTF-8       
 [4] LC_COLLATE=pt_BR.UTF-8    
 [5] LC_MONETARY=pt_BR.UTF-8   
 [6] LC_MESSAGES=pt_BR.UTF-8   
 [7] LC_PAPER=pt_BR.UTF-8      
 [8] LC_NAME=C                 
 [9] LC_ADDRESS=C              
[10] LC_TELEPHONE=C            
[11] LC_MEASUREMENT=pt_BR.UTF-8
[12] LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets 
[6] methods   base     

other attached packages:
 [1] sf_1.0-2             leafgl_0.1.1        
 [3] leaflet.extras_1.0.0 leaflet_2.0.4.1     
 [5] writexl_1.4.0        DT_0.18             
 [7] highcharter_0.8.2    forcats_0.5.1       
 [9] stringr_1.4.0        dplyr_1.0.7         
[11] purrr_0.3.4          readr_2.0.1         
[13] tidyr_1.1.3          tibble_3.1.4        
[15] ggplot2_3.3.5        tidyverse_1.3.1     
[17] bslib_0.2.5.1        shiny_1.6.0         

loaded via a namespace (and not attached):
 [1] fs_1.5.0           xts_0.12.1        
 [3] lubridate_1.7.10   bit64_4.0.5       
 [5] httr_1.4.2         tools_3.6.3       
 [7] backports_1.2.1    utf8_1.2.2        
 [9] R6_2.5.1           KernSmooth_2.23-18
[11] DBI_1.1.1          colorspace_2.0-2  
[13] withr_2.4.2        tidyselect_1.1.1  
[15] bit_4.0.4          curl_4.3.2        
[17] compiler_3.6.3     cli_3.0.1         
[19] rvest_1.0.1        xml2_1.3.2        
[21] sass_0.4.0         scales_1.1.1      
[23] classInt_0.4-3     askpass_1.1       
[25] proxy_0.4-26       rappdirs_0.3.3    
[27] digest_0.6.27      pkgconfig_2.0.3   
[29] htmltools_0.5.2    dbplyr_2.1.1      
[31] fastmap_1.1.0      htmlwidgets_1.5.3 
[33] rlang_0.4.11       readxl_1.3.1      
[35] TTR_0.24.2         rstudioapi_0.13   
[37] quantmod_0.4.18    jquerylib_0.1.4   
[39] generics_0.1.0     zoo_1.8-9         
[41] jsonlite_1.7.2     crosstalk_1.1.1   
[43] vroom_1.5.4        magrittr_2.0.1    
[45] rlist_0.4.6.1      Matrix_1.2-18     
[47] Rcpp_1.0.7         munsell_0.5.0     
[49] fansi_0.5.0        reticulate_1.20   
[51] lifecycle_1.0.0    stringi_1.7.4     
[53] yaml_2.2.1         grid_3.6.3        
[55] parallel_3.6.3     promises_1.2.0.1  
[57] crayon_1.4.1       lattice_0.20-41   
[59] haven_2.4.3        hms_1.1.0         
[61] pillar_1.6.2       igraph_1.2.6      
[63] reprex_2.0.1       glue_1.4.2        
[65] data.table_1.14.0  modelr_0.1.8      
[67] png_0.1-7          vctrs_0.3.8       
[69] tzdb_0.1.2         httpuv_1.6.2      
[71] cellranger_1.1.0   openssl_1.4.4     
[73] gtable_0.3.0       assertthat_0.2.1  
[75] cachem_1.0.6       mime_0.11         
[77] xtable_1.8-4       broom_0.7.9       
[79] e1071_1.7-8        later_1.3.0       
[81] rsconnect_0.8.24   class_7.3-17      
[83] units_0.7-2        ellipsis_0.3.2   

I solved this now enclosing all names with special characters with apostrophes.

mutate(
        abr_tipo = recode(
            abr_tipo,
            uf = "Unidades da Federação",
            `região` = "Grandes Regiões",
            urb_rur = "Situação urbano/rural",
            gescol_resp_max = "Escolaridade do responsável pelo domicílio",
            rend_per_capita = "Rendimento domiciliar per capita",
            sexo = "Sexo",
            `raça` = "Raça/Cor",
            fx_idade = "Faixa de idade",
            fx_idade_18 = "Faixa de idade (18 anos ou mais)",
            capital = "Capitais",
            gescol = "Escolaridade",
            total = "Total"
        )

Any clue about this change?

I believe this was a problem on their side.
They did a fix yesterday, but it still showed that message, in an app that was working already.
]But today I deployed again and it finally worked.

I believe that they finally fixed it

So far I think

Thanks! I tried a few hours ago, without success without apostrophes. I will check again tomorrow then.

I guess that'll help
Yesterday it didn't worked, and today it did, without any change.
I noticed when deploying a "rollforward" that usually it's not there, unless they fix something
check if you see it
"deploying: Starting instances
rollforward: Activating new instances
terminating: Stopping old instances"

good luck!

We are having similar issues since a while.
We have dashboards with a lot of data with special characters.
Since a while we are noticing an issue that seems to occur randomly. Maybe only certain servers are affected?
We are getting a similar log file, but at least our dashboard does not crash, we only can not see the special characters, or it prints the raw UTF-8 encoding...

Hi, Adam!

I recommend to wait some hours or next day.
I literally did nothing but wait.
Yesterday I had those "setting.. using C". I have a lot of spanish characters, so I refused to modify it further.

Maybe delete the rsconnect from your local folder that contains the app and try to deploy with the same name, but I'm not sure if that would help.

Let us know

I have the same problem in my apps. They seem to be working until late last week, and now users cannot upload their data files for processing.

https://forestquality.shinyapps.io/FQ_ResiProcessor/

During startup - Warning messages:
2021-08-25T11:40:54.942500+00:00 shinyapps[3661465] 1: Setting LC_CTYPE failed, using "C"
2021-08-25T11:40:54.942502+00:00 shinyapps[3661465]: 5: Setting LC_MONETARY failed, using "C"
2021-08-25T11:40:54.942502+00:00 shinyapps[3661465]: 6: Setting LC_PAPER failed, using "C"
2021-08-25T11:40:54.942500+00:00 shinyapps[3661465]: 2: Setting LC_COLLATE failed, using "C"
2021-08-25T11:40:54.942501+00:00 shinyapps[3661465]: 3: Setting LC_TIME failed, using "C"
2021-08-25T11:40:54.942502+00:00 shinyapps[3661465]: 7: Setting LC_MEASUREMENT failed, using "C"
2021-08-25T11:40:54.942501+00:00 shinyapps[3661465]: 4: Setting LC_MESSAGES failed, using "C"

Got an answer from email support.

We rolled back some code on Friday causing this issue when non-english characters were in the actual R code.

Looks like resolved now.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.