Open luismlg opened 7 months ago
Pretty sure this has been fixed now ... But make sure you explicitly set a value for the 'isSilent' property of your waypoints.
On Tue, 2 Apr 2024, 12:46 luismlg, @.***> wrote:
Hi @eopeter https://github.com/eopeter, I think this error was already solved, but it's strange. When I start my Android application, it throws this error. Do you know what it could be due to?
I/Mapbox (26329): [nav-sdk]: [MapboxTripSession] routes update (reason: ROUTES_UPDATE_REASON_NEW, route IDs: []) - finished E/flutter (26329): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, null cannot be cast to non-null type kotlin.Boolean, null, java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Boolean E/flutter (26329): at com.eopeter.fluttermapboxnavigation.models.views.EmbeddedNavigationMapView.initialize(EmbeddedNavigationMapView.kt:36) E/flutter (26329): at com.eopeter.fluttermapboxnavigation.factory.EmbeddedNavigationViewFactory.create(EmbeddedNavigationViewFactory.kt:33) E/flutter (26329): at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:527) E/flutter (26329): at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:169) E/flutter (26329): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105) E/flutter (26329): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55) E/flutter (26329): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) E/flutter (26329): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292) E/flutter (26329): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/flutter (26329): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/flutter (26329): at android.os.Handler.handleCallback(Handler.java:942) E/flutter (26329): at android.os.Handler.dispatchMessage(Handler.java:99) E/flutter (26329): at android.os.Looper.loopOnce(Looper.java:201) E/flutter (26329): at android.os.Looper.loop(Looper.java:288) E/flutter (26329): at android.app.ActivityThread.main(ActivityThread.java:7892) E/flutter (26329): at java.lang.reflect.Method.invoke(Native Method) E/flutter (26329): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) E/flutter (26329): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) E/flutter (26329): ) E/flutter (26329): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7) E/flutter (26329): #1 https://github.com/eopeter/flutter_mapbox_navigation/issues/1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18) E/flutter (26329): E/flutter (26329): #2 https://github.com/eopeter/flutter_mapbox_navigation/issues/2 ExpensiveAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1115:5) E/flutter (26329): E/flutter (26329): #3 https://github.com/eopeter/flutter_mapbox_navigation/issues/3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:838:5) E/flutter (26329): E/flutter (26329): D/LeakCanary(26329): Watching instance of com.mapbox.navigation.core.trip.service.NavigationNotificationService (com.mapbox.navigation.core.trip.service.NavigationNotificationService received Service#onDestroy() callback) with key 787616f8-010e-4f67-a445-75ca5d90e8c8 I/Mapbox (26329): [nav-sdk]: [MapboxNavigation] Trip session reset W/Mapbox (26329): [nav-sdk]: [TripSessionLocationEngine] Got an obsolete location: age = 1061 ms D/EGL_emulation(26329): app_time_stats: avg=6365.95ms min=6365.95ms max=6365.95ms count=1
— Reply to this email directly, view it on GitHub https://github.com/eopeter/flutter_mapbox_navigation/issues/348, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN555IDWAXPAB2DFOSTNIDY3KLAXAVCNFSM6AAAAABFTHERCOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZDAMZQG4YDGNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi @neildunlop,
I have tried isSilent for the waypoints, and nothing. The process does not directly enter the onCreate of MapBoxNavigationView(). I attach how I have it configured:
MapBoxNavigationView(
options: MapBoxOptions(
voiceInstructionsEnabled: false,
//simulateRoute: true,
bannerInstructionsEnabled: true,
units: VoiceUnits.metric,
mode: MapBoxNavigationMode.driving,
enableRefresh: false,
initialLatitude: _currentPosition.latitude,
initialLongitude: _currentPosition.longitude,
//initialLatitude: widget.route[0].latitud,
//initialLongitude: widget.route[0].longitud,
language: "en"),
onRouteEvent: _onEmbeddedRouteEvent(does not fit here),
onCreated: (MapBoxNavigationViewController controller) async {
(does not fit here)
}
I also attach the complete list of errors, in case you can help me:
I/Mapbox (29821): [nav-sdk]: [MapboxNavigationOwner] onStart
I/Mapbox (29821): [nav-sdk]: [HistoryFiles] Initial size is 4096 bytes
I/Mapbox (29821): [nav-sdk]: [HistoryFiles] Initial size is 4096 bytes
I/Mapbox (29821): [nav-sdk]: [RoutingTilesFiles] Initial size is 4096 bytes
I/Mapbox (29821): [threading]: Worker 1 priority is now 4
I/Mapbox (29821): [nav-native]: PersistentConfig path: /data/user/0/com.electiccartour/files/mbx_nav/tiles/navigation/config.json
I/Mapbox (29821): [threading]: Worker 1 priority is now 4
W/Mapbox (29821): [config_service]: No configuration options found stored on the disk.
I/Mapbox (29821): [valhalla]: virtual memory (Kb): 1.87122e+07 resident_set_size (Kb): 368656
I/Mapbox (29821): [valhalla]: virtual memory (Kb): 1.87122e+07 resident_set_size (Kb): 369340
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
I/Mapbox (29821): [nav-sdk]: [RoutingTilesFiles] Initial size is 4096 bytes
I/Mapbox (29821): [nav-native]: PersistentConfig path: /data/user/0/com.electiccartour/files/mbx_nav/tiles/navigation/config.json
I/Mapbox (29821): [threading]: Worker 1 priority is now 4
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
I/Mapbox (29821): [threading]: Worker 1 priority is now 4
D/TrafficStats(29821): tagSocket(187) with statsTag=0xffffffff, statsUid=-1
D/TrafficStats(29821): tagSocket(188) with statsTag=0xffffffff, statsUid=-1
D/TrafficStats(29821): tagSocket(189) with statsTag=0xffffffff, statsUid=-1
I/Mapbox (29821): [nav-native]: Tiles path = "/data/user/0/com.electiccartour/files/mbx_nav/tiles"
I/Mapbox (29821): [nav-native]: TileStore instance wasn't passed
I/Mapbox (29821): [nav-native]: Endpoint config = "{"host":"https://api.mapbox.com","dataSet":"mapbox/driving-traffic","version":"","token":"***...*","isFallback":false,"versionBeforeFallback":"","minDiffInDaysToConsiderServerVersion":56}"
I/Mapbox (29821): [nav-native]: Creating navigator v.157.0.0
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
I/Mapbox (29821): [threading]: Worker 1 priority is now 4
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [config_service]: No configuration options found stored on the disk.
D/TrafficStats(29821): tagSocket(203) with statsTag=0xffffffff, statsUid=-1
I/.electiccartour(29821): Background young concurrent copying GC freed 47306(3222KB) AllocSpace objects, 13(260KB) LOS objects, 17% free, 7684KB/9315KB, paused 1.451ms,179us total 115.497ms
W/Mapbox (29821): [config_service]: No configuration options found stored on the disk.
W/Mapbox (29821): [config_service]: Unexpected HTTP response code is received: 401
W/System (29821): A resource failed to call destroy.
W/System (29821): A resource failed to call destroy.
W/System (29821): A resource failed to call destroy.
W/Mapbox (29821): [config_service]: Unexpected HTTP response code is received: 401
D/TrafficStats(29821): tagSocket(147) with statsTag=0xffffffff, statsUid=-1
D/TrafficStats(29821): tagSocket(203) with statsTag=0xffffffff, statsUid=-1
I/Mapbox (29821): [nav-native]: Async version config for mapbox/driving-traffic resolved with version 2024_03_31-03_00_08 [{"map":{"tileset_version":"2024_03_31-03_00_08"}}]
I/Mapbox (29821): [nav-native]: Async version config for mapbox/driving-traffic resolved with version 2024_03_31-03_00_08 [{"map":{"tileset_version":"2024_03_31-03_00_08"}}]
W/Mapbox (29821): [config_service]: Unexpected HTTP response code is received: 401
W/Mapbox (29821): [nav-sdk]: [BillingController] [code: TokenValidationFailed, message: Token validation failed for: this-can-be-skip-since-we-set-it-later]
I/Mapbox (29821): [LifecycleUtils]: Task: TaskInfo{userId=0 taskId=45 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x30000000 cmp=com.electiccartour/.MainActivity (has extras) } baseActivity=ComponentInfo{com.electiccartour/com.electiccartour.MainActivity} topActivity=ComponentInfo{com.electiccartour/com.electiccartour.MainActivity} origActivity=null realActivity=ComponentInfo{com.electiccartour/com.electiccartour.MainActivity} numActivities=1 lastActiveTime=41437019 supportsSplitScreenMultiWindow=true supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@56658da} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=0 displayCutoutSafeInsets=null topActivityInfo=ActivityInfo{96128a6 com.electiccartour.MainActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isSleeping=false topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false locusId=null displayAreaFeatureId=1 cameraCompatControlState=hidden}
I/Mapbox (29821): [nav-sdk]: [MapboxTripSession] routes update (reason: ROUTES_UPDATE_REASON_NEW, route IDs: []) - starting
I/Mapbox (29821): [nav-native]: NavigatorImpl::resetRoutes finish the previous session
I/Mapbox (29821): [nav-native]: Stopping online route requests in a loop as routes are null
I/Mapbox (29821): [nav-native]: RouteAlternativesControllerImpl::setRoutes isAlternativesChanged. alternatives=[ ], removed=[ ]
W/Mapbox (29821): [valhalla]: No metadata found for tiles
I/Mapbox (29821): [nav-native]: Ride session reset
E/Mapbox (29821): [events_service]: Events sending aborted
E/Mapbox (29821): [nav-sdk]: [MapboxMetricsReporter] EventsService failure: [code: Unauthorized, message: Not Authorized] for events [appUserTurnstile]
E/Mapbox (29821): [nav-sdk]: [MapboxMetricsReporter] Failed to send Turnstile event: [code: Unauthorized, message: Not Authorized]
I/Mapbox (29821): [nav-sdk]: [CarAppLifecycleOwner] attach
I/.electiccartour(29821): Background concurrent copying GC freed 50486(2373KB) AllocSpace objects, 15(300KB) LOS objects, 49% free, 6738KB/13MB, paused 2.879ms,482us total 186.720ms
W/Mapbox (29821): [nav-sdk]: [Companion] Unable to request location permissions when view is created late in the activity lifecycle. LifecycleOwner com.electiccartour.MainActivity@d633ff5 is attempting to register while current state is RESUMED. LifecycleOwners must call register before they are STARTED.
W/Mapbox (29821): [LiveTrackingClient]: Skipping request to stop: state == Stopping
I/Mapbox (29821): [LifecycleUtils]: Task: TaskInfo{userId=0 taskId=45 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x30000000 cmp=com.electiccartour/.MainActivity (has extras) } baseActivity=ComponentInfo{com.electiccartour/com.electiccartour.MainActivity} topActivity=ComponentInfo{com.electiccartour/com.electiccartour.MainActivity} origActivity=null realActivity=ComponentInfo{com.electiccartour/com.electiccartour.MainActivity} numActivities=1 lastActiveTime=41437019 supportsSplitScreenMultiWindow=true supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@b5842e2} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=0 displayCutoutSafeInsets=null topActivityInfo=ActivityInfo{5c18673 com.electiccartour.MainActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isSleeping=false topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false locusId=null displayAreaFeatureId=1 cameraCompatControlState=hidden}
W/Mapbox (29821): [valhalla]: No metadata found for tiles
I/Mapbox (29821): [nav-native]: Ride session reset
I/Mapbox (29821): [nav-sdk]: [MapboxNavigation] Trip session reset
I/Mapbox (29821): [nav-sdk]: [MapboxTripSession] routes update (reason: ROUTES_UPDATE_REASON_CLEAN_UP, route IDs: []) - starting
I/Mapbox (29821): [nav-native]: Stopping online route requests in a loop as routes are null
I/Mapbox (29821): [nav-native]: RouteAlternativesControllerImpl::setRoutes isAlternativesChanged. alternatives=[ ], removed=[ ]
I/Mapbox (29821): [nav-sdk]: [MapboxNavigationOwner] disabled 12 observers
I/Mapbox (29821): [nav-sdk]: [MapboxNavigationOwner] onStart
I/Mapbox (29821): [nav-sdk]: [HistoryFiles] Initial size is 4096 bytes
I/Mapbox (29821): [nav-sdk]: [HistoryFiles] Initial size is 4096 bytes
I/Mapbox (29821): [nav-sdk]: [RoutingTilesFiles] Initial size is 4096 bytes
I/Mapbox (29821): [nav-native]: PersistentConfig path: /data/user/0/com.electiccartour/files/mbx_nav/tiles/navigation/config.json
I/Mapbox (29821): [threading]: Worker 1 priority is now 4
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
I/Mapbox (29821): [nav-sdk]: [RoutingTilesFiles] Initial size is 4096 bytes
I/Mapbox (29821): [nav-native]: PersistentConfig path: /data/user/0/com.electiccartour/files/mbx_nav/tiles/navigation/config.json
I/Mapbox (29821): [threading]: Worker 1 priority is now 4
W/Mapbox (29821): [nav-sdk]: [BillingController] [code: TokenValidationFailed, message: Token validation failed for: this-can-be-skip-since-we-set-it-later]
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
I/Mapbox (29821): [nav-native]: Tiles path = "/data/user/0/com.electiccartour/files/mbx_nav/tiles"
I/Mapbox (29821): [nav-native]: TileStore instance wasn't passed
I/Mapbox (29821): [threading]: Worker 1 priority is now 4
I/Mapbox (29821): [nav-native]: Endpoint config = "{"host":"https://api.mapbox.com","dataSet":"mapbox/driving-traffic","version":"","token":"***...*","isFallback":false,"versionBeforeFallback":"","minDiffInDaysToConsiderServerVersion":56}"
I/Mapbox (29821): [nav-native]: Creating navigator v.157.0.0
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
I/Mapbox (29821): [threading]: Worker 1 priority is now 4
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
W/Mapbox (29821): [valhalla]: No metadata found for tiles
I/Mapbox (29821): [nav-native]: Async version config for mapbox/driving-traffic resolved with version 2024_03_31-03_00_08 [{"map":{"tileset_version":"2024_03_31-03_00_08"}}]
I/Mapbox (29821): [nav-native]: Async version config for mapbox/driving-traffic resolved with version 2024_03_31-03_00_08 [{"map":{"tileset_version":"2024_03_31-03_00_08"}}]
I/Mapbox (29821): [LifecycleUtils]: Task: TaskInfo{userId=0 taskId=45 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x30000000 cmp=com.electiccartour/.MainActivity (has extras) } baseActivity=ComponentInfo{com.electiccartour/com.electiccartour.MainActivity} topActivity=ComponentInfo{com.electiccartour/com.electiccartour.MainActivity} origActivity=null realActivity=ComponentInfo{com.electiccartour/com.electiccartour.MainActivity} numActivities=1 lastActiveTime=41437019 supportsSplitScreenMultiWindow=true supportsMultiWindow=true resizeMode=1 isResizeable=true minWidth=-1 minHeight=-1 defaultMinSize=220 token=WCT{android.window.IWindowContainerToken$Stub$Proxy@b34aa8f} topActivityType=1 pictureInPictureParams=null shouldDockBigOverlays=false launchIntoPipHostTaskId=0 displayCutoutSafeInsets=null topActivityInfo=ActivityInfo{afe611c com.electiccartour.MainActivity} launchCookies=[] positionInParent=Point(0, 0) parentTaskId=-1 isFocused=true isVisible=true isSleeping=false topActivityInSizeCompat=false topActivityEligibleForLetterboxEducation= false locusId=null displayAreaFeatureId=1 cameraCompatControlState=hidden}
I/Mapbox (29821): [nav-sdk]: [MapboxTripSession] routes update (reason: ROUTES_UPDATE_REASON_NEW, route IDs: []) - starting
I/Mapbox (29821): [nav-native]: NavigatorImpl::resetRoutes finish the previous session
I/Mapbox (29821): [nav-native]: Stopping online route requests in a loop as routes are null
I/Mapbox (29821): [nav-native]: RouteAlternativesControllerImpl::setRoutes isAlternativesChanged. alternatives=[ ], removed=[ ]
W/Mapbox (29821): [valhalla]: No metadata found for tiles
I/Mapbox (29821): [nav-native]: Ride session reset
I/TextToSpeech(29821): Sucessfully bound to com.google.android.tts
I/TextToSpeech(29821): Connected to TTS engine
I/Mapbox (29821): [nav-sdk]: [CarAppLifecycleOwner] attach
I/Mapbox (29821): [nav-sdk]: [CarAppLifecycleOwner] LifecycleOwner (com.electiccartour.MainActivity@d633ff5) onCreate
I/Mapbox (29821): [nav-sdk]: [CarAppLifecycleOwner] LifecycleOwner (com.electiccartour.MainActivity@d633ff5) onStart
I/Mapbox (29821): [nav-sdk]: [CarAppLifecycleOwner] changeState RESUMED
E/MethodChannel#flutter/platform_views(29821): Failed to handle method call
E/MethodChannel#flutter/platform_views(29821): java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Boolean
E/MethodChannel#flutter/platform_views(29821): at com.eopeter.fluttermapboxnavigation.models.views.EmbeddedNavigationMapView.initialize(EmbeddedNavigationMapView.kt:36)
E/MethodChannel#flutter/platform_views(29821): at com.eopeter.fluttermapboxnavigation.factory.EmbeddedNavigationViewFactory.create(EmbeddedNavigationViewFactory.kt:33)
E/MethodChannel#flutter/platform_views(29821): at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:527)
E/MethodChannel#flutter/platform_views(29821): at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:169)
E/MethodChannel#flutter/platform_views(29821): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105)
E/MethodChannel#flutter/platform_views(29821): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55)
E/MethodChannel#flutter/platform_views(29821): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#flutter/platform_views(29821): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#flutter/platform_views(29821): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#flutter/platform_views(29821): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#flutter/platform_views(29821): at android.os.Handler.handleCallback(Handler.java:942)
E/MethodChannel#flutter/platform_views(29821): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#flutter/platform_views(29821): at android.os.Looper.loopOnce(Looper.java:201)
E/MethodChannel#flutter/platform_views(29821): at android.os.Looper.loop(Looper.java:288)
E/MethodChannel#flutter/platform_views(29821): at android.app.ActivityThread.main(ActivityThread.java:7892)
E/MethodChannel#flutter/platform_views(29821): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/platform_views(29821): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/MethodChannel#flutter/platform_views(29821): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
I/Mapbox (29821): [nav-sdk]: [MapboxTripSession] routes update (reason: ROUTES_UPDATE_REASON_NEW, route IDs: []) - finished
I/Mapbox (29821): [nav-sdk]: [RouteAlternativesController] native alternatives available: []
W/.electiccartour(29821): Accessing hidden field Landroid/app/ActivityThread;->mServices:Landroid/util/ArrayMap; (unsupported, reflection, allowed)
D/LeakCanary(29821): Watching instance of com.mapbox.navigation.core.trip.service.NavigationNotificationService (com.mapbox.navigation.core.trip.service.NavigationNotificationService received Service#onDestroy() callback) with key 41ef4908-16ca-44dd-8112-fc7cc9932e55
E/flutter (29821): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, null cannot be cast to non-null type kotlin.Boolean, null, java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Boolean
E/flutter (29821): at com.eopeter.fluttermapboxnavigation.models.views.EmbeddedNavigationMapView.initialize(EmbeddedNavigationMapView.kt:36)
E/flutter (29821): at com.eopeter.fluttermapboxnavigation.factory.EmbeddedNavigationViewFactory.create(EmbeddedNavigationViewFactory.kt:33)
E/flutter (29821): at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:527)
E/flutter (29821): at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:169)
E/flutter (29821): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105)
E/flutter (29821): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55)
E/flutter (29821): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/flutter (29821): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/flutter (29821): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/flutter (29821): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/flutter (29821): at android.os.Handler.handleCallback(Handler.java:942)
E/flutter (29821): at android.os.Handler.dispatchMessage(Handler.java:99)
E/flutter (29821): at android.os.Looper.loopOnce(Looper.java:201)
E/flutter (29821): at android.os.Looper.loop(Looper.java:288)
E/flutter (29821): at android.app.ActivityThread.main(ActivityThread.java:7892)
E/flutter (29821): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (29821): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/flutter (29821): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
E/flutter (29821): )
E/flutter (29821): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7)
E/flutter (29821): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18)
E/flutter (29821): <asynchronous suspension>
E/flutter (29821): #2 ExpensiveAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1115:5)
E/flutter (29821): <asynchronous suspension>
E/flutter (29821): #3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:838:5)
E/flutter (29821): <asynchronous suspension>
E/flutter (29821):
I/Mapbox (29821): [nav-sdk]: [MapboxNavigation] Trip session reset
W/Mapbox (29821): [nav-sdk]: [TripSessionLocationEngine] Got an obsolete location: age = 42097 ms
D/EGL_emulation(29821): app_time_stats: avg=803.57ms min=1.15ms max=15855.28ms count=20
I/TextToSpeech(29821): Setting up the connection to TTS engine...
W/Mapbox (29821): [config_service]: Unexpected HTTP response code is received: 401
W/Mapbox (29821): [config_service]: Unexpected HTTP response code is received: 401
W/Mapbox (29821): [config_service]: Unexpected HTTP response code is received: 401
I/Mapbox (29821): [tile_store]: Searching for stale partial downloads to clean up
I/Mapbox (29821): [tile_store]: Cleanup of stray partial downloads complete
I/flutter (29821): gb_GB
W/Mapbox (29821): [config_service]: Unexpected HTTP response code is received: 401
E/Mapbox (29821): [config_service]: Configuration request aborted after 2 attempts
W/Mapbox (29821): [config_service]: Unexpected HTTP response code is received: 401
W/Mapbox (29821): [config_service]: Unexpected HTTP response code is received: 401
E/Mapbox (29821): [config_service]: Configuration request aborted after 2 attempts
E/Mapbox (29821): [config_service]: Configuration request aborted after 2 attempts
I/Mapbox (29821): [tile_store]: Searching for stale partial downloads to clean up
I/Mapbox (29821): [tile_store]: Cleanup of stray partial downloads complete
Thank you very much for your support!
Any update on this issue? Experiencing the same issue.
Just fix it by setting "longPressDestinationEnabled" in the "MapBoxOptions".
MapBoxOptions( longPressDestinationEnabled: false, [...] ),
I tried setting longPressDestinationEnabled but I still get the same error. Anyone have another solution I can try?
Hi @eopeter, I think this error was already solved, but it's strange. When I start my Android application, it throws this error. Do you know what it could be due to?
I/Mapbox (26329): [nav-sdk]: [MapboxTripSession] routes update (reason: ROUTES_UPDATE_REASON_NEW, route IDs: []) - finished E/flutter (26329): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, null cannot be cast to non-null type kotlin.Boolean, null, java.lang.NullPointerException: null cannot be cast to non-null type kotlin.Boolean E/flutter (26329): at com.eopeter.fluttermapboxnavigation.models.views.EmbeddedNavigationMapView.initialize(EmbeddedNavigationMapView.kt:36) E/flutter (26329): at com.eopeter.fluttermapboxnavigation.factory.EmbeddedNavigationViewFactory.create(EmbeddedNavigationViewFactory.kt:33) E/flutter (26329): at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:527) E/flutter (26329): at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:169) E/flutter (26329): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105) E/flutter (26329): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55) E/flutter (26329): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) E/flutter (26329): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292) E/flutter (26329): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) E/flutter (26329): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) E/flutter (26329): at android.os.Handler.handleCallback(Handler.java:942) E/flutter (26329): at android.os.Handler.dispatchMessage(Handler.java:99) E/flutter (26329): at android.os.Looper.loopOnce(Looper.java:201) E/flutter (26329): at android.os.Looper.loop(Looper.java:288) E/flutter (26329): at android.app.ActivityThread.main(ActivityThread.java:7892) E/flutter (26329): at java.lang.reflect.Method.invoke(Native Method) E/flutter (26329): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) E/flutter (26329): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) E/flutter (26329): ) E/flutter (26329): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:651:7) E/flutter (26329): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:334:18) E/flutter (26329):
E/flutter (26329): #2 ExpensiveAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1115:5)
E/flutter (26329):
E/flutter (26329): #3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:838:5)
E/flutter (26329):
E/flutter (26329):
D/LeakCanary(26329): Watching instance of com.mapbox.navigation.core.trip.service.NavigationNotificationService (com.mapbox.navigation.core.trip.service.NavigationNotificationService received Service#onDestroy() callback) with key 787616f8-010e-4f67-a445-75ca5d90e8c8
I/Mapbox (26329): [nav-sdk]: [MapboxNavigation] Trip session reset
W/Mapbox (26329): [nav-sdk]: [TripSessionLocationEngine] Got an obsolete location: age = 1061 ms
D/EGL_emulation(26329): app_time_stats: avg=6365.95ms min=6365.95ms max=6365.95ms count=1