Baseflow / flutter-geocoding

A Geocoding plugin for Flutter
https://baseflow.com
MIT License
134 stars 69 forks source link

locationFromAddress doesn't work #49

Closed AlanTso closed 2 years ago

AlanTso commented 3 years ago

🐛 Bug Report

Below is part of my code try { locations = await GeocodingPlatform.instance.locationFromAddress(text);
} catch (e) { print(e); } print('Total ${locations.length} results found!'); // other parts are fetching the lat, long data from the List and show a tag on google map. //I used Google Place API works perfectly fine, but too expensive so I try to use this plugin.

Expected behavior

1) Most of the places doesn't work and return exception like below. I/flutter (11746): London I/flutter (11746): PlatformException(IO_ERROR, A network error occurred trying to lookup the address ''., null, null) I/flutter (11746): Total 0 results found!

I/flutter (11746): St. Martin in the fields I/flutter (11746): PlatformException(IO_ERROR, A network error occurred trying to lookup the address ''., null, null) I/flutter (11746): Total 0 results found!

2) It works in some places in Hong Kong(even in Cantonese) and returns one location, like below

I/flutter (11746): 沙田 I/flutter (11746): Total 1 results found!

I have read your message on https://github.com/Baseflow/flutter-geocoding/issues/9 and https://github.com/Baseflow/flutter-geocoding/issues/23 but they do not help me to solve the problem.

Could you please give me more advice? Thank you!

Reproduction steps

Configuration

Run one real Android mobile. Flutter is the latest version that I update on April 2021. using geocoding: ^2.0.0

Version: 1.x ^2.0.0 Platform:

othenos commented 3 years ago

Same issue when running new instance of the app in the Android emulator. On subsequent runs, the operation does not fail. Using GeoCoding 2.0.0.

List<Location> locations = await locationFromAddress(address);

Screen Shot 2021-04-28 at 10 03 29 AM
AlanTso commented 3 years ago

Same issue when running new instance of the app in the Android emulator. On subsequent runs, the operation does not fail. Using GeoCoding 2.0.0.

List<Location> locations = await locationFromAddress(address);

Screen Shot 2021-04-28 at 10 03 29 AM

Hi,

Thank you for your reply. But I ran the code on a real device, not an Android emulator.

yulkin2002 commented 3 years ago

same issue on real device, but only happens intermittently. I.e. it can fail with the following exception, but would work on a subsequent run.

PlatformException(IO_ERROR, A network error occurred trying to lookup the address ''., null, null)

neoacevedo commented 3 years ago

I have the same issue:

Unhandled Exception: PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates (latitude: ####, longitude: ####)., null, null)

yulkin2002 commented 3 years ago

any updates on this? app seems to throw this exception at random times with perfectly correct address given

nehal076 commented 2 years ago

Facing the same issue

Sheitak commented 2 years ago

Hello, faced for a few hours with the same thing. Oddly enough, it suddenly happened without me changing much Stable 2.2.3, Pixel 2 API 30 Emulator Capture d’écran du 2021-07-29 14-00-19

ugin331 commented 2 years ago

Same issue here. Pixel 3a API 30 Emulator, 2.4.0-0.0.pre. It was working then it just randomly stopped working after that.

yulkin2002 commented 2 years ago

@mvanbeusekom, is this plugin still supported? I don't see anyone replying to open issues for several months

mvanbeusekom commented 2 years ago

Hi @yulkin2002 and others,

Yes this plugin is still being maintained although a bit neglected due to busy work schedule and planned holiday. This issue however is caused by the rate limitations related to the free services provided by Android (see README and also issues #9, #12, #23, #28 and #35).

I will be closing this issue now as there is nothing I can do about this error. You are simply hitting the limitations of the free services provided by Google and Apple.