Skip to content

Flutter Mapbox NullPointerException: Missing ManeuverView ID After Multiple Attempts #379

Open

Description

@muhammadnaqeeb

I’m using both the flutter_mapbox_navigation: ^0.2.2 and mapbox_maps_flutter: ^0.6.0 packages in my Flutter project, and I’m facing a strange runtime crash that occurs after first attempts to use the navigation feature. The app works perfectly the first times I try it, but on the second attempt, it crashes with the following error:

Error

E/AndroidRuntime( 6401): FATAL EXCEPTION: main
E/AndroidRuntime( 6401): Process: app.splenify.nurses, PID: 6401
E/AndroidRuntime( 6401): java.lang.NullPointerException: Missing required view with ID: app.splenify.nurses:id/maneuverView
E/AndroidRuntime( 6401):    at com.mapbox.navigation.dropin.databinding.MapboxManeuverGuidanceLayoutBinding.bind(MapboxManeuverGuidanceLayoutBinding.java:60)
E/AndroidRuntime( 6401):    at com.mapbox.navigation.dropin.maneuver.ManeuverViewBinder.bind(ManeuverViewBinder.kt:27)
E/AndroidRuntime( 6401):    at com.mapbox.navigation.dropin.maneuver.ManeuverViewBinder.bind(ManeuverViewBinder.kt:16)
E/AndroidRuntime( 6401):    at com.mapbox.navigation.ui.base.lifecycle.UICoordinator$onAttached$1$invokeSuspend$$inlined$collect$1.emit(Collect.kt:136)
E/AndroidRuntime( 6401):    at kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2.invokeSuspend(Zip.kt:262)
E/AndroidRuntime( 6401):    at kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2.invoke(Unknown Source:13)
E/AndroidRuntime( 6401):    at kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2.invoke(Unknown Source:6)
E/AndroidRuntime( 6401):    at kotlinx.coroutines.flow.internal.CombineKt$combineInternal$2.invokeSuspend(Combine.kt:76)
E/AndroidRuntime( 6401):    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime( 6401):    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
E/AndroidRuntime( 6401):    at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime( 6401):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 6401):    at android.os.Looper.loop(Looper.java:263)
E/AndroidRuntime( 6401):    at android.app.ActivityThread.main(ActivityThread.java:8292)
E/AndroidRuntime( 6401):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 6401):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
E/AndroidRuntime( 6401):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
E/AndroidRuntime( 6401):    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@4521ef7, Dispatchers.Main]
I/Process ( 6401): Sending signal. PID: 6401 SIG: 9

Additionally, I’ve noticed the following message on mobile notification:

4 retained objects, tap to dump heap. App visible, waiting until 5 retained objects in mobile notification

Screenshot 2024-09-17 144427

Activity

  1. kaushik072 commented on Oct 4, 2024

    @kaushik072

    Any update or any workaround on this issue?

  2. YoavSl commented on Feb 10, 2025

    @YoavSl

    Having the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions