shiny not working installed with conda

Hello,

the first example of shiny is not working if I install R and shiny with conda in ubuntu 18.04. I do this:
conda create -n r_env
conda activate r_env
conda install -c r r
conda install -c r r-shiny (or install.packages("shiny"))

Then I open rstudio and run this
shiny::runExample("01_hello")

and I can see the sliderInput but not the histogram. I open the webpage created by shiny and then the developer tools from Chrome and it says:

Uncaught SyntaxError: Unexpected number in JSON at position 16062
at JSON.parse ()
at ShinyApp.dispatchMessage (shinyapp.js:495)
at WebSocket.c.onmessage (shinyapp.js:112)

However if I install R in the system and shiny with install.packages (no conda involved) everything works perfectly.

Best

As far as I know, Shiny is not officially supported through conda so I think it would be better to point this out on a conda related forum.

Hello,
I am currently facing the exact same problem, and this is the only post I could find about it. Have you found any solution ? Or even narrowed down the search ?
Thanks in advance

Hello Etjean,

I didn't try the purposed solution, sorry.

I'm currently facing the same problem. I'd be thankful for any solutions or referrals to other communities that might be able to help.

Thanks!

We've found the cause of the problem. It appears to be an incorrect locale setting used by conda.
According to the documentation for Sys.setlocale, LC_NUMERIC should always be set to "C", but with conda, it may be set to a different value.

To fix it, you can run this in your R session:

Sys.setlocale("LC_NUMERIC", "C")

Please see here for more information: