Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maps are blank when previewing in RStudio on Windows with R 4.4.0 #918

Closed
AMBarbosa opened this issue May 1, 2024 · 6 comments
Closed

Comments

@AMBarbosa
Copy link

This was working fine with my previous version of R (4.3.2) on RStudio, but after updating R to version 4.4.0 on Windows (haven't updated R on Linux yet), I'm getting a blank map viewer every time I try a leaflet map (including the ?leaflet Examples), both with the previous and with the newest version of RStudio (released 2024-04-29). It's working OK on R without RStudio, though.

@Bevann
Copy link

Bevann commented May 2, 2024

I am also running into this issue. Mapview and tmap operations that rely on leafltet are also not rendering in viewer, or when displayed in browser.

@gadenbuie
Copy link
Member

There is a bug with R 4.4.0 on Windows that affects RStudio's preview of htmlwidgets (and other HTML content). Please follow the issue here for more information: rstudio/rstudio#14603

@AndrewMcMillanLandcare
Copy link

AndrewMcMillanLandcare commented May 6, 2024

Solution to problem:

I have just installed R Version 4.4.0 and upgraded Rstudio to v 2024.04.0 build 735. I was suddenly unable to use MapView with the same symptoms as described above. The Viewer pane just came up blank. This was also true for trying to display the widget produced by ggplotly in the plotly package.

Just by fluke I discovered by putting the command

options(viewer = NULL)

before the mapview command solved the issue.

For example, try:

library(mapview)
options(viewer = NULL)
mapview(breweries)

@gadenbuie gadenbuie changed the title leaflet() producing blank viewer on RStudio after updating R to 4.4.0 Maps are blank when previewing in RStudio on Windows with R 4.4.0 May 17, 2024
@gadenbuie gadenbuie pinned this issue May 17, 2024
@caballeroarturo
Copy link

caballeroarturo commented May 20, 2024

I'm still having the same issue. I tried the solution provided by @AndrewMcMillanLandcare, but it didn't work.
image

@gadenbuie
Copy link
Member

Have you tried the instructions mentioned here: rstudio/rstudio#14603 (comment)?

@AMBarbosa
Copy link
Author

AMBarbosa commented Jun 17, 2024

The instructions mentioned here by @gadenbuie worked, and now there's a more recent official release of R (4.4.1) where this issue comes fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants