flutter_mapbox_navigation icon indicating copy to clipboard operation
flutter_mapbox_navigation copied to clipboard

Error occurred fetching offline route: No suitable edges near location - Code: 171

Open tomasweigenast opened this issue 3 years ago • 18 comments

Why I get this error when I try to get a route?

E/MapboxOnboardRouter( 5786): Error occurred fetching offline route: No suitable edges near location - Code: 171
W/valhalla( 5786): /data/valhalla/elevation/ currently has no elevation tiles
I/valhalla( 5786): locations_count::2
I/valhalla( 5786): costing_type::auto
I/valhalla( 5786): total_location_distance::0.142777km
E/valhalla( 5786): Cancelled
I/chatty  ( 5786): uid=10180(com.reddiapp.business) identical 378 lines
E/valhalla( 5786): Cancelled

tomasweigenast avatar Jul 27 '21 00:07 tomasweigenast

I'm having the same issue but only on Android, iOS is working fine. The error occurs on both a physical and virtual Android device, turning on the location of the physical device does not make a difference. The OFFLINE:READ and WRITE options are not enabled in the token.

lorenzowijtman avatar Jul 27 '21 12:07 lorenzowijtman

@lorenzowijtman could you solve it? I tried creating a token with ALL OPTIONS, but it isnt working

tomasweigenast avatar Jul 27 '21 15:07 tomasweigenast

I have the same problem on Android

FreddyMurillo23 avatar Jul 27 '21 15:07 FreddyMurillo23

@TomasWeg This seems to be an Android specific problem and not so much related to the token though I might be wrong. In the documentation they mention the offline routes do not work yet on the Android SDK. Unfortunately I havent found the place where the error occurs yet or a configuration setting we might have missed.

lorenzowijtman avatar Jul 28 '21 07:07 lorenzowijtman

@eopeter what do you know about this issue?

tomasweigenast avatar Jul 29 '21 09:07 tomasweigenast

@lorenzowijtman the way to disable offline routes is not providing the specific scope to the token, but it isn't working

tomasweigenast avatar Jul 29 '21 09:07 tomasweigenast

Anyone managed to figure out the problem yet? So far I figured out that the error occurs in the FlutterMapViewFactory.kt in the method getRoute -> RouteOptions.builder(). As mentioned by @TomasWeg not having offline token scopes deosn't solve the issue

lorenzowijtman avatar Aug 26 '21 10:08 lorenzowijtman

