Baseflow / Baseflow/flutter-geolocator

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

Open
#1,611 26 comments 6 reactions 1 assignee Claimed by @TimHoogstrate View on GitHub
Dominant language
Dart
Stars
1.3k
Forks
803
Avg merge
8h 16m
Merged PRs (30d)
1

Description

### Please check the following before submitting a new issue.

- [X] I have searched the [existing issues](https://github.com/baseflow/flutter-geolocator/issues).
- [X] I have carefully [read the documentation](https://github.com/Baseflow/flutter-geolocator/blob/main/geolocator/README.md) and verified I have added the required platform-specific configuration.

### Please select affected platform(s)

- [X] Android
- [ ] iOS
- [ ] Linux
- [ ] macOS
- [ ] Web
- [ ] Windows

### Steps to reproduce

Use the getCurrentPosition method with the following 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 the user's location in my app but on an Android Redmi(Android 13) device it will not get the user's current location

### Expected results

want to connect in every device

### Actual results

I do not want to timeout my app content force location tracking so for this issue my app was stuck

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.