Open XxMenotoxX opened 1 year ago
Is this an embedded Nav view? Does the view Id and app Id match your app?
i dont know what is view Id and app Id
having similar issue yes this is an embedded nav view. The app id does matches the one with our id. no idea what is view id
I don't know if you're using lib "Location" but it's crashing.
I do actually use location lib as an alternative way to track user location
Try https://pub.dev/packages/geolocator and replace the location lib
I use both geo locator and locatin
+1
but I also get this error only when using google_map. maybe the google_map package is causing this issue
One of the approaches that i tried to make is to delete the mapbox navigation lib and see if the google map lib is the cause of the problem everything went alright and i didn't encounter any issues related
@XxMenotoxX Did you remove the google map library and mapbox is working perfectly?
Yes i did but i will try again on an empty project to see if i encounter the same issue
@XxMenotoxX I am trying to remove google map library as well to check
Same issue even when google maps are removed. It's a weird issue since it always happens at the 3rd time.
same issue too , weird issue indeed @wbilalz400
The same thing happens to me in embedded view and always at the third time call. Also when I define mapStyleUrlNight: "mapbox://styles/mapbox/traffic-night-v2" and mapStyleUrlDay: "mapbox://styles/mapbox/traffic-day-v2" the specified style does not change. Android.
any updates? the same error
Did any one find the fix?
still looking for a solution and i have a production app for a client any alternatives
I can take a look at it tonight. Can you list the exact steps to replicate?
@eopeter here are my steps to replicate on Android, either simulator or device:
Here is the crash report:
E/AndroidRuntime(28909): FATAL EXCEPTION: main
E/AndroidRuntime(28909): Process: com.saferoutz.driver, PID: 28909
E/AndroidRuntime(28909): java.lang.NullPointerException: Missing required view with ID: com.saferoutz.driver:id/maneuverView
E/AndroidRuntime(28909): at com.mapbox.navigation.dropin.databinding.MapboxManeuverGuidanceLayoutBinding.bind(MapboxManeuverGuidanceLayoutBinding.java:60)
E/AndroidRuntime(28909): at com.mapbox.navigation.dropin.maneuver.ManeuverViewBinder.bind(ManeuverViewBinder.kt:27)
E/AndroidRuntime(28909): at com.mapbox.navigation.dropin.maneuver.ManeuverViewBinder.bind(ManeuverViewBinder.kt:16)
E/AndroidRuntime(28909): at com.mapbox.navigation.ui.base.lifecycle.UICoordinator$onAttached$1$invokeSuspend$$inlined$collect$1.emit(Collect.kt:136)
E/AndroidRuntime(28909): at kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2.invokeSuspend(Zip.kt:333)
E/AndroidRuntime(28909): at kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2.invoke(Unknown Source:13)
E/AndroidRuntime(28909): at kotlinx.coroutines.flow.FlowKt__ZipKt$combine$$inlined$combineUnsafe$FlowKt__ZipKt$1$2.invoke(Unknown Source:6)
E/AndroidRuntime(28909): at kotlinx.coroutines.flow.internal.CombineKt$combineInternal$2.invokeSuspend(Combine.kt:79)
E/AndroidRuntime(28909): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime(28909): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
E/AndroidRuntime(28909): at android.os.Handler.handleCallback(Handler.java:938)
E/AndroidRuntime(28909): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(28909): at android.os.Looper.loopOnce(Looper.java:226)
E/AndroidRuntime(28909): at android.os.Looper.loop(Looper.java:313)
E/AndroidRuntime(28909): at android.app.ActivityThread.main(ActivityThread.java:8751)
E/AndroidRuntime(28909): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(28909): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
E/AndroidRuntime(28909): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
E/AndroidRuntime(28909): Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@41982b8, Dispatchers.Main]
Happy to provide more details if needed.
its basically the same step to me as well, after repeating 3 times the app close
I am not able to replicate this with the example app: https://youtu.be/-q8gwWmGdRM
Thanks for looking into this...So it's in the embedded mode....so i would assign the driver coords as the first way point then the origin of the rider as the second way point....driver then navigate to the rider successfully....driver then swipe arrived ,then swipe to head to the rider destination..in this step I make sure to clear the route first ...then assign the driver location as the first way point then the rider coords as the second waypoint...then route get draw...then as driver hit navigate button...it crashes....if you reopen the app and assign the same way points from state it doesn't crash ....so that's tell you nothing is wrong with the route.
hi @eopeter did you find any solution for the problem sir
I also got the same problem when using the navigation.
Mine works well in the first run, But after that when i try to navigate again the app crash.
Here is the crash report:
Hello @eopeter is there any solutions or updates sir? Thank you.
is this issue still happening with the current version 0.2.0?
@eopeter I will try it with version 0.2.0 and report back.
@eopeter i will try the new version 0.2.0 and will give a feedback thanks for the response.
I am having the same issue, in version 0.2.2, using location package
Can you copy and paste your stack trace?
Your token is in this stack trace. Please cycle your MapBox access token for security reasons.
ok, i have changed the token, thanks
Will do and get back to you
@eopeter In your example, replace the main.dart code with the code below:
import 'package:flutter/material.dart';
import 'app.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Builder(
builder: (context) => Center(
child: Center(
child: ElevatedButton(
child: const Text("Click"),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const SampleNavigationApp()),
);
}),
),
)));
}
}
Below is the simulation video, where in the 3rd navigation it dates the system and generates the error reported in this problem Meu Vídeo1.zip
Can you upload the video to YouTube?
@eopeter were you able to simulate it in your environment? Debugging here, I noticed that even when closing the router (screen) that has the map with Navigation.pop, some threads (taks, microtaks) are still running. I was also unable to identify the problem in the viewbinding of your package.
@eopeter gentle reminder on this as it's affecting lot's of people
-- @XxMenotoxX please add some labels on it
@SPiercer I will take a look at this when I have some free time. If you have capacity, please feel free to take a look and send a PR
Hello everybody !
The problem of failing after 3 navigations persists, has anyone managed to get around this problem?
I put the section below in dispose() and nothing stopped the route process:
@override void dispose() { _controller?.dispose(); super.dispose(); }
I also tried to stop when I was close to reaching the end of the route:
if (currentLegDistanceRemaining < 10.0 ) { _controller?.clearRoute(); await _controller?.finishNavigation(); }
If you leave it, it continues launching the method: MapBoxEvent.progress_change
I tested with version 0.2.0 but the problem is the same, after finishing the route it keeps working and sending information, even leaving the screen it was on and returning to the app's main screen it continues transmitting information. See below that it has finished the route section and continues arriving in the MapBoxEvent.progress_change method
currentLegDistanceRemaining: 0.0 W/Mapbox (30124): [nav-native]: Using the same old location with timestamp = 858841291852758ns, lng = -46.502187, lat = -23.430765 for 10 seconds E/Mapbox (30124): [nav-sdk]: [MapboxFollowingFrameProcessor] Start position is beyond line
When you return to the main screen of the app, it sends the message below, one after the other:
E/Mapbox (30124): [nav-sdk]: [MapboxFollowingFrameProcessor] Start position is beyond line I/stem.br_expres(30124): Explicit concurrent copying GC freed 5579(287KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 8693KB/16MB, paused 303us total 89.885ms two E/Mapbox (30124): [nav-sdk]: [MapboxFollowingFrameProcessor] Start position is beyond line W/Mapbox (30124): [nav-native]: Using the same old location with timestamp = 858841291852758ns, lng = -46.502187, lat = -23.430765 for 80 seconds E/Mapbox (30124): [nav-sdk]: [MapboxFollowingFrameProcessor] Start position is beyond line I/stem.br_expres(30124): Explicit concurrent copying GC freed 5582(304KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 8741KB/17MB, paused 584us total 106.255ms two E/Mapbox (30124): [nav-sdk]: [MapboxFollowingFrameProcessor] Start position is beyond line I/stem.br_expres(30124): Explicit concurrent copying GC freed 6239(335KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 8709KB/17MB, paused 146us total 61,031ms
I noticed two situations and would like to see if this is what is causing the anomaly in the package.
On the third attempt to use the route the application minimizes and does not close, when I click on it it returns and I can use it twice more until it minimizes again.
The second situation refers to the finishNavigation method which is returning FALSE, is this correct?
@eopeter The package is perfect, I tested everything and it works very well, we still need to resolve this issue of closing after 3 routes executed, we will need your help, I know you are busy but if you can help us all, we would be grateful. I haven't found another package with such perfection, I need to put it into production in my project.
If you need an example again, I'll post it for you, but they've previously indicated how to get to the problem.
@eopeter I asked on a flutter forum and someone answered this, maybe this is the way to fix the problem: You can get around this by "resetting" the package every time you start the race. I'm almost sure that the problem is manipulation during the enumeration of a list in Java, in Java this common practice causes a lot of errors, you have to clone the list to enumerate.
@marciotisouza @ddiegosousa I'm Brazilian and I'm having some problems in production with this lib and I'd like to talk on a call with you guys... to see if we can help each other. (Vamos fazer uma call?)
Yes, you can call me on gmail chat
here is the the error i get