react-native-background-geolocation
react-native-background-geolocation copied to clipboard
HTTP post requests are being sent to server even after stopSchedule.
Your Environment
- Plugin version: 3.9.3
- Platform: iOS or Android iOS
- OS version: 15.2
- Device manufacturer / model: iPhone 13 Pro
- React Native version (
react-native -v): 0.63.4 - Plugin config
BackgroundGeolocation.stopSchedule();
BackgroundGeolocation.onHttp((response) => {
console.log("[onHttp] ", JSON.stringify(response));
});
Expected Behavior
I was expecting that the HTTP post process should stop after calling stopSchedule();
Actual Behavior
onHTTP is being called even after stopping the schedule.
Steps to Reproduce
- Start the schedule with HTTP request details by setting the config.
- Stop the schedule after some time.
- Observe the onHTTP is still being called.
Context
Was trying to track users location based on schedule.
Debug logs
Logs
PASTE_YOUR_LOGS_HERE
[onHttp] { responseCode: 500 }
Are you observing the plug-in’s logs in adb logcat or using .emailLog() method?
I am observing the calls on my backend and i am sure that its my log as the entire app is in dev mode and i am only working on this. Also i am getting logs inside onHTTP method.
It’s not the same. You need to observe the plug-in’s logs to see what’s really happening.
the answer is in the plugin logs.
see wiki Debugging
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open.