mapbox / mapbox/mapbox-navigation-android
Snapshotter example crash mapbox_route_token
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
Why crash to make devs add mapbox_route_token here? Examples would be nice to require a single mapbox_access_token
2021-02-12 14:17:32.807 18867-18867/com.mapbox.navigation.test_app E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.mapbox.navigation.test_app, PID: 18867
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mapbox.navigation.test_app/com.mapbox.navigation.examples.core.MapboxSignboardActivity}: java.lang.RuntimeException: mapbox_route_token needed (see code comments for details)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3431)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7660)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.RuntimeException: mapbox_route_token needed (see code comments for details)
at com.mapbox.navigation.examples.core.MapboxSignboardActivity.getMapboxRouteAccessToken(MapboxSignboardActivity.kt:266)
at com.mapbox.navigation.examples.core.MapboxSignboardActivity.initNavigation(MapboxSignboardActivity.kt:190)
at com.mapbox.navigation.examples.core.MapboxSignboardActivity.init(MapboxSignboardActivity.kt:177)
at com.mapbox.navigation.examples.core.MapboxSignboardActivity.onCreate(MapboxSignboardActivity.kt:130)
at android.app.Activity.performCreate(Activity.java:8000)
at android.app.Activity.performCreate(Activity.java:7984)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3404)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with MapboxSignboardActivity.kt, especially getMapboxRouteAccessToken at line 266 and its callers in initNavigation and init. Run the Snapshotter example with the documented token configuration and trace why mapbox_route_token is required. Done means the example no longer crashes when only mapbox_access_token is provided, with the relevant behavior covered by an existing or added test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100