eopeter / flutter_mapbox_navigation

Turn By Turn Navigation for Your Flutter Application
Apache License 2.0
217 stars 184 forks source link

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

Closed tomasweigenast closed 1 year ago

tomasweigenast commented 3 years ago

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
lorenzowijtman commented 3 years ago

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.

tomasweigenast commented 3 years ago

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

FreddyMurillo23 commented 3 years ago

I have the same problem on Android

lorenzowijtman commented 3 years ago

@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.

tomasweigenast commented 3 years ago

@eopeter what do you know about this issue?

tomasweigenast commented 3 years ago

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

lorenzowijtman commented 3 years ago

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

moolsbytheway commented 3 years ago

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

BrianRigii commented 3 years ago

hey @lorenzowijtman did you find a solution to this ?

BrianRigii commented 3 years ago

@eopeter @simon-the-shark kindly assist

MMDeveloperAcc commented 2 years ago

any updates?

BrianRigii commented 2 years ago

any updates? @eopeter

eopeter commented 2 years ago

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

BrianRigii commented 2 years ago

@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 ?

qcasey commented 2 years ago

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.

Tysonpower commented 2 years ago

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.

willylambert commented 2 years ago

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.

mahira13 commented 2 years ago

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

eopeter commented 1 year ago

This issue is resolved

Layoneth commented 1 year ago

I'm getting this issue in my Android app yet

eopeter commented 1 year ago

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

Layoneth commented 1 year ago

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.

eopeter commented 1 year ago

Does the sample app work for you?

Layoneth commented 1 year ago

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
eopeter commented 1 year ago

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

Layoneth commented 1 year ago

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