You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
leaflet 2.0.2 works on shiny-server, but when I upgrade to 2.0.3 got this error message:
Warning: Error in value[[3L]]: Couldn't normalize path in addResourcePath, with arguments: prefix = 'leaflet-providers-1.9.0'; directoryPath = '/tmp/RtmpMiDSq7'
I try to memoise leaflet map with points by R.cache and load cache then. Here I wrote a smaller example to reproduce this error (please change file name to app.R). It also works for leaflet 2.0.2 but got the same message for 2.0.3.
The first time running this app.R (i.e. save cache) should be ok.
But when starting a new session (or Restart R on Rstudio) and re-run this app.R (i.e. load cache) on shiny-server or Rstudio, got the aboving error. Not sure, but it seems that shiny or leaflet 2.0.3 will store some leaflet-providers-1.9.0 information in temporary fille ('/tmp/Rtmpxxxx'). After that (new session or maybe this Rtmpxxxx being cleared), loading cache got errors.
I would definitely encourage you not to persist leaflet objects this way! They're not designed for it, and we don't guarantee (or even attempt to maintain) backward compatibility of serialized leaflet objects.
Would it be possible to cache just the data itself, and turn it into a leaflet object only at runtime? If I'm understanding this code correctly, the difference in performance should be minimal, as I'd expect leaflet() %>% addProviderTiles() %>% setView() to be nearly instantaneous regardless of data.
In my original code, I also cache my data points along with leaflet map. But for your point of view about backward compatibility, I'll follow your suggestion. Thanks for the information.
leaflet 2.0.2 works on shiny-server, but when I upgrade to 2.0.3 got this error message:
Warning: Error in value[[3L]]: Couldn't normalize path in
addResourcePath
, with arguments:prefix
= 'leaflet-providers-1.9.0';directoryPath
= '/tmp/RtmpMiDSq7'I try to memoise leaflet map with points by R.cache and load cache then. Here I wrote a smaller example to reproduce this error (please change file name to app.R). It also works for leaflet 2.0.2 but got the same message for 2.0.3.
https://github.com/cywhale/ODB/blob/master/shiny_memoised_cache/app_test_leaflet_vers01.R
The first time running this app.R (i.e. save cache) should be ok.
But when starting a new session (or Restart R on Rstudio) and re-run this app.R (i.e. load cache) on shiny-server or Rstudio, got the aboving error. Not sure, but it seems that shiny or leaflet 2.0.3 will store some leaflet-providers-1.9.0 information in temporary fille ('/tmp/Rtmpxxxx'). After that (new session or maybe this Rtmpxxxx being cleared), loading cache got errors.
I also put it on my server, after cleaning cached data manually by me, and then can re-run it.
https://bio.odb.ntu.edu.tw/sample-apps/leaflet1/
The log file on /var/log/shiny-server (with whole message log)
https://github.com/cywhale/ODB/blob/master/shiny_memoised_cache/app_test_leaflet_vers_shinyserver.log
sessionInfo()
The text was updated successfully, but these errors were encountered: