Skip to content
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

instructionIndex is null message #7827

Open
wirthandras opened this issue Jun 12, 2024 · 2 comments
Open

instructionIndex is null message #7827

wirthandras opened this issue Jun 12, 2024 · 2 comments

Comments

@wirthandras
Copy link

wirthandras commented Jun 12, 2024

Hello!

We got message sometimes from navigation lib like this "instructionIndex is null"

Our business code is request a new route on custom events during navigation (not just once).
And the requested new route has shared waypoints with the previous one.
And We are using silent waypoints except first and last waypoints.

mapboxNavigation.requestRoutes(
            RouteOptions.builder()
                .applyDefaultNavigationOptions()
                .applyLanguageAndVoiceUnitOptions(this)
                .coordinatesList(coordinates)
                .waypointIndicesList(
                    listOf(0, lastIndex)
                )
                .build(),
            object : NavigationRouterCallback {
                override fun onCanceled(routeOptions: RouteOptions, routerOrigin: RouterOrigin) {
                    // no impl
                }

                override fun onFailure(reasons: List<RouterFailure>, routeOptions: RouteOptions) {
                    // no impl
                }

                override fun onRoutesReady(
                    routes: List<NavigationRoute>,
                    routerOrigin: RouterOrigin
                ) {
                  mapboxNavigation.setNavigationRoutes(routes)
                }
            }
        )

implemetation based of this example

Android API: 28
Mapbox Navigation SDK version: 2.19.0

Steps to trigger behavior

  1. Request a route to start navigation
  2. Little delay or travel to half of the path
  3. Request a new route and set it again.. and again until custom end.

Expected behavior

no instructionIndex is null message and no weird navigation

Actual behavior

instructionIndex is null message occured some times, and the navigation became weird, (weird == navigation seems lost, the progress observer produce false data related to remaining waypoint count)
Our experience say mostly happen in intersections, but not at all

@Aminsaveh
Copy link

I have the same problem. I tried to debug it bottom-to-up, and finally, I found out that the status coming from NavigatorObserver had a null bannerInstruction that caused this problem. This bug comes from the native processor.

Mapbox Navigation SDK version: 2.20.2

@Aminsaveh
Copy link

@VysotskiVadim, @kiryldz, Could You please take a look at this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants