You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
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
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.
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.
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.
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.
Activity
tobrun commentedon Apr 20, 2016
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.
tobrun commentedon May 4, 2016
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.[android] #4930 - removed style url from layout xml, was running into #…
tobrun commentedon May 6, 2016
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.
[android] #4763 - introduce StyleInitializer class