Geocoder getFromLocation failed

3,456

Solution 1

See this flutter_geocoding issue (closed): https://github.com/Baseflow/flutter-geocoding/issues/23

Two solutions presented:

  1. create a new emulator
  2. stop WiFi on the emulator, restart WiFi and let it find the network (AndroidWiFi)

Solution 2 worked for me.

Solution 2

Try to WIPE DATA on your emulator. Restart it.

It works.

Solution 3

try to add localeIdentifier parameter. works for me. my function code will be like

List<Placemark> newPlace = await GeocodingPlatform.instance.placemarkFromCoordinates(position.latitude, position.longitude,localeIdentifier: "en");

Solution 4

I had the same problem. Try another emulator (create another emulator as if you are using another android or ios device). May be the current device that is being emulated is having problems connecting to the internet

Solution 5

its mainly due to change in location of your device if you're using a external device like an android phone then you should reboot your device and it'll work .

Share:
3,456
Madhavam Shahi
Author by

Madhavam Shahi

Updated on December 24, 2022

Comments

  • Madhavam Shahi
    Madhavam Shahi over 1 year

    I'm trying to get placemarks from coordinates.

    I'm using geoLocator for that. It was working fine today morning, but now, it throws platform exception.

    PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates (latitude: <lat>, longitude: <long>)., null)
    

    It says it's a network error, but my device is connected to the internet,

    First, i thought there might be some problem in the Geolocator package, so i used Geocoding package, but the problem persists.

    This is the error from geocoder.

    Geocoder getFromLocation --- mService = android.location.ILocationManager$Stub$Proxy@e8c2197, ex = grpc failed, return results = []
    

    Please help.

    • Marc Quebrar Tan
      Marc Quebrar Tan over 3 years
      did u solve this?
    • GrahamD
      GrahamD over 3 years
      Did any of the answers answer your question?
  • ExtraHassan
    ExtraHassan almost 2 years
    thanks, the solution 2 worked for me also