This repository was archived by the owner on Jun 21, 2023. It is now read-only.
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Offline downloading fails with HTTP 401 status code #670
Open
Description
Hello,
I have created a custom style using the Mapbox Studio, which contains the mapbox-mapbox-terrain-dem-v1
source, as I aim to read elevation data from it. Here is the link to the style.
Using the style in a MapView works fine, however, when I attempt to use the OfflineManager
and OfflineTilePyramidRegionDefinition
to create an offline region with this style, the download fails with HTTP status code 401.
Here is an excerpt from logcat:
This request was cancelled (https://a.tiles.mapbox.com/raster/v1/mapbox.mapbox-terrain-dem-v1/1/0/1.png?access_token=*REDACTED*&offline=true). This is expected for tiles that were being prefetched but are no longer needed for the map to render.
2021-05-12 13:01:45.293 24222-24222/sk.lukaskusik.navipilot E/OfflineMapsManager$downloadCountry: onError reason: REASON_OTHER
2021-05-12 13:01:45.293 24222-24222/sk.lukaskusik.navipilot E/OfflineMapsManager$downloadCountry: onError message: HTTP status code 401
Accessing the url https://a.tiles.mapbox.com/raster/v1/mapbox.mapbox-terrain-dem-v1/1/0/1.png?access_token=*REDACTED*&offline=true)
in browser returns {"message":"Unauthorized"}
As access_token, I have used my public key and also another key will all of the scopes enabled, with no result.