basic leaflet map not showing in the viewer

Hey everyone, i am experiencing an issue with the package leaflet. after running the commands as shown below:

library(leaflet)
m <- leaflet() %>%
   addTiles()
m

my viewer just says: "/session/viewhtml30804347358/index.html?viewer_pane=1&capabilities=1&host=http%3A%2F%2F127.0.0.1%3A16788 not found"

i tried searching for solutions on stackoverflow and other r help sites, tried upgrading r studio version to the latest one, but nothing seems to work. can anyone help me?

many thanks

It works for me.

> sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=English_New Zealand.1252  LC_CTYPE=English_New Zealand.1252    LC_MONETARY=English_New Zealand.1252
[4] LC_NUMERIC=C                         LC_TIME=English_New Zealand.1252    

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

other attached packages:
[1] leaflet_2.0.3

loaded via a namespace (and not attached):
 [1] htmlwidgets_1.5.2 compiler_3.6.3    magrittr_1.5      R6_2.5.0          htmltools_0.5.0   tools_3.6.3       yaml_2.2.1       
 [8] tinytex_0.27      crosstalk_1.1.0.1 jsonlite_1.7.1    digest_0.6.27     xfun_0.19         rlang_0.4.8

stanleytan99, please run your example and then share your sessionInfo() as woodward did.
If you have an old package version it may be the cause.

Hi Woodward and Nirgrahamuk, many thanks for replying. Here is my sessionInfo output:

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

Matrix products: default

locale:
[1] LC_COLLATE=English_Singapore.1252
[2] LC_CTYPE=English_Singapore.1252
[3] LC_MONETARY=English_Singapore.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_Singapore.1252

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

other attached packages:
[1] leaflet_2.0.3 swirl_2.4.5

loaded via a namespace (and not attached):
[1] Rcpp_1.0.4.6 compiler_4.0.0
[3] bitops_1.0-6 tools_4.0.0
[5] testthat_3.0.0 digest_0.6.25
[7] jsonlite_1.7.1 evaluate_0.14
[9] rlang_0.4.6 crosstalk_1.1.0.1
[11] yaml_2.2.1 xfun_0.19
[13] httr_1.4.2 stringr_1.4.0
[15] knitr_1.30 htmlwidgets_1.5.2
[17] rprojroot_2.0.2 R6_2.5.0
[19] rmarkdown_2.5 magrittr_2.0.1
[21] htmltools_0.4.0 tinytex_0.27
[23] stringi_1.5.3 RCurl_1.98-1.2

I am using the latest version of leaflet, in a newer version of R. should i revert to the older version of R?

To whoever is reading this in the future, issue is solved by making sure you update all the relevant packages in r, such as rlang, leaflet etc. also update your version of r and rstudio. that works for me. (also ensure that all dependencies are installed).

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.