Any news about this bug, it's blocking me from updating :'(

moolsbytheway avatar Sep 16 '21 01:09 moolsbytheway

hey @lorenzowijtman did you find a solution to this ?

BrianRigii avatar Nov 15 '21 09:11 BrianRigii

@eopeter @simon-the-shark kindly assist

BrianRigii avatar Nov 15 '21 10:11 BrianRigii

any updates?

MMDeveloperAcc avatar Dec 11 '21 16:12 MMDeveloperAcc

any updates? @eopeter

BrianRigii avatar Jan 03 '22 07:01 BrianRigii

Pull the master branch which has the latest code. See if it works for you! Have not compiled it into pub plugin.

On Mon, Jan 3, 2022 at 2:40 AM John Brian @.***> wrote:

any updates? @eopeter https://github.com/eopeter

— Reply to this email directly, view it on GitHub https://github.com/eopeter/flutter_mapbox_navigation/issues/136#issuecomment-1003914872, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPLOM5XOFOBJCAYNB5XVL3UUFHG3ANCNFSM5BBFHYIA . You are receiving this because you were mentioned.Message ID: @.***>

-- Sincerely Emmanuel Oche

eopeter avatar Jan 03 '22 07:01 eopeter

@eopeter Thank you for your response, after puling the master branch the project couldn't build

some of the errors logged are :

/home/bryan/.pub-cache/git/flutter_mapbox_navigation-13873acdef7d4c2d1dfc53606ecf4e911cd52e38/android/src/main/kotlin/com/dormmom/flutter_mapbox_navigation/FlutterMapboxNavigationPlugin.kt: (170, 7): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.

/home/bryan/.pub-cache/git/flutter_mapbox_navigation-13873acdef7d4c2d1dfc53606ecf4e911cd52e38/android/src/main/kotlin/com/dormmom/flutter_mapbox_navigation/FlutterMapboxNavigationPlugin.kt: (192, 23): Out-projected type 'HashMap<*, *>' prohibits the use of '@RecentlyNullable public open fun get(@RecentlyNullable key: K): V? defined in java.util.HashMap'

how can i resolve this ?

BrianRigii avatar Jan 03 '22 08:01 BrianRigii

This is still an issue on master 13873acdef7d4c2d1dfc53606ecf4e911cd52e38 it seems

@BrianRigii

after puling the master branch the project couldn't build

Try updating your Kotlin version in build.gradle, I'm currently using ext.kotlin_version = '1.6.10' but you can find the latest version here.

qcasey avatar Jan 06 '22 18:01 qcasey

Was anyone able to get this working so far? pulled the latest code from github and updated kotlin, i can compile it but the error is still there and i don't see any navigation overlay because of that.

Tysonpower avatar Jan 27 '22 21:01 Tysonpower

To solve this bug i've commented the line .user(UUID.randomUUID().toString()) in the Utility.kt file at line 340. I'm using the master branch.

willylambert avatar Mar 04 '22 08:03 willylambert

E/MapboxOnboardRouter( 5786): Error occurred fetching offline route: No suitable edges near location - Code: 171 W/valhalla( 5786): /data/valhalla/elevation/ currently has no elevation tiles I/valhalla( 5786): locations_count::2 I/valhalla( 5786): costing_type::auto I/valhalla( 5786): total_location_distance::0.142777km E/valhalla( 5786): Cancelled I/chatty ( 5786): uid=10180(com.reddiapp.business) identical 378 lines E/valhalla( 5786): Cancelled

I am also getting this error both in physical and emulator android device, when doing embedded navigation in android. IOS is working fine. Please help

mahira13 avatar Jul 07 '22 11:07 mahira13

This issue is resolved

eopeter avatar May 19 '23 11:05 eopeter

I'm getting this issue in my Android app yet

Layoneth avatar Jun 06 '23 11:06 Layoneth

Can you provide more details on the error? What lat lng are you navigating to?

eopeter avatar Jun 06 '23 11:06 eopeter

Sure! I'm testing with this coordinates: lat: 31.078346 lng: 30.115171

This is my first point. For the second point I'm using the previous point plus 1.543225. I'm using default options btw.

Layoneth avatar Jun 06 '23 11:06 Layoneth

Does the sample app work for you?

eopeter avatar Jun 06 '23 11:06 eopeter

No, I'm getting the same error

getRoute("https://api.mapbox.com/directions/v5/mapbox/driving-traffic/-122.4353977,37.7744068;-122.4240981,37.7655696?access_token=****jW3A&geometries=polyline6&alternatives=true&overview=full&steps=true&continue_straight=true&annotations=congestion_numeric%2Cmaxspeed%2Cclosure%2Cspeed%2Cduration%2Cdistance&language=en&roundabout_exits=true&voice_instructions=true&banner_instructions=true&voice_units=imperial&waypoints=0%3B1&waypoint_names=Home%3BStore&enable_refresh=true") id 0 failed: RouterException No suitable edges near location

maybe is my token, I created with all the permissions. Also the map is always black

Screenshot 2023-06-06 at 1 58 03 PM

Layoneth avatar Jun 06 '23 11:06 Layoneth

Did this work for you? Is it a token issue?

eopeter avatar Jun 07 '23 09:06 eopeter

I just realize it was the emulator, I just use another one and work perfectly! Thank you so much!

Layoneth avatar Jun 07 '23 11:06 Layoneth