rstudio / shiny

Easy interactive web applications with R
https://shiny.posit.co/
Other
5.37k stars 1.87k forks source link

Shiny App using leaflet crashes on Windows 8/IE11 #600

Open fereshtehRS opened 10 years ago

fereshtehRS commented 10 years ago

This was reported by Alacer group. They have a client that uses Windows 8, and found out that this application does not work for them using IE11 on Windows 8:

http://opendata.alacergroup.com/testit

Ian verified that the app crashes on Windows 8. Joe's leaflet app (http://glimmer.rstudio.com/jcheng/leaflet-demo/) does not seem to have problem (but it very slow).

fereshtehRS commented 10 years ago

Comment from aaron.hoffer@alacergroup.com: (He is refering to the Superzip sample app, and their own app in this comment)

Both applications are laggy when the map is dragged. However, superzip behaves better than our app when the map is zoomed in a level.

Incorporating something like this (https://github.com/Leaflet/Leaflet.markercluster/blob/master/README.md) is probably the best solution for both application. Another alternative might be to use a choropleth map instead of drawing points on a map.

patilv commented 9 years ago

Can marker cluster be used now?

mbacou commented 9 years ago

I've also been testing a couple of shiny apps with the leaflet library. We found that they tend to fail on laggy wifi connections with erratic JS errors. I'm trying the SuperZip example now on Chrome and FF 30.0 and here are sample of messages logged to the console:

image

Another set of errors reported by a colleague today (app greys out before loading fully):

jquery.min.js:4 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/shiny.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/selectize/css/selectize.bootstrap3.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/datatables/css/dataTables.bootstrap.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/datatables/css/dataTables.extra.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/font-awesome/css/font-awesome.min.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/bootstrap/css/bootstrap.min.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/leaflet-legacy/leaflet.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/shiny.min.js.map Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/shiny.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/selectize/css/selectize.bootstrap3.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/datatables/css/dataTables.bootstrap.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/datatables/css/dataTables.extra.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/font-awesome/css/font-awesome.min.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/bootstrap/css/bootstrap.min.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/leaflet-legacy/leaflet.css Failed to load resource: the server responded with a status of 500 (Internal Server Error)
shiny.min.js.map:1 GET https://gallery.shinyapps.io/063-superzip-example/_w_d7327f71/shared/shiny.min.js.map 500 (Internal Server Error)

We've developed our own demo app and have had mixed success with our partners (e.g. working at the World Bank, not working at USAID): http://tools.harvestchoice.org/rainfall/

Shall we consider the shiny/leaflet interface very experimental at this stage and not roll it out? Thanks, --Mel.

jcheng5 commented 9 years ago

The "500 Internal Server Error" I believe is a recent bug in ShinyApps.io that we are trying to figure out. I'm much more concerned about what you're seeing at client sites. Can you send JavaScript console messages for whatever's happening with USAID?

mbacou commented 9 years ago

Hi Joe, I'll try to report specific errors as much as I can. Unfortunately I couldn't get console details from our clients there, but they all reported the app greying out after a few seconds. Another series of errors that were reported yesterday (this one from our demo app):

Error: http://tools.harvestchoice.org/rainfall/shared/shiny.min.js is being assigned a //# sourceMappingURL, but already has one
Use of Mutation Events is deprecated. Use MutationObserver instead. rainfall:1508
Use of attributes' specified attribute is deprecated. It always returns true. rainfall:154

I should note that this app also uses the dygraphs interface, which might also be a source of errors.

jcheng5 commented 9 years ago

I'm guessing the errors from yesterday were in Firefox, can you tell me what version and on what OS?

Shiny apps grey out when the connection with the server is lost. This can happen for a variety of reasons. The most helpful pieces of information for debugging are 1) the JavaScript console output, and 2) on the server there should be log files in /var/log/shiny-server/*.log. I would love to help you get to the bottom of this, feel free to email joe@rstudio.com if you want to share details privately.

jcheng5 commented 9 years ago

@mbacou: I spent some time today trying to get the rainfall app at https://github.com/harvestchoice/hc-shiny/tree/master/rainfall working so I could reproduce the disconnect I'm seeing on your server (tools.harvestchoice.org), but I get this error when the app tries to start:

Warning in gzfile(file, "rb") :
  cannot open compressed file '../../cell5m/rdb/g2_2014v15.rds', probable reason 'No such file or directory'
mbacou commented 9 years ago

Joe, thanks for your efforts. I've added the missing .rds resources to the Github repo, so the app should be self-contained now (aside from the download to 'GeoTIFF' and 'netCDF' formats that require access to the raw rasters, but these are over 2Gb). Change line 83 in ui.R if that causes problems:

# ui.R line 83
`ESRI Shapefile`="shp", GeoTIFF="tif", netCDF="nc", CSV="csv", STATA="dta"),
# change to
`ESRI Shapefile`="shp", CSV="csv", STATA="dta"),

In this app I'm using your original leaflet library https://github.com/jcheng5/leaflet-shiny, but we're also working on another viz using rstudio/leaflet.

Also trying to recruit a few good souls to test these apps more broadly (as well as at partner sites), so I can report client/server logs here more systematically...

mbacou commented 9 years ago

Yes yesterday's errors were on Windows 7 FF30.0 (I don't know more).

chris-holcomb commented 9 years ago

Just a side comment, but with respect to testing other environments. RSelenium appears to be a good option: http://johndharrison.github.io/RSOCRUG/#1, granted it currently does not go up to the latest versions (https://github.com/ropensci/RSelenium) , so you may still need to test those. I'd be interested in other options that Joe may be aware of.

nzwormgirl commented 7 years ago

I'm having a similar problem with a shiny app (https://shiny.niwa.co.nz/nzrivermaps/) running leaflet on Windows 7/IE11 (works fine on Chrome & Firefox). The app greys out after a few seconds but doesn't seem to do it consistently on every load. I have other apps that don't use leaflet running on the same server and they seem to work fine.

Any thoughts?

image