'flutter_mapbox_navigation not working properly

I want to add turn by turn navigation in my flutter application using flutter_mapbox_navigation I managed to run in a android environment but it is too slow. Sometimes the map doesnt even load properly. enter image description hereConsole shows some error and the map isnt zoomed on adding MapboxOptions on startup and full screen navigation too can someone help me on this? Some api call are failed and cancelled too

W/Mbgl    (25108): {Worker 3}[Style]: Attempt to set an invalid property value -0.022827)
W/Mbgl    (25108): {Worker 1}[Style]: Attempt to set an invalid property value -0.025267)
W/Mbgl    (25108): {Worker 2}[Style]: Attempt to set an invalid property value -0.025267)
W/Mbgl    (25108): {Worker 2}[Style]: Attempt to set an invalid property value -0.029675)
W/Mbgl    (25108): {Worker 3}[Style]: Attempt to set an invalid property value -0.029675)
W/Mbgl    (25108): {Worker 3}[Style]: Attempt to set an invalid property value -0.033651)
W/Mbgl    (25108): {Worker 1}[Style]: Attempt to set an invalid property value -0.033651)

D/MapboxHttpCallback(25108): [HTTP] Request with response = 404: Not Found
D/MapboxHttpCallback(25108): [HTTP] Request with response = 404: Not Found
D/MapboxHttpCallback(25108): [HTTP] Request with response = 404: Not Found
D/MapboxHttpCallback(25108): [HTTP] Request with response = 404: Not Found
D/MapboxHttpCallback(25108): [HTTP] Request with response = 404: Not Found
D/MapboxHttpCallback(25108): [HTTP] Request with response = 404: Not Found
D/MapboxHttpCallback(25108): [HTTP] Request with response = 404: Not Found
D/MapboxHttpCallback(25108): [HTTP] Request with response = 404: Not Found

W/Mbgl-HttpRequest(25108): Request failed due to a permanent error: Canceled 
W/Mbgl-HttpRequest(25108): Request failed due to a permanent error: Canceled 
W/Mbgl-HttpRequest(25108): Request failed due to a permanent error: Canceled 
W/Mbgl-HttpRequest(25108): Request failed due to a permanent error: Canceled 
W/Mbgl-HttpRequest(25108): Request failed due to a permanent error: Canceled 
D/Mbgl-HttpRequest(25108): [HTTP] This request was cancelled (https://api.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2/4/11/6.vector.pbf?access_token=

I/Mbgl-HttpRequest(25108): Request failed due to a connection error: Socket closed 
I/Mbgl-HttpRequest(25108): Request failed due to a connection error: SSL handshake aborted: ssl=0x71b41d44c8: I/O error during system call, Bad file descriptor 

E/flutter ( 8645): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Bad state: No element
E/flutter ( 8645): #0      ListMixin.firstWhere (dart:collection/list.dart:167:5)
E/flutter ( 8645): #1      new RouteEvent.fromJson (package:flutter_mapbox_navigation/models/routeEvent.dart:15:12)
E/flutter ( 8645): #2      MapBoxNavigation._parseRouteEvent (package:flutter_mapbox_navigation/flutter_mapbox_navigation.dart:135:26)
E/flutter ( 8645): #3      MapBoxNavigation._streamRouteEvent.<anonymous closure> (package:flutter_mapbox_navigation/flutter_mapbox_navigation.dart:122:35)
E/flutter ( 8645): #4      _MapStream._handleData (dart:async/stream_pipe.dart:213:31)
E/flutter ( 8645): #5      _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)
E/flutter ( 8645): #6      _rootRunUnary (dart:async/zone.dart:1434:47)
E/flutter ( 8645): #7      _CustomZone.runUnary (dart:async/zone.dart:1335:19)
E/flutter ( 8645): #8      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
E/flutter ( 8645): #9      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
E/flutter ( 8645): #10     _DelayedData.perform (dart:async/stream_impl.dart:591:14)
E/flutter ( 8645): #11     _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
E/flutter ( 8645): #12     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:663:7)
E/flutter ( 8645): #13     _rootRun (dart:async/zone.dart:1418:47)
E/flutter ( 8645): #14     _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter ( 8645): #15     _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
E/flutter ( 8645): #16     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
E/flutter ( 8645): #17     _rootRun (dart:async/zone.dart:1426:13)
E/flutter ( 8645): #18     _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter ( 8645): #19     _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
E/flutter ( 8645): #20     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1276:23)
E/flutter ( 8645): #21     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter ( 8645): #22     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
E/flutter ( 8645): 

Thank u it would be a great help. :)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source