Skip to content

Error() is not triggering #449

@sayan-avantai

Description

@sayan-avantai

I have only tested this in android physical device till yet. so I am getting the lat,long. but if i turn off the gps then error() is not triggering.
Again if I turn on the gps then again I am getting lat,long

Versions

Please add the used versions/branches

  • react-native-geolocation-service: "^5.3.1"
  • react-native: "0.76.2",
  • react: "18.3.1"
const fetchCurrentLocation = async () => {
 Geolocation.watchPosition(
  (position) => {
    console.log('Position:', position);
  },
  (error) => {
    console.warn('Location error:', error);
  },
  {
    enableHighAccuracy: true,
    interval:5000,
    timeout: 5000, 
    maximumAge: 5000,
    distanceFilter: 0,
    fastestInterval: 2000,
  }
);
};
useEffect(() => {
    fetchCurrentLocation();

}, [])

Sometimes I am getting the error, Most of the times I am not getting the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions