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

Description

@cvb941

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions