react-native-background-geolocation icon indicating copy to clipboard operation
react-native-background-geolocation copied to clipboard

HTTP post requests are being sent to server even after stopSchedule.

Open mahesh-agrawal-616 opened this issue 3 years ago • 4 comments

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

  1. Start the schedule with HTTP request details by setting the config.
  2. Stop the schedule after some time.
  3. 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 }

mahesh-agrawal-616 avatar Jun 03 '22 11:06 mahesh-agrawal-616

Are you observing the plug-in’s logs in adb logcat or using .emailLog() method?

christocracy avatar Jun 03 '22 11:06 christocracy

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.

mahesh-agrawal-616 avatar Jun 03 '22 12:06 mahesh-agrawal-616

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

christocracy avatar Jun 03 '22 12:06 christocracy

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.

stale[bot] avatar Sep 21 '22 03:09 stale[bot]