Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

mbgl-offline should not hang when there's a 404/401 #15932

Description

@samfader

Related to #15819.

When using mbgl-offline to generate offline tiles and running into errors (i.e. a 401/404 error if you use the wrong token or something in your style does not properly describe the tiles you're trying to download), the script will hang. Here's an example where I purposefully used an incorrect style URL:

./mbgl-offline --north 71.44117085172385 --west -26.015625 --south 28.07198030177986 --east 28.916015625 --minZoom 4 --maxZoom 4 --output ~/europe.db --style mapbox://styles/developer/stylename --token {token}
0 / 1 resources0 / 0tiles (indeterminate); 0 bytes downloaded (- bytes/sec)
Response::Error::Reason::NotFound downloading resource: HTTP status code 404

The script simply hangs at that last line; one has to quit out and restart it after fixing the offending issue. This can be an especially annoying problem if you are missing a font or some other small resource that you'd be OK with not being included in the offline package.

It looks like we retry on 429 errors; could we include some type of retry logic for 404s? Or skip over that particular resource?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CoreThe cross-platform C++ core, aka mbgloffline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions