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.

Getting occasionaly an 401-unauthorized while loading style #4763

Closed

Description

@tobrun

Platform: Android
Mapbox SDK version: 4.10

Steps to trigger behavior

  1. Open TestApp
  2. Navigate to an Activity using streets style

Expected behavior

Map is shown and style is loaded

Actual behavior

6/10 times it works and than it stops working for a short period of time.
When it fails to load I'm seeing a black screen and the following output in my console.

E/mbgl: [Setup]: loading style failed: HTTP status code 401

I have noticed this behaviour multiple times today.

Activity

  1. added
    Android
    on Apr 20, 2016
  2. added this to the android-v4.1.0 milestone on Apr 20, 2016
  3. tobrun commented on Apr 20, 2016

    @tobrun
    MemberAuthor

    It seems this occurs when we declare a style in xml and setup the accesstoken in code.
    This currently results in fetching the style without an accesstoken.

  4. tobrun commented on May 4, 2016

    @tobrun
    MemberAuthor

    I'm running into this on other examples. Strange enough this seems to occur primarily on a Nexus 6P. This is something we need to resolve before 4.1.0.

  5. added 2 commits that reference this issue on May 4, 2016
  6. tobrun commented on May 6, 2016

    @tobrun
    MemberAuthor

    63a0375 manages how styles are loaded by introduced a default state. When a style is defined in xml but a accesstoken isn't, the StyleInitializer will override the default style (MapboxStreets). This style is loaded at the same time as the default style would have been loaded. Subsequent calls to setStyle will cancel this action.

  7. added a commit that references this issue on May 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions