Skip to content

Uncaught in promise: Mapbox error #2345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jackparmer opened this issue Feb 7, 2018 · 15 comments
Closed

Uncaught in promise: Mapbox error #2345

jackparmer opened this issue Feb 7, 2018 · 15 comments
Labels
bug something broken

Comments

@jackparmer
Copy link
Contributor

jackparmer commented Feb 7, 2018

This map throws a Mapbox+Plotly.js console error on load and does not fire any selection events afterwards:
Uncaught (in promise) Error: Mapbox error.

https://plot.ly/~jackp/18343/

This map is the exact same Plotly graph, but has different geojson overlayers. It does not fire any console errors and responds to selection events.

https://plot.ly/~jackp/18345/

I'm guessing mapbox-gl is having an issue with the geojson in Graph1, but not in Graph2. The geojson for problematic Graph1 is here for convenience:

https://github.com/jackparmer/mapbox-counties/tree/master/1999

It would be nice if the mapbox error was caught and Plotly.js events still fired for Graph1.

@jackparmer jackparmer added the bug something broken label Feb 7, 2018
@etpinard
Copy link
Contributor

etpinard commented Feb 7, 2018

I think this happens when the geojson source data is (somewhat) invalid.

We should try running http://geojsonlint.com/ on those geojsons

@jackparmer
Copy link
Contributor Author

We should try running http://geojsonlint.com/ on those geojsons

I did some linting with this project and didn't find any issues: https://github.com/mapbox/geojsonhint

http://geojsonlint.com/ has some right-hand rule guidance but it's the same for the working and non-working geojson files.

@etpinard
Copy link
Contributor

etpinard commented Feb 7, 2018

Looks like plain mapbox-gl (even their latest version v.0.44.0) outputs the same error. From https://codepen.io/etpinard/pen/aqBLgv?editors=0010, I get

image

Maybe we should open a bug report there?


It would be nice if the mapbox error was caught and Plotly.js events still fired for Graph1.

I can catch that error no problem. But I don't get why events wouldn't get triggered regardless. How are you attaching your event handlers?

@leejt489
Copy link

leejt489 commented Jun 2, 2018

Hi, I'm also getting a similar error. I have a map that loads fine, but then when I update it with a slider this error fires in browser with the callback to update. Any update? I think my GeoJSON is fine.

@etpinard
Copy link
Contributor

etpinard commented Jun 4, 2018

@leejt489 can you please share the problematic geojson in question? Better yet, can you a reproducible plotly.js or mapbox-gl example? That way we can determine if it is a problem with plotly.js or mapbox-gl. Thanks.

@leejt489
Copy link

leejt489 commented Jun 7, 2018

Sure, see the Dash app code here https://github.com/leejt489/solar-reliability-cost-web. I dumped the geojson files into the debug folder. The error arises not the first time the map is loaded, but when the slider is adjusted. Maybe it's a dash (or my) error but this issue was the best I could find.

@leejt489
Copy link

leejt489 commented Jun 11, 2018

@etpinard see the live app here https://solar-reliability-cost.herokuapp.com/. On Chrome dev tools, the error appears after hitting the "Update Map" button

@etpinard
Copy link
Contributor

@leejt489 which geojson file is used after clicking on Update Map?

@leejt489
Copy link

Each of the files in the debug folder are used for a different layer

@leejt489
Copy link

@etpinard I'm seeing that when I click "update map" multiple times, the layout only updates after the first click. The data property updates correctly, and I can see numbers change when I hover over the map, but the layers aren't re-rendered. I updated the heroku app today, and corresponding code is on the dev branch https://github.com/leejt489/solar-reliability-cost-web/tree/dev Thanks!

@etpinard
Copy link
Contributor

etpinard commented Jun 13, 2018

@leejt489 I appreciate your help, but it's a little hard for us to debug dash apps. We wrote instructions on how dash users can help us debug, if you're willing to spend more time on this issue.

Now, I think #2734 fixed your issues as it fixes Plotly.react for mapbox layout layers (newer versions of dash uses Plotly.react to update).

Unfortunately, you'll have to wait for us to make a new release before seeing changes in your dash app.

@leejt489
Copy link

Thanks, what kind of a release schedule do you use; how long until the next release?

@leejt489
Copy link

leejt489 commented Jul 3, 2018

@etpinard Hi, I just wanted to check if you anticipate a release this week, or if there is a workaround. This is becoming a blocking issue for a demo I have next week. Thanks!

@etpinard
Copy link
Contributor

etpinard commented Jul 3, 2018

Yes, we'll release 1.39.0 this weejk.

@etpinard
Copy link
Contributor

etpinard commented May 17, 2019

Getting 404s on those geojsons now. I suspect this ticket is obsolete. Closing (for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

3 participants