-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mapbox Navigation v2] Crash on reroute #4179
Comments
Hey @sandyscoffable thanks for reaching out and report your issue. Could you add some more information around your test setup? Could you also share your request setup / If there is any sample or pseudo code you can provide, that would be really helpful and it'll give us better insight into your implementation and what could be causing your problem. |
Hi, I'm running a physical device (Samsung Galaxy SM-A715F, Android SDK 30) using Android 11. The app I'm using to mock locations on device is "Mock Locations (fake GPS path)" It's tricky as I can't reliably trigger it. I am switching between apps a lot, so perhaps it has something to do with the containing app not running in the foreground? |
That setup is totally fine.
What do you mean by that? Could you provide more details? We use often that setup and not running into reroute issues 🤔 As mentioned, it'd be great if you could provide a small project or code snippet reproducing the issue. |
I don't think I'll have spare time to properly narrow this issue down (as I'll need to do it in the emulator [which has issues in v2 navigation apparently], find a route and the exact reproduction scenario, and then move the relevant bits of code from the app I've got in development to an example - this would likely take days not hours). However, I think the stack trace is reasonably helpful ... perhaps this will only ever be seen in development, and I guess that's what you're trying to do, triage the bug and work out how important it is to fix is. I managed to demo a full route with waypoints with rerouting and it worked fine yesterday (so 👍). Maybe first run luck. I guess if I see this in our live testing or on consumer devices I'll spend more time on it. It just seemed to me like some sort of array indexing type problem, and perhaps some defensive coding might help out there. |
To give you a bit more of a picture on the app architecture:
|
I hit this again today with
|
@kmadsen could you take a look into this when you have a chance? 🙏 |
Hey @sandyscoffable thanks for reaching out and report your issue. Could you share your requests setup / cc @RingerJK |
@sandyscoffable I'm unable to trace the issue looking at our logic without a reproducible case, but here' a PR that prints more debug data in case this happens again in the future - #4384. If it does happen again, it would be great if we could get our hands on logs with tags Meanwhile, @mapbox/navnative would you be able to briefly walk through your codebase and check whether there could be an issue where returned |
I wouldn't want to resort to the defensive coding yet, especially as long as we're in a beta phase, because a failure to parse the coordinates here would result in a failed reroute request making the navigation session needing a hard restart anyway. Hopefully we'll be able to get to the bottom of this before v2 becomes stable. |
Closing as stale or potentially resolved already but please let us know if this is still reproducible @sandyscoffable! |
👍 .. I'm not working on this mapping related project at the moment, but I'll hopefully get back to it in the next 6 months.. |
I submitted a support ticket to support@mapbox regarding this from our enterprise acct @ Fri 12/3/2021 10:39 AM We are seeing this issue as well on a very regular basis, our developer has reached out to support for assistance, we are willing to do the necessary debugging to assist mapbox is closing this ticket. We are running the Nav and Maps SDK for android... Fatal Exception: java.lang.IllegalArgumentException We are using the following mapbox dependencies in our app. implementation 'com.mapbox.navigation:ui:1.4.0' Here is my below mapbox navigation request. mapboxNavigation.requestRoutes( |
@LukasPaczos @Guardiola31337 @RingerJK I've asked our mobile android developer to follow up on this thread today, and provide any additional code snippets / tracing / stack info that will assist the mapbox team in diagnosing and resolving this issue we face daily in our fleet of courier and transport drivers. |
Email received from @harikhalsa with support ticket #116014 referenced.. updated here for record keeping. |
Adding logcat stack from crash. 12-06 11:56:59.689 4960 4960 E AndroidRuntime: FATAL EXCEPTION: main |
FYI: NAV SDK 1.4.0 |
Hi @wanfranck, Do you have any update on this issue? |
@Sridhar261990 I think we found a problem, will keep you updated when a fix be available |
@RingerJK Thank you sir. |
@RingerJK Thanks Yury! We are eager to deploy a fix to our production fleet as this would greatly improve the driver experience issue we face as a result of this crash. Thanks again to everyone working to resolve this! |
@EricGeiler , right now the issue is fixed for version 2.x. Although the crash on 1.4.0 looks very similar to the crash on 2.x the cause could be different. It's hard to say for sure what is the cause of the cash on 1.4.0 because there are no steps to reproduce. Right now we have a few different assumptions. I prepared a special version of 1.4.0 which logs more - |
@VysotskiVadim thanks for the snapshot, i've tagged out android developer on this, and will we act accordingly to get the required logs from this snapshot. @Sridhar261990 Lets discuss this on our daily call pls. |
Hi @VysotskiVadim, I have tried updating "com.mapbox.navigation:ui:1.4.0-reroute-troubleshooting-SNAPSHOT". |
Hello @Sridhar261990. What version of the Mapbox Navigation SDK do you use right now? 1.4.0? I don't want you to change any code. If you use some different version, i.e. not 1.4.0, please tell me the version number and I will create snapshot for you with exactly the same version but with more logs. |
@VysotskiVadim I am using 1.4.0 version only. implementation "com.mapbox.navigation:ui:1.4.0". |
@Sridhar261990, just to make sure:
maven {
url 'https://api.mapbox.com/downloads/v2/snapshots/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = System.getenv("SDK_REGISTRY_TOKEN") // use your download token here
}
}
implementation 'com.mapbox.navigation:ui:1.4.0-reroute-troubleshooting-SNAPSHOT' And now you're getting build errors with the snapshot, right? |
Build successful. I am getting the package errors. I have added the sna import com.mapbox.navigation.base.options.NavigationOptions; |
Does it mean that you're able to build and run your app with the snapshot? |
Hi @VysotskiVadim, Sorry. I just forget to modify url 'https://api.mapbox.com/downloads/v2/snapshots/maven' instead of url 'https://api.mapbox.com/downloads/v2/releases/maven'. It is working fine. But I am getting errors in Mapsdk import statements. I am using map sdk version - implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.6.1' . Should I change the version? I am getting errors in the following import statements. I am using MapView in my app and I am also using all the navigation sdk ui components. There is no error in navigation ui sdk import statements. But I am getting errors only in map sdk. import com.mapbox.mapboxsdk.Mapbox; |
@Sridhar261990 you need both repos:
your build.gradle setup should look like: // for releases dependencies
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = System.getenv("SDK_REGISTRY_TOKEN") // use your download token here
}
}
// for shapshot dependencies
maven {
url 'https://api.mapbox.com/downloads/v2/snapshots/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
username = "mapbox"
password = System.getenv("SDK_REGISTRY_TOKEN") // use your download token here
}
} |
Thank you @RingerJK . I got it. |
@Sridhar261990 , nice to hear that the snapshot works. We will be waiting for you to come back with new data related to crash. |
@VysotskiVadim We are expecting to roll SNAPSHOT out to our fleet once we finish our current bug fix sprint, we are currently waiting on Rafa Gutierrez @ Mapbox to finish his investigation on Support Ticket #116238 Once we have this pending issue resolved, we will be a position to deploy the SNAPSHOT to our fleet to capture the logging you need via Firebase. |
@EricGeiler, @Sridhar261990 , any updates? Do you have any crashes with the |
Hi @VysotskiVadim , We did n't get any crashes with 1.4.0-reroute-troubleshooting-SNAPSHOT. Thank you for the support. |
@Sridhar261990 , thanks. Please keep in mind that @Sridhar261990 , @EricGeiler, I'm closing this issue as non of your users experienced the cash during rerouting in last 2 month. Please reopen the issue even if you get a single crash. You data can help us improve the SDK. Thank you. cc @RingerJK |
Hi @VysotskiVadim, We got this error again in the last week. Fatal Exception: java.lang.RuntimeException Fatal Exception: java.lang.RuntimeException: Requested element count -1 is less than zero. |
@Sridhar261990 , thank you! Reopening ticket. |
Hi @VysotskiVadim, We got only one crash in the last two or three months. I will update you if we get more crashes. |
Android API: 30
Mapbox Navigation SDK version: 2.0.0-beta2
Steps to trigger behavior
Expected behavior
Reroute should be successful
Actual behavior
App crashes while trying to reroute
Stacktraces (this has happened a couple of times this morning)
The text was updated successfully, but these errors were encountered: