Open carstenhag opened 3 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still able to Reproduce the same thing with 1.1.0 core and ui
Hey @carstenhag 👋
Could you share your request setup / RouteOptions
you're adding and the DirectionsRoute
that you get / use when you have a chance?
cc @mskurydin @SiarheiFedartsou @etl
Sure, here's the info I have :). I can only give you the routeOptions, we don't get any DirectionsRoute back at the routesRequestCallback
.
Gson().toJson(routeOptions)
:
{
"accessToken":"pk.eyXXXXXXX.TXXXXXXX",
"bannerInstructions":true,
"baseUrl":"https://api.mapbox.com",
"coordinates":[
{
"coordinates":[
0.1074297,
38.8397132
],
"type":"Point"
},
{
"coordinates":[
10.029649,
48.456818
],
"type":"Point"
},
{
"coordinates":[
9.210879000000002,
49.1426929
],
"type":"Point"
}
],
"geometries":"polyline6",
"language":"de_DE",
"profile":"driving-traffic",
"requestUuid":"",
"steps":true,
"user":"mapbox",
"voiceInstructions":true
}
2020-12-22 12:57:16.876 com.package.name E/MapboxOnboardRouter: Error occurred fetching offline route: No suitable edges near location - Code: 171
val routeoptions = RouteOptions.builder()
.applyDefaultParams()
.accessToken(mapboxApiToken)
.coordinates(coordinates)
.steps(true)
.voiceInstructions(true)
.bannerInstructions(true)
.language(deviceLanguage)
.profile(DirectionsCriteria.PROFILE_DRIVING_TRAFFIC)
.build()
currentMapboxNavigation?.requestRoutes(
routeoptions,
routesRequestCallback
)
Currently the app just loads and loads (but it never completes/aborts). Maybe we need to override onRoutesRequestFailure
, I just saw that callback?
@carstenhag Hey! This is a fairly long route and requires a good piece of the routing graph.
We currently maintain a small ambient cache of routing tiles in the area of driving and support the off-line routing in this area. We are working on a broader solution for pre-caching arbitrary areas on-board.
Agree, I think this includes my current location (I'm on vacation), but it also applied when I was still at home (Near Mering).
But as far as I understand, this is caused by there not being offline data cached and the device being offline. Then it was just a misunderstanding from my side, maybe the error message could be improved to hint how to handle that case? (eg, mention onRoutesRequestFailure, in retrospect I feel dumb not having tried using it before)
any solutions? I am having the same problem now, I have been stucking here for a few days already.
I use com.mapbox.navigation:core:1.5.0' and com.mapbox.navigation:ui:1.5.0'
And I don't know why .applyDefaultParams() is showing red in my code and also I keep getting this error too: com.mapbox.navigation.utils.NavigationException: Error occurred fetching offline route: No suitable edges near location - Code: 171
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
com.mapbox.navigation:ui:1.5.0 still having this issue. how to fix it ?
As I commented at https://github.com/mapbox/mapbox-navigation-android/issues/3575#issuecomment-749616635, pretty sure the issue/solution is:
for me, using applyDefaultParams()
in the RouteOptions.builder()
works, and only override the relevant properties, e.g: profile
, coordinates
& accessToken
Android API: OnePlus 5 and Samsung A70 with Android 10 Mapbox Navigation SDK version:
Using version 1.1.0-alpha.4 due to #3554. Can't test previous versions as it crashes there instantly.
Steps to trigger behavior
Expected behavior
Navigation does not fail OR we can subscribe to an error somewhere
Actual behavior
Navigation fails, no clue how to safeguard this