Baseflow / flutter-geolocator

Android and iOS Geolocation plugin for Flutter
https://baseflow.com/
MIT License
1.25k stars 662 forks source link

[Bug]: TimeoutException after 0:00:10.000000: Future not completed #1611

Open jenilAipxperts opened 4 days ago

jenilAipxperts commented 4 days ago

Please check the following before submitting a new issue.

Please select affected platform(s)

Steps to reproduce

GetgetCurrentPosition and use this sample code userPositionData = await Geolocator.getCurrentPosition( locationSettings: LocationSettings( accuracy: LocationAccuracy.high, distanceFilter: 10, timeLimit: const Duration(seconds: 10), ));

I don't want a limit I want to connect forcefully user's location in my app but on an Android Redmi(Android 13) device it will not get user's current location

Expected results

want to connect in every device

Actual results

I Dont want to timeout my app content force location tracking so for this issue my app was stuckdont

Code sample

userPositionData = await Geolocator.getCurrentPosition( locationSettings: LocationSettings( accuracy: LocationAccuracy.high, distanceFilter: 10, timeLimit: const Duration(seconds: 10), ));

Screenshots or video

Screenshots or video demonstration [Upload media here]

Version

geolocator: ^13.0.2

Flutter Doctor output

flutter --version Flutter 3.24.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision dec2ee5c1f (12 days ago) • 2024-11-13 11:13:06 -0800 Engine • revision a18df97ca5 Tools • Dart 3.5.4 • DevTools 2.37.3

aarican1 commented 1 day ago

I got this error in my app. The future has not been completed for a long time. If you fix the error, let me know.

br-programmer commented 17 hours ago

I’m experiencing the same issue when running on the iOS simulator. The location request doesn't seem to work as expected. Has anyone found a workaround or a potential fix for this?

jenilAipxperts commented 17 hours ago

I’m experiencing the same issue when running on the iOS simulator. The location request doesn't seem to work as expected. Has anyone found a workaround or a potential fix for this?

Hello @br-programmer In iOS, I’m not facing any issues. Please verify it on a real device.