ggiraph
ggiraph copied to clipboard
ggiraph is not working with R 4.4.0 for Windows
I just updated all packages, R to 4.4 and RStudio, and since then, I have only a white/blank Viewer window for any graph.
The following example gives me only a white viewer page.
library(ggplot2)
library(ggiraph)
p <- ggplot(mpg, aes( x = class, tooltip = class,
data_id = class ) ) +
geom_bar_interactive()
x <- girafe(ggobj = p)
x
It's interesting that when I open the Viewer in a new window, I get http://localhost:27646/session/viewhtml62642b817376/index.html with an error message "ERR_SOCKET_NOT_CONNECTED."
RStudio 2024.04.0+735 "Chocolate Cosmos" Release (a00d0e775dbc93e0d79a1bf474e3e8e8de677383, 2024-04-24) for windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2024.04.0+735 Chrome/120.0.6099.291 Electron/28.2.6 Safari/537.36, Quarto 1.4.554 (C:/Users/xeo19/AppData/Local/Programs/Quarto/bin/quarto.exe)
> sessionInfo()
R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)
Matrix products: default
locale:
[1] LC_COLLATE=Spanish_Spain.utf8 LC_CTYPE=Spanish_Spain.utf8
[3] LC_MONETARY=Spanish_Spain.utf8 LC_NUMERIC=C
[5] LC_TIME=Spanish_Spain.utf8
time zone: Europe/Madrid
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggiraph_0.8.9 ggplot2_3.5.1
loaded via a namespace (and not attached):
[1] vctrs_0.6.5 cli_3.6.2 rlang_1.1.3
[4] purrr_1.0.2 generics_0.1.3 jsonlite_1.8.8
[7] labeling_0.4.3 glue_1.7.0 colorspace_2.1-0
[10] htmltools_0.5.8.1 scales_1.3.0 fansi_1.0.6
[13] grid_4.4.0 munsell_0.5.1 tibble_3.2.1
[16] fastmap_1.1.1 yaml_2.3.8 lifecycle_1.0.4
[19] compiler_4.4.0 dplyr_1.1.4 htmlwidgets_1.6.4
[22] Rcpp_1.0.12 pkgconfig_2.0.3 rstudioapi_0.16.0
[25] farver_2.1.1 systemfonts_1.0.6 digest_0.6.35
[28] R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4
[31] pillar_1.9.0 magrittr_2.0.3 uuid_1.2-0
[34] tools_4.4.0 withr_3.0.0 gtable_0.3.5
I am with the latest version too but on macos and all seems ok (I used the cran versions as you)
Could you try to close all rstudio instances, then reinstall ggiraph and let me know if still the same issue?
I just tried it on posit cloud, and it also worked well. I will try what you said.
I just restarted windows and removed, reinstalled ggiraph without any change.
OK thanks
I don't have a windows machine for testing. I'll look for one to test (it works without RStudio as shown in github actions...)
I just tested the minimal example without RStudio, directly in R, and it works fine.
I just found this issue https://github.com/rstudio/rstudio/issues/14603
The R 4.4. patch worked. It seems an R issue on windows.