Open pabichw opened 3 years ago
I am facing the same issue. Is there any fix for this?
Did anyone find a solution for this issue ? Im also facing the same.
Same issue for me, but change library https://github.com/Agontuk/react-native-geolocation-service
// function Geolocation.requestAuthorization('whenInUse') .then((result) => { if (result === 'granted') { // success case } }) .catch((error) => console.log(error));
Is my solution
Any other workaround instead of installing new npm package?
@pabichw try reducing timeout value in this
{ enableHighAccuracy: false, timeout: 20000, maximumAge: 1000 }
this solved my problem
@pabichw Were you able to find a solution for this ?
@infazA No, it didn’t happen in my teammates' builds so I decided to postpone this
This also happens to me too. Super weird because like you said it only happens if you don't allow location right away... After waiting a couple seconds it will give you that error...? Any solutions?
This also happens to me too.
This is becoming a big problem for users. Has anyone resolved this?
A potential fix... I re-ran the function on the catch, and well - it worked
A potential fix... I re-ran the function on the catch, and well - it worked
How will you handle the error then. What if it fails again in the catch block. I don't think this is a potential fix. Did you try increasing the timeout value { enableHighAccuracy: false, timeout: 20000, maximumAge: 1000 },
this solved my problem. I was facing the same issue in iOS 14
A potential fix... I re-ran the function on the catch, and well - it worked
How will you handle the error then. What if it fails again in the catch block. I don't think this is a potential fix. Did you try increasing the timeout value
{ enableHighAccuracy: false, timeout: 20000, maximumAge: 1000 },
this solved my problem. I was facing the same issue in iOS 14
I did try this with a value of 200000, but still no luck. Whenever this was happening and I did a fast refresh it would work which is why I tried my solution. I don't even want to call it a solution because it's so quick and dirty but it's a hotfix (for now) to resolve this crash that's happening for many people. This package has not been updated in a while I'm wondering if it had anything to do with new IOS versions.
Same issue for me, but change library https://github.com/Agontuk/react-native-geolocation-service
// function Geolocation.requestAuthorization('whenInUse') .then((result) => { if (result === 'granted') { // success case } }) .catch((error) => console.log(error));
Is my solution
I ended up going this route, works like a charm.
Any solition?
This also happens to me too.
Some android also have this problem.
It also happens to me. any other solution?
Hi guys. I've created PR for this issue. https://github.com/react-native-geolocation/react-native-geolocation/pull/168 This happens on iOS 14+. Feel free to check it out and ping me here if you find any bugs.
Any update here?
Any solution?
When location request dialog pops up
getCurrentPosition
function throws following error almost immediately (after 2-3 seconds). BUT, if I allow app to use location quick enough, then no error is being thrown andonSuccess()
callback executes correctly.Code:
Happens both on simulator and physical device. What is the cause?