Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.61k stars 291 forks source link

3 Location request timed out #409

Closed Mynameisjohndev closed 7 months ago

Mynameisjohndev commented 1 year ago

Environment

Run npx react-native info in your terminal and copy the results here. System: OS: Windows 10 10.0.19045 CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz Memory: 1.46 GB / 7.87 GB Binaries: Node: 18.12.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: AI-213.7172.25.2113.9014738 Visual Studio: Not Found Languages: Java: 11.0.16 npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.6 => 0.69.6 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found

Platforms

Is this issue related to Android, iOS, or both ? Android

Versions

Please add the used versions/branches

Description

Please provide a clear and concise description of what the bug is. Include screenshots if needed. It was working fine, but today it presented a problem and even with the permissions granted I get this error: 3 Location request timed out.

Reproducible Demo

Provide a detailed list of steps that reproduce the issue.

  1. click in button and I get the error in the terminal

Expected Results

Describe what you expected to happen.

ruijia168 commented 1 year ago

the same issue

arjunramdas commented 1 year ago

In order to access the location in background on device running Android 10 (API level 29) or higher, you also need to use below permission in the manifest file

<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />

Alicehhhmm commented 8 months ago

Versions

I'm in the manifest file added < USES - permission android: name = "android. Permission. ACCESS_BACKGROUND_LOCATION" / > problem is still there

MenamAfzaal commented 7 months ago

System: OS: macOS 13.5.1 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 18.55 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 20.6.0 path: /usr/local/bin/node Yarn: version: 1.22.19 path: /usr/local/bin/yarn npm: version: 9.8.1 path: /usr/local/bin/npm Watchman: version: 2024.01.22.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.12.1 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms:

I'm getting the same error with "react-native-geolocation-service": "^5.3.1", Android device Realme with android version 11 func Geolocation.getCurrentPosition() always return {"code": 3, "message": "Location request timed out."}

Mynameisjohndev commented 7 months ago

later I discovered in reality the GPS on that day in question was affected because of the sun and the signal was messed up

peanut-peanut commented 2 months ago

Maybe can tryforceLocationManager: true it solve my problem