Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorizing Demo with API #771

Closed
mf16 opened this issue Jul 3, 2018 · 7 comments
Closed

Authorizing Demo with API #771

mf16 opened this issue Jul 3, 2018 · 7 comments

Comments

@mf16
Copy link

mf16 commented Jul 3, 2018

Happened on 2 different devices and versions right after logging in successfully. Astronaut just waves continuously.

07-03 15:33:13.461 3486-3486/com.mapbox.mapboxandroiddemo.debug V/ActivityThread: updateVisibility : ActivityRecord{d796302 token=android.os.BinderProxy@c07b0f4 {com.mapbox.mapboxandroiddemo.debug/com.mapbox.mapboxandroiddemo.account.LandingActivity}} show : false
07-03 15:33:13.501 3486-8069/com.mapbox.mapboxandroiddemo.debug W/System.err: org.json.JSONException: Value Unauthorized of type java.lang.String cannot be converted to JSONObject
        at org.json.JSON.typeMismatch(JSON.java)
        at org.json.JSONObject.<init>(JSONObject.java)
        at org.json.JSONObject.<init>(JSONObject.java)
        at com.mapbox.mapboxandroiddemo.account.AccountRetrievalService$1.onResponse(AccountRetrievalService.java:108)
        at com.google.firebase.perf.network.zzg.onResponse(Unknown Source)
        at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153)
        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java)
        at java.lang.Thread.run(Thread.java)
@langsmith
Copy link
Contributor

thanks @mf16 . I don't have any issues with this 🤔 What type of devices are you using?

@mf16
Copy link
Author

mf16 commented Jul 6, 2018

@langsmith hm, this is on a nexus 5 android 9 API 28 emulator, and s6 sm-g920f 6.0.1 API 23.

Happens on 2 different networks as well. If I put in incorrect login info, it tells me it's incorrect, but this returns string of "Unauthorized". I am on a pay as you go plan, is there some other account setting / feature I need enabled?

@langsmith
Copy link
Contributor

hm, ok I will look into it. Thanks.

You don't need to enable anything. The demo app is completely usable without signing in as well. Just tap on Skip for now at the bottom of the splash screen to go past the login/sign up splash screen

@mf16
Copy link
Author

mf16 commented Jul 6, 2018

When I do that I'm not able to access the offline maps section completely. The map is black with the error: 07-06 12:34:29.755 10298-10298/com.mapbox.mapboxandroiddemo.debug E/mbgl: {droiddemo.debug}[Setup]: loading style failed: HTTP status code 401

when trying to download I get: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.mapbox.mapboxsdk.maps.MapboxMap.getStyleUrl()' on a null object reference seemingly because that mapview never loaded

@langsmith

@langsmith
Copy link
Contributor

Did you install the app via the Play Store or installing locally? If you're installing it locally, have you set your Mapbox access token?: https://github.com/mapbox/mapbox-android-demo#setting-mapbox-access-token

@mf16
Copy link
Author

mf16 commented Jul 6, 2018

@langsmith sigh, one of those days /facepalm

@mf16 mf16 closed this as completed Jul 6, 2018
@langsmith
Copy link
Contributor

Don't I know it @mf16 😛 Glad we got it sorted. Thanks for checking Mapbox out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants