Skip to content
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

map.onError is not helpful by default #1549

Closed
scothis opened this issue Sep 24, 2015 · 6 comments
Closed

map.onError is not helpful by default #1549

scothis opened this issue Sep 24, 2015 · 6 comments
Labels
Milestone

Comments

@scothis
Copy link
Contributor

scothis commented Sep 24, 2015

The error message logged by the default onError handler within Map is often blank, and completely unhelpful.

https://github.com/mapbox/mapbox-gl-js/blob/v0.11.0/js/ui/map.js#L788

screen shot 2015-09-24 at 11 48 59 am

@jfirebaugh
Copy link
Contributor

This is likely specific to a certain type of error. This is what I see for a style validation failure, for example:

image

What do you see after clicking the disclosure triangle? Can you track down the source of this by other means?

@scothis
Copy link
Contributor Author

scothis commented Sep 24, 2015

Seems to be triggered by a tile 404ing

screen shot 2015-09-24 at 12 05 44 pm

@scothis
Copy link
Contributor Author

scothis commented Sep 24, 2015

Also, seeing a user report of tile 404s blocking the map load event.

laurenancona/philly-pope-map@9dce95a

@scothis
Copy link
Contributor Author

scothis commented Sep 24, 2015

Since we expect to receive a 404 for empty tiles, treating the response as an error seems wrong.

@jfirebaugh jfirebaugh added this to the 0.12 milestone Sep 26, 2015
@mjumbewu
Copy link

Yup, the error comes from the 'load-tile' worker process. It treats 404s the same as any other error. The fix/hack we used is mjumbewu@b058bdf, but I'm pretty sure that's not entirely reliable. Maybe https://github.com/mapbox/mapbox-gl-js/blob/6c59629/js/util/ajax.js#L48 should check for 404 and return a special type of error (or no error).

@lucaswoj
Copy link
Contributor

lucaswoj commented Dec 4, 2015

fixed in #1799

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

No branches or pull requests

4 participants