Shiny: Rstudio crashes when starting shinyApp incl. renderPlot()

Created on 2 Jun 2017  ·  4Comments  ·  Source: rstudio/shiny

Short:
Rstudio crashes when I start a shinyApp that has a renderPlot() + plotOutput in it.
Running it in Chrome the console gives me: Uncaught TypeError: Cannot read property 'readyState' of null (shiny.min.js:3)

Example:
I open RStudio and create a new app:
RStudio -> File -> New File ->Shiny Web App
which gives me the standard "Old Faithful Geyser Data" app.

If I comment out plotOutput("distPlot") and run the app everything is fine.
However, if i run the app including plotOutput("distPlot"), I get:
R Session aborted - R encountered a fatal error,...

Technical details.
I am using RStudio 1.0.1.4.3 and shiny 1.0.3.
I removed and reinstalled RStudio as well as shiny.
(It happened when I ran an app from a SO question i wanted to answer, so it might have been that
i installed some packages prior to that, if that could possibly have any impact)

Most helpful comment

That solved it, thanks. I had troubles installing any packages, but after solving that, the mentioned checkBuilt = TRUE in update.packages(ask = FALSE, checkBuilt = TRUE) solved it.

All 4 comments

If you have recently upgrade to R 3.4.0, this is likely because you have an old version of the Cairo package that is causing the process to crash. Please read this:
http://shiny.rstudio.com/articles/upgrade-R.html

Can you include the output of devtools::session_info()? You may need to install the devtools package if you don't already have it.

Thanks for the fast reply!
I seem to have the latest package of Cairo. But also i experienced difficulties installing packages (e.g. reinstalling Cairo didnt work out - neither download and install locally nor the direct way).

The output of devtools::session_info():

setting value
version R version 3.4.0 (2017-04-21)
system x86_64, mingw32
ui RStudio (1.0.143)
language (EN)
collate German_Germany.1252
tz Europe/Berlin
date 2017-06-02

Packages ----------------------------------------------------------------------------------------------------------------------------
package * version date source
base * 3.4.0 2017-04-21 local
compiler 3.4.0 2017-04-21 local
datasets * 3.4.0 2017-04-21 local
devtools 1.13.0 2017-05-08 CRAN (R 3.3.2)
digest 0.6.12 2017-01-27 CRAN (R 3.3.2)
graphics * 3.4.0 2017-04-21 local
grDevices * 3.4.0 2017-04-21 local
memoise 1.1.0 2017-04-21 CRAN (R 3.3.3)
methods * 3.4.0 2017-04-21 local
stats * 3.4.0 2017-04-21 local
tools 3.4.0 2017-04-21 local
utils * 3.4.0 2017-04-21 local
withr 1.0.2 2016-06-20 CRAN (R 3.3.3)

I think you will need to reinstall most of your packages under R 3.4.0. Please read the document that I linked to above, in particular the sections "Detecting which version of R a package was built with" and "Reinstalling packages with the new version of R".

That solved it, thanks. I had troubles installing any packages, but after solving that, the mentioned checkBuilt = TRUE in update.packages(ask = FALSE, checkBuilt = TRUE) solved it.

Was this page helpful?
0 / 5 - 0 ratings