flutterlocation
flutterlocation copied to clipboard
await location.getLocation() some times getting null in iOS devices
More than one month I am using location package, in android devices it is working fine but in iOS physical device or simulator some times it is not working. I debug it and found that it is getting null on await location.getLocation();
Location location = new Location(); LocationData _locationData; _locationData = await location.getLocation(); // Getting null on this line
Same issue. I have also seen it take a realllly long time to return, like 10 to 15 seconds.
From my side when it goes to await.getLocation(); it does not return it stays there forever unless I rerun the app and sometimes it shows null
@mohammednabil95 do you have a distanceFilter set greater than 0?
@sandersaelmans I cannot find distanceFilter in this library.
@sandersaelmans I cannot find distanceFilter in this library.
https://github.com/Lyokone/flutterlocation/blob/ab79cba664284ee44ed3f7076c1c2b3038187afc/packages/location/lib/location.dart#L30
Same issue. I have also seen it take a realllly long time to return, like 10 to 15 seconds.
same happening for me . Do you found any solution for this?
+1
+1
same problem
same issue not working
There seems to be a major issue.
getLocation() works first time. When it is asking for permission. But after that if I restart the app it gets stuck in this line
_locationData = await location.getLocation();
Package version: 4.2.0
Flutter version: 2.8.0
I solved it temporarily it's only we face because of ios simulator not working great for this dependency in a flutter. if select city run or change correct location then it will work.
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.
From my side when it goes to await.getLocation(); it does not return it stays there forever unless I rerun the app and sometimes it shows null
I'm experiencing this same issue. Has anyone found a solution for this as yet?
I have the same problem, how can I solve it?
Same problem.
same problem.. I change between 2 localizations in emulator and then refresh, but I don't know if that can happen in real
I switched out location package for geolocator after many failed attempted tries to resolve the issue.
https://pub.dev/packages/geolocator
I switched out location package for geolocator after many failed attempted tries to resolve the issue.
https://pub.dev/packages/geolocator
did it work? or faced new error?
Being working well since I started using it in May.
Same Issue
some users response similar issue. However, we cannot reproduce the issue... :(