Open thomasneirynck opened 4 years ago
Uncaught (in promise) Error: Style is not done loading
at r._checkLoaded (mapbox-gl.js:33)
Uncaught (in promise) TypeError: Cannot read property 'version' of undefined
at r.serialize (mapbox-gl.js:33)
I've been getting these errors for years with an application I maintain. I rarely encounter this myself, but I see it in the error logs for other users. Would love to hear if anyone ever narrows it down!
Interesting, I've seen that error on this project I'm contributing as well
https://geochicasosm.github.io/lascallesdelasmujeres/
That map does not change full styles and I was wondering if it would be related to adding the GeoJSON data too soon somehow. In this project I've seen it pretty frequently in development so it should be easier to investigate.
Oh yeah I should mention that I am not using the ems-landing-page package (my bad I searched for this error on google and though I was in the mapbox-gl repo). I would presume that this error is unrelated to ems-landing-page and directly related to the underlying mapbox/mapbox-gl-js package.
thx @jacknkandy @jsanz for the confirmation.
Kibana explicitly waits for the Map:load
event before adding any data with addSource
https://docs.mapbox.com/mapbox-gl-js/api/map/#map.event:load
It doesn't seem like the ems-landing-page is doing this, so maybe this is the reason for the error logs.
On the women's streets project the viewer also waits for the load
event.
https://github.com/geochicasosm/lascallesdelasmujeres/blob/master/src/services/MyApp.js#L66-L76
I tried now to reproduce it there and I couldn't trigger the error, I'll keep checking.
I tried to reproduce the error without success: in development and on production, Firefox and Chromium browser, throttling the network, and switching basemaps but no luck :sweat:
Go to the landing page and switch a few boundary layers.
This will get logged:
The tiles will fail to show as well.
Haven't found a reliable way to reproduce.