mapbox / mapbox/mapbox-maps-android
java.lang.IllegalArgumentException: Parse error at offset 165: Missing a colon after a name of object member.
Open
Nobody has claimed this yet.
auto-triaged
bug :beetle:
- Dominant language
- Kotlin
- Stars
- 578
- Forks
- 161
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Android OS version: 11
- Devices affected: OnePlus8Pro
- Maps SDK Version: 11.2.2
Observed behavior and steps to reproduce
The crash is reported via Crashlytics
Expected behavior
Do not have crash
Additional links and references
Fatal Exception: java.lang.IllegalArgumentException: Parse error at offset 165: Missing a colon after a name of object member.
at com.mapbox.maps.StyleManager.addPersistentStyleLayer(StyleManager.java)
at com.mapbox.maps.MapboxStyleManager.addPersistentStyleLayer(MapboxStyleManager.kt:12)
at com.mapbox.maps.Style.addPersistentStyleLayer(Style.kt:10)
at com.mapbox.maps.plugin.locationcomponent.LocationLayerWrapper.bindTo(LocationLayerWrapper.kt:11)
at com.mapbox.maps.plugin.locationcomponent.LocationComponentPositionManager.addLayerToMap(LocationComponentPositionManager.kt:39)
at com.mapbox.maps.plugin.locationcomponent.LocationIndicatorLayerRenderer.addLayers(LocationIndicatorLayerRenderer.kt:7)
at com.mapbox.maps.plugin.locationcomponent.LocationPuckManager.initialize(LocationPuckManager.kt:71)
at com.mapbox.maps.plugin.locationcomponent.LocationPuckManager$updateSettings$1.invoke(LocationPuckManager.kt:2)
at com.mapbox.maps.plugin.locationcomponent.LocationPuckManager$updateSettings$1.invoke(LocationPuckManager.kt:1)
at com.mapbox.maps.plugin.MapDelegateProviderImpl.getStyle$lambda$0(MapDelegateProviderImpl.kt:11)
at com.mapbox.maps.MapboxMap.getStyle(MapboxMap.kt:2)
at com.mapbox.maps.plugin.MapDelegateProviderImpl.getStyle(MapDelegateProviderImpl.kt:14)
at com.mapbox.maps.plugin.locationcomponent.LocationPuckManager.updateSettings(LocationPuckManager.kt:48)
at com.mapbox.maps.plugin.locationcomponent.LocationComponentPluginImpl.applySettings(LocationComponentPluginImpl.kt:66)
at com.mapbox.maps.plugin.locationcomponent.generated.LocationComponentSettingsBase.updateSettings(LocationComponentSettingsBase.kt:24)
at com.mapbox.maps.extension.compose.internal.SettingsUtilsKt.applySettings(SettingsUtils.kt:4)
at com.mapbox.maps.extension.compose.internal.MapboxMapNodeKt$MapboxMapComposeNode$2$5.invoke(MapboxMapNode.kt:2)
at com.mapbox.maps.extension.compose.internal.MapboxMapNodeKt$MapboxMapComposeNode$2$5.invoke(MapboxMapNode.kt:1)
at androidx.compose.runtime.changelist.Operation$UpdateNode.execute(Operation.kt:17)
at androidx.compose.runtime.changelist.Operations.executeAndFlushAllPendingOperations(Operations.kt:23)
at androidx.compose.runtime.changelist.ChangeList.executeAndFlushAllPendingChanges(ChangeList.kt:3)
at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:50)
at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:6)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:182)
at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$1.invoke(Recomposer.kt:182)
at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:7)
at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.java:48)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.java:48)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:48)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:970)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:727)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7680)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:423)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
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 at StyleManager.addPersistentStyleLayer and follow the call path through MapboxStyleManager.kt, Style.kt, and LocationPuckManager.kt. Investigate the style data that reaches this path and the reported JSON parse failure; done means identifying a reproducible cause and preventing the crash with coverage for the affected path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 40/100