You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a schedule is configured and the plug-in is started that schedule will always be running.
Actual Behavior
When a schedule is configured and the plug-in is initialized it starts working as expected. But sometimes after a certain number of days or even hours the schedule stops working. It seems that it does not detect positions or something like that.
To set up a schedule I am currently doing this:
constresetSchedule=async(workdays?: Workdays): Promise<void>=>{try{const schedule =workdays ? getSchedule(workdays) : [];// getSchedule(workdays) returns a string array like this: ["1 00:00-18:00"]awaitBackgroundGeolocation.stopSchedule();awaitBackgroundGeolocation.stop();awaitBackgroundGeolocation.setConfig({
schedule,});}catch(error){Alert.alert('Something went wrong while reset schedule');}};constconfigureSchedule=async({
workdays, isTrackingAlwaysActive =isTrackingAlways,}: ConfigureScheduleParamsType): Promise<void>=>{try{awaitresetSchedule(workdays);if(toggleStatus&&isTrackingAlwaysActive){awaitBackgroundGeolocation.start();}if(toggleStatus&&!isTrackingAlwaysActive){awaitBackgroundGeolocation.startSchedule();}}catch(error){// error}};
Steps to Reproduce
Configure a schedule with BackgroundGeolocation.setConfig()
Trigger . startSchedule
Left the app in background.
Context
Wednesday, 26 June
The schedule was set up and worked as expected, tracking the day from 00:00 to 18:00.
As you can see, the tracking service stopped sending the location at 17:59:34 to the server. The user continued moving but was out of schedule, this behavior is expected.
On the map, you can see an image with the information of the last position sent to the server.
Thursday, 27 June
This is the last log from Wednesday, 26 June.
This is the first log for Thursday, 27 June.
The user continued moving, but none of the positions were sent to the server, and we are unable to see them in the logs as well. The last thing we saw on the logs was something related to geofences but we are not using the functionality (just in case).
One thing I noticed in the documentation is that the schedule property receives an array. However, in the logs, the schedule property is using () for the array. Thats something is just happening on iOS and it could just be how the log is being printed, but I thought I'd mention it in case it helps you as well.
Debug logs
Logs
I share with you the logs file because is too large.
One thing I noticed in the documentation is that the schedule property receives an array. However, in the logs, the schedule property is using () for the array.
This is nothing to worry about. This is merely how an Obj-c NSArray#as_string method prints its contents to the logs.
Your Environment
react-native -v
): 0.72.6Expected Behavior
When a schedule is configured and the plug-in is started that schedule will always be running.
Actual Behavior
When a schedule is configured and the plug-in is initialized it starts working as expected. But sometimes after a certain number of days or even hours the schedule stops working. It seems that it does not detect positions or something like that.
To set up a schedule I am currently doing this:
Steps to Reproduce
Context
Wednesday, 26 June
The schedule was set up and worked as expected, tracking the day from 00:00 to 18:00.
![Screenshot 2024-06-27 at 10 26 23 AM copy](https://private-user-images.githubusercontent.com/17710256/344297172-401568e7-e6dc-45e9-af51-9affefb34854.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk4MjI5OTIsIm5iZiI6MTcxOTgyMjY5MiwicGF0aCI6Ii8xNzcxMDI1Ni8zNDQyOTcxNzItNDAxNTY4ZTctZTZkYy00NWU5LWFmNTEtOWFmZmVmYjM0ODU0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzAxVDA4MzEzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIxZDk5YmJlMjdlMjBhNWYzYjQ0NjI2YWQyYzEyYTc1YTYyMTRhYmNiNGFlNjRlYmVlY2JjMzZhNGYzZjkyYWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._FtWC596hXpVvJ-NDEQ8cjkbkS5P-Gyp3LnkMDRMQAM)
As you can see, the tracking service stopped sending the location at 17:59:34 to the server. The user continued moving but was out of schedule, this behavior is expected.
On the map, you can see an image with the information of the last position sent to the server.
Thursday, 27 June
The user continued moving, but none of the positions were sent to the server, and we are unable to see them in the logs as well. The last thing we saw on the logs was something related to geofences but we are not using the functionality (just in case).
One thing I noticed in the documentation is that the schedule property receives an array. However, in the logs, the schedule property is using () for the array. Thats something is just happening on iOS and it could just be how the log is being printed, but I thought I'd mention it in case it helps you as well.
Debug logs
Logs
I share with you the logs file because is too large.
background-geolocation.log-14.gz
The text was updated successfully, but these errors were encountered: