{"action":"closed","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/6016","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-native","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/6016/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/6016/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/6016/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/6016","id":171255339,"number":6016,"title":"MapboxAccountManager not checking permission correctly onResume","user":{"login":"cammace","id":5652865,"avatar_url":"https://avatars.githubusercontent.com/u/5652865?v=3","gravatar_id":"","url":"https://api.github.com/users/cammace","html_url":"https://github.com/cammace","followers_url":"https://api.github.com/users/cammace/followers","following_url":"https://api.github.com/users/cammace/following{/other_user}","gists_url":"https://api.github.com/users/cammace/gists{/gist_id}","starred_url":"https://api.github.com/users/cammace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cammace/subscriptions","organizations_url":"https://api.github.com/users/cammace/orgs","repos_url":"https://api.github.com/users/cammace/repos","events_url":"https://api.github.com/users/cammace/events{/privacy}","received_events_url":"https://api.github.com/users/cammace/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/Android","name":"Android","color":"000000"},{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/bug","name":"bug","color":"0052cc"}],"state":"closed","locked":false,"assignee":{"login":"bleege","id":989928,"avatar_url":"https://avatars.githubusercontent.com/u/989928?v=3","gravatar_id":"","url":"https://api.github.com/users/bleege","html_url":"https://github.com/bleege","followers_url":"https://api.github.com/users/bleege/followers","following_url":"https://api.github.com/users/bleege/following{/other_user}","gists_url":"https://api.github.com/users/bleege/gists{/gist_id}","starred_url":"https://api.github.com/users/bleege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleege/subscriptions","organizations_url":"https://api.github.com/users/bleege/orgs","repos_url":"https://api.github.com/users/bleege/repos","events_url":"https://api.github.com/users/bleege/events{/privacy}","received_events_url":"https://api.github.com/users/bleege/received_events","type":"User","site_admin":false},"assignees":[{"login":"bleege","id":989928,"avatar_url":"https://avatars.githubusercontent.com/u/989928?v=3","gravatar_id":"","url":"https://api.github.com/users/bleege","html_url":"https://github.com/bleege","followers_url":"https://api.github.com/users/bleege/followers","following_url":"https://api.github.com/users/bleege/following{/other_user}","gists_url":"https://api.github.com/users/bleege/gists{/gist_id}","starred_url":"https://api.github.com/users/bleege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bleege/subscriptions","organizations_url":"https://api.github.com/users/bleege/orgs","repos_url":"https://api.github.com/users/bleege/repos","events_url":"https://api.github.com/users/bleege/events{/privacy}","received_events_url":"https://api.github.com/users/bleege/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/38","html_url":"https://github.com/mapbox/mapbox-gl-native/milestones/android-v4.2.0","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/38/labels","id":1808393,"number":38,"title":"android-v4.2.0","description":"","creator":{"login":"tobrun","id":2151639,"avatar_url":"https://avatars.githubusercontent.com/u/2151639?v=3","gravatar_id":"","url":"https://api.github.com/users/tobrun","html_url":"https://github.com/tobrun","followers_url":"https://api.github.com/users/tobrun/followers","following_url":"https://api.github.com/users/tobrun/following{/other_user}","gists_url":"https://api.github.com/users/tobrun/gists{/gist_id}","starred_url":"https://api.github.com/users/tobrun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobrun/subscriptions","organizations_url":"https://api.github.com/users/tobrun/orgs","repos_url":"https://api.github.com/users/tobrun/repos","events_url":"https://api.github.com/users/tobrun/events{/privacy}","received_events_url":"https://api.github.com/users/tobrun/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":179,"state":"open","created_at":"2016-06-04T11:55:28Z","updated_at":"2016-09-20T21:59:58Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2016-08-15T20:33:43Z","updated_at":"2016-09-20T21:59:58Z","closed_at":"2016-09-20T21:59:58Z","body":"Go into activity with mapview while user locations enabled, I then goto settings and disable location permission, switch back to the activity containing just the mapview and the app crashes.\r\n\r\n![ezgif com-video-to-gif](https://cloud.githubusercontent.com/assets/5652865/17678573/abefe1b4-6305-11e6-96c5-ffd69ba1c9e2.gif)\r\n\r\nlogcat output:\r\n```\r\n08-15 16:27:51.040 3953-3953/com.mapbox.mapboxandroiddemo E/OfflineManager: Failed to read the storage key: Attempt to invoke virtual method 'boolean android.os.BaseBundle.getBoolean(java.lang.String, boolean)' on a null object reference\r\n08-15 16:27:51.071 3953-3953/com.mapbox.mapboxandroiddemo E/MapboxMap: Could not activate user location tracking: user did not accept the permission or permissions were not requested.\r\n08-15 16:27:51.073 3953-3953/com.mapbox.mapboxandroiddemo D/AndroidRuntime: Shutting down VM\r\n                                                                            \r\n                                                                            \r\n                                                                            --------- beginning of crash\r\n08-15 16:27:51.080 3953-3953/com.mapbox.mapboxandroiddemo E/AndroidRuntime: FATAL EXCEPTION: main\r\n                                                                            Process: com.mapbox.mapboxandroiddemo, PID: 3953\r\n                                                                            java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mapbox.mapboxandroiddemo/com.mapbox.mapboxandroiddemo.examples.basics.SimpleMapViewActivity}: com.mapbox.mapboxsdk.exceptions.MapboxAccountManagerNotStartedException: \r\n                                                                            MapboxAccountManager was not started correctly. Use MapboxAccountManager#start(Context, String) to initialise. \r\n                                                                            More information in this guide https://www.mapbox.com/help/first-steps-android-sdk/#access-tokens.\r\n                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)\r\n                                                                                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)\r\n                                                                                at android.app.ActivityThread.-wrap12(ActivityThread.java)\r\n                                                                                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)\r\n                                                                                at android.os.Handler.dispatchMessage(Handler.java:102)\r\n                                                                                at android.os.Looper.loop(Looper.java:154)\r\n                                                                                at android.app.ActivityThread.main(ActivityThread.java:6077)\r\n                                                                                at java.lang.reflect.Method.invoke(Native Method)\r\n                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)\r\n                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)\r\n                                                                             Caused by: com.mapbox.mapboxsdk.exceptions.MapboxAccountManagerNotStartedException: \r\n                                                                            MapboxAccountManager was not started correctly. Use MapboxAccountManager#start(Context, String) to initialise. \r\n                                                                            More information in this guide https://www.mapbox.com/help/first-steps-android-sdk/#access-tokens.\r\n                                                                                at com.mapbox.mapboxsdk.MapboxAccountManager.getInstance(MapboxAccountManager.java:56)\r\n                                                                                at com.mapbox.mapboxsdk.maps.MapView.onCreate(MapView.java:365)\r\n                                                                                at com.mapbox.mapboxandroiddemo.examples.basics.SimpleMapViewActivity.onCreate(SimpleMapViewActivity.java:21)\r\n                                                                                at android.app.Activity.performCreate(Activity.java:6664)\r\n                                                                                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)\r\n                                                                                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)\r\n                                                                                \t... 9 more\r\n```\r\n\r\ncc: @zugaldia @bleege"}}
{"actor":{"display_login":"cammace"}}