Giter Club home page Giter Club logo

Comments (19)

asifalikhokhar avatar asifalikhokhar commented on May 26, 2024 10

it writes out a error log "Unable to fetch location within 15.0s." in iOS

from react-native-geolocation-service.

Agontuk avatar Agontuk commented on May 26, 2024 1

Can you try adding distanceFilter: 0 to the options and see if it helps ? I've added a FAQ section for some possible solutions, check if that helps.

from react-native-geolocation-service.

kdrich avatar kdrich commented on May 26, 2024 1

@asifalikhokhar

Have you verified that the app has location permissions? I.e. if you go into Settings > Privacy > {{yourApp}} and enable location services, do you still have this timeout issue?

from react-native-geolocation-service.

bhumijoshi-gkblabs avatar bhumijoshi-gkblabs commented on May 26, 2024 1

@asifalikhokhar

Have you verified that the app has location permissions? I.e. if you go into Settings > Privacy > {{yourApp}} and enable location services, do you still have this timeout issue?

Worked for me Thanks @asifalikhokhar

from react-native-geolocation-service.

Agontuk avatar Agontuk commented on May 26, 2024

Hello, can you try the example project and see if it works? Also which device are you using? Does it have a stock rom or other custom roms ?

from react-native-geolocation-service.

nkrmr avatar nkrmr commented on May 26, 2024

I tried the example and i have the same issue. I use a HUAWEI GRA-UL00.
You can check the example result and the phone properties:
img_2981
img_2980

from react-native-geolocation-service.

Agontuk avatar Agontuk commented on May 26, 2024

Can you try getting location with other apps such as Google Maps and see if it works ?

from react-native-geolocation-service.

nkrmr avatar nkrmr commented on May 26, 2024

Yes it works when i use Google map and geolocation because he fill up the GPS cache of the phone. But how i can have geolocation without use GPS cache?

from react-native-geolocation-service.

Agontuk avatar Agontuk commented on May 26, 2024

what's the timeout value, also are you using high accuracy? Can you increase the timeout and see if it still returns timeout error ? Also try restarting the device.

It would be great if you can provide android native logs by using adb shell logcat when requesting location. I saw on google that many people seems to have gps issues on Huawei P8/P9 devices, so not sure what the actual issue is.

from react-native-geolocation-service.

nkrmr avatar nkrmr commented on May 26, 2024

I have the same result with a high timeout, i use :
{ enableHighAccuracy: true, timeout: 200000, maximumAge: 10000 },

I have the same issue with an S8 phone. I generated a logcat if you to see what appends.

logcat.txt

Best regards

from react-native-geolocation-service.

Agontuk avatar Agontuk commented on May 26, 2024

I took a look at the log but didn't find anything useful to understand the actual issue, except for this line

01-25 14:55:09.417  3430  6519 I libgps  : Uknown message 0 in ../../../../tmp/14533598_251844/customers/huawei/k3v3android/delivery/libgps/libgps.cpp:326

The main problem with android devices is that in most of them gps issue exist. I also had timeout issue on my Xiaomi device, but it got fixed after software update. The devices you're testing with (Huawei P8/ Samsung S8), both seem to have this issue too, reported by many users. If you can, upload the logs of samsung device so I can take a look.

I'll try and see if anything can be done to fix this. In the mean time my suggestion is to checkout various location related settings and see if any particular configuration works for you. Also -

  • For Huawei device, try adding your app to the Protected Apps list
  • For Samsung, disable App Power Saving for your app
  • Try with enableHighAccuracy: false
  • Try disabling power saving mode if it's enabled
  • Update your device if any software update is available
  • Update Google play service if there's a new version
  • Try restarting the device
  • Try checking your gps with gps test apps in play store

from react-native-geolocation-service.

antonsivogrivov avatar antonsivogrivov commented on May 26, 2024

Same for me here

from react-native-geolocation-service.

antonsivogrivov avatar antonsivogrivov commented on May 26, 2024

I test on MEIZU MX5, sometimes it works fine, but more often it's not.

from react-native-geolocation-service.

booker0108 avatar booker0108 commented on May 26, 2024

@antonsivogrivov Does your MEIZU MX5 come with Google Play Service?

My target users are most likely from China which Google Play Services are not installed on their device.

from react-native-geolocation-service.

antonsivogrivov avatar antonsivogrivov commented on May 26, 2024

No, I haven't got Google Play Service

from react-native-geolocation-service.

Michaelvons avatar Michaelvons commented on May 26, 2024

the simple answer is to step out of where you are and go to open space then try again.

Its simple science.

GPS services are affected by thick walls and cars.

This worked for me. No need to edit anything !!!

from react-native-geolocation-service.

Agontuk avatar Agontuk commented on May 26, 2024

Closing due to inactivity, feel free to open new issue.

from react-native-geolocation-service.

Sbphillips19 avatar Sbphillips19 commented on May 26, 2024

I am having a weird issue where when I test on my android s6 the gps location with my internal test track the location piece isn't working. It's a phone without cellular data, so maybe it's related to that, but I have no issues in any of my simulators. Wondering if cellular data would have something to do with it?

from react-native-geolocation-service.

hhunaid avatar hhunaid commented on May 26, 2024

I had an issue in iOS where the permissions in system settings state "Ask next time" but it would never ask and always time out. Changed it to "Allow" in system settings and it started to work.

from react-native-geolocation-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.