Xaringan Infinite Moon Reader Addin

I'm attempting to use the really cool xaringan package for creating presentations but the Infinite Moon Reader Addin is not rendering the output correctly.

Here is a screenshot of what I see when I hit the Knit to moon_reader button (I'm Knitting the default Ninja Presentation template):

Infinite Moon Reader screenshot

Expanding the window will reveal the plain text of the RMarkdown document. The Open in Browser option displays the output just fine. I have not been able to diagnose what is going wrong and haven't located anyone documenting the same issue. Suggestions would be much appreciated.

I am using RStudio Version 1.1.345 and Version 0.4 of xaringan. My laptop was recently upgraded, to Windows 10. The Infinite Moon Reader Addin worked on my Windows 7 machine.

1 Like

I have heard a few Windows users report the same problem. I guess you have to open the presentation in an external browser if you use Windows (there seems to be some https issues with the Windows version of the RStudio IDE).


I'm on ubuntu 18.04 and have the same issue. When I view in browser the presentation is fine, but within Rstudio browser I see the same image as OP.

Below is my session info, I recently updated my packages after I upgraded to 18.04 so maybe some dependencies are not correct. Was a solution to this ever found?

Session info -----------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.4.4 (2018-03-15)
 system   x86_64, linux-gnu           
 ui       RStudio (1.1.456)           
 language en_GB:en                    
 collate  en_GB.UTF-8                 
 tz       Europe/London               
 date     2018-09-06                  

Packages ---------------------------------------------------------------------------------------
 package   * version date       source                         
 backports   1.1.2   2017-12-13 CRAN (R 3.4.3)                 
 base      * 3.4.4   2018-04-21 local                          
 compiler    3.4.4   2018-04-21 local                          
 datasets  * 3.4.4   2018-04-21 local                          
 devtools    1.13.6  2018-06-27 CRAN (R 3.4.4)                 
 digest      0.6.16  2018-08-22 CRAN (R 3.4.4)                 
 evaluate    0.10.1  2017-06-24 CRAN (R 3.4.2)                 
 graphics  * 3.4.4   2018-04-21 local                          
 grDevices * 3.4.4   2018-04-21 local                          
 htmltools   0.3.6   2017-04-28 CRAN (R 3.4.2)                 
 knitr       1.20    2018-02-20 CRAN (R 3.4.4)                 
 magrittr    1.5     2014-11-22 CRAN (R 3.4.2)                 
 memoise     1.1.0   2017-04-21 CRAN (R 3.4.2)                 
 methods   * 3.4.4   2018-04-21 local                          
 Rcpp        0.12.18 2018-07-23 CRAN (R 3.4.4)                 
 rmarkdown   1.10    2018-06-11 CRAN (R 3.4.4)                 
 rprojroot   1.3-2   2018-01-03 CRAN (R 3.4.3)                 
 rsconnect   0.8.8   2018-03-09 CRAN (R 3.4.4)                 
 stats     * 3.4.4   2018-04-21 local                          
 stringi     1.2.4   2018-07-20 CRAN (R 3.4.4)                 
 stringr     1.3.1   2018-05-10 CRAN (R 3.4.4)                 
 tools       3.4.4   2018-04-21 local                          
 utils     * 3.4.4   2018-04-21 local                          
 withr       2.1.2   2018-03-15 cran (@2.1.2)                  
 xaringan    0.7.1   2018-09-06 Github (yihui/xaringan@edbd4a7)
 xfun        0.3     2018-07-06 CRAN (R 3.4.4)                 
 yaml        2.2.0   2018-07-25 CRAN (R 3.4.4)                 

1 Like

The same for me on ubuntu 18.4. So, it's not a windows problem and reproducible.

I'm not able to reproduce using the v1.2 preview release -- if you're not already using it, could you give it a download and let us know how it goes?

Hello @kevinushey. I am using v1.2.1114 and just tried it again. The Infinite Moon Reader works as advertised now.


I would like to also confirm that the inf_moon_reader() function works as intended now that I have installed the preview release of RStudio (v.1.2.1237). Thank you.

I can confirm that I am encountering the same issue on a Windows machine. I am using RStudio Version 1.1.463

I had this same problem running RStudio 1.1.436 on Ubuntu 18.04:

R version 3.5.1 (2018-07-02)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Upgrading to RStudio 1.2.1322 solved it for me, moon_reader() now working as advertised.

Very nice!

I faced this issue intermittently over the past several months. After some detective work, I found that it was caused by a blocked link. In particular, if your ISP is blocking


then you will get this error.

Obviously, the preferred option is to get a better internet connection. If that is not possible, such as in a work environment, then it's possible to simply swap out the link in your HTML for a local file.

Happy knitting!

1 Like