-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
I recreated the issue via the Sample app in this repo.
To experience it all you need to do is duplicate the request in the requestLocation() fn.
const requestLocation = () => {
setLoading(true);
setLocation(null);
setError(null);
GetLocation.getCurrentPosition({
enableHighAccuracy: true,
timeout: 30000,
rationale: {
title: 'Location permission',
message: 'The app needs the permission to request your location.',
buttonPositive: 'Ok',
},
})
.then(newLocation => {
setLoading(false);
setLocation(newLocation);
})
.catch(ex => {
if (isLocationError(ex)) {
const {code, message} = ex;
console.warn(code, message);
setError(code);
} else {
console.warn(ex);
}
setLoading(false);
setLocation(null);
});
GetLocation.getCurrentPosition({
enableHighAccuracy: true,
timeout: 30000,
rationale: {
title: 'Location permission',
message: 'The app needs the permission to request your location.',
buttonPositive: 'Ok',
},
})
.then(newLocation => {
setLoading(false);
setLocation(newLocation);
})
.catch(ex => {
if (isLocationError(ex)) {
const {code, message} = ex;
console.warn(code, message);
setError(code);
} else {
console.warn(ex);
}
setLoading(false);
setLocation(null);
});
};Run the app, request a location, deny the service and experience the crash.

Metadata
Metadata
Assignees
Labels
No labels