1

I updated my computer the other day (R, R Tools, and RStudio), and leaflet stopped working.

When I run this example in the RGUI it's very slow, but eventually it opens a web page in a browser.

When I run it in R Studio it's very slow, eventually the command finishes but nothing appears in the "view" tab, and R Studio keeps using more and more memory until I force kill it.

library(leaflet)

leaflet() %>% addTiles() %>% addMarkers(lng=174.768, lat=-36.852, popup="R")

I've tried a few things with my path, and installing leaflet from github, but there's not much to troubleshoot.

> sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 15063)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

loaded via a namespace (and not attached):
[1] compiler_4.0.0 tools_4.0.0

Edit 2020-05-09:

I reverted to R 3.6.2 and am no longer having the issue. Fortunately I could change it in R Studio's options so I can switch back to 4.0 if that becomes necessary.

I'm not adding this as an answer because it's a work around.

3
  • 1
    Maybe you could try to make sure you don't have any packages compiled under an earlier R version that may cause conflicts and would have to be reinstalled for R 4.0. (e.g. running update.packages(checkBuilt=TRUE)). Under R 4.0 under linux, I have no issue with your example, FWIW. Commented May 1, 2020 at 19:57
  • The checkBuilt option is new to me. It did something, but didn't change anything with Leaflet. Thanks
    – geneorama
    Commented May 4, 2020 at 15:01
  • Try downloading the most recent preview version of RStudio. This tip from Tim Salabim (author of mapview) worked for me. rstudio.com/products/rstudio/download/preview
    – bealhammar
    Commented May 17, 2020 at 15:46

1 Answer 1

1

Rstudio viewer problem has been adressed.

Rstudio developer :

This is a known issue with R 4.0.0 (exactly) that has been fixed by the R team in R 4.0.2.

see full post here: https://community.rstudio.com/t/rstudio-viewer-session-viewhtml-not-found/75592

1
  • 1
    Thanks. I wonder what caused it. It's annoying that they don't allow responses after 21 days, so if the exact same thing happens again there's no way to completely follow the thread unless you happen to find the newest and most recent post.
    – geneorama
    Commented Apr 14, 2021 at 13:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.