Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location service did not restart #2247

Open
invictustech opened this issue Jan 9, 2025 · 12 comments
Open

Location service did not restart #2247

invictustech opened this issue Jan 9, 2025 · 12 comments
Labels

Comments

@invictustech
Copy link

Your Environment

  • Plugin version: 4.16.3
  • Platform: Android
  • OS version: 14
  • Device manufacturer / model: Samsung Galaxy S23 Ultra
  • React Native version (react-native -v):0.72.10
  • Plugin config
`BackgroundGeolocation.ready({
      logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
      // Geolocation
      desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
      distanceFilter: 0,
      stopTimeout: 5,
      // Permissions
      locationAuthorizationRequest: 'Always',
      backgroundPermissionRationale: {
        title: "Allow {applicationName} to access this device's location even when closed or not in use.",
        message: "This app collects location data to enable recording your trips to work and calculate distance-travelled.",
        positiveAction: 'Change to "{backgroundPermissionOptionLabel}"',
        negativeAction: 'Cancel'
      },
      // Application
      stopOnTerminate: false,
      startOnBoot: true,
      enableHeadless: true,
      foregroundService:true,
      desiredOdometerAccuracy:10,
      showsBackgroundLocationIndicator:true,
      disableStopDetection:true,
      isMoving:true,
      heartbeatInterval:60,
      disableElasticity:true,
      stationaryRadius:25,
      locationUpdateInterval:5000,
      fastestLocationUpdateInterval:10000,
      notification: {
        title: "REACH FOR SURE",
        text: "",
      },
      speedJumpFilter:50
    }).then(state => {
      BackgroundGeolocation.setOdometer(0)
      BackgroundGeolocation.start()
    })`

Expected Behavior

I have configured it to work whole time until user ends it.

Actual Behavior

The service got terminated on its own and did not restart on movement.

Steps to Reproduce

Context

Debug logs

Logs
`01-07 23:00:48.878 INFO [TrackingService b] 
  ℹ️  Location availability: false
01-07 23:00:48.879 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 41993, eventCount: 0, sticky: true]
01-07 23:00:51.724 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [isMoving]
01-07 23:00:51.726 INFO [TSLocationManager d] 
  🔴  Location-services: OFF
01-07 23:00:51.726 DEBUG [TSLocationManager a] 
  ℹ️  Clear last odometer location
01-07 23:00:51.727 DEBUG [AbstractService b] 
  🎾  STOP [TrackingService startId: 41994, eventCount: 1]
01-07 23:00:51.727 DEBUG [AbstractService a] 
  ⚙️︎   FINISH [TrackingService startId: 41994, eventCount: 0, sticky: false]
01-07 23:00:51.728 INFO [ActivityRecognitionService stop] 
  🔴  Stop motion-activity updates
01-07 23:00:51.728 DEBUG [TSGeofenceManager c] 
  🔴  Stop monitoring geofences
01-07 23:00:51.730 INFO [HeartbeatService stop] 
  🔴  Stop heartbeat
01-07 23:00:51.731 DEBUG [HttpService stopMonitoringConnectivityChanges] 
  🔴  Stop monitoring connectivity changes
01-07 23:00:51.731 DEBUG [DeviceSettings stopMonitoringPowerSaveChanges] 
  🔴  Stop monitoring powersave changes
01-07 23:00:52.206 DEBUG [AbstractService f] 
  ⚙️︎  TrackingService.stopSelfResult(41994): true
01-07 23:00:52.208 DEBUG [AbstractService onDestroy] 
  🔴  TrackingService stopped
01-07 23:00:55.555 INFO [ScheduleEvent a] 
╔═════════════════════════════════════════════
║ ⏰ OneShot event fired: TERMINATE_EVENT
╠═════════════════════════════════════════════

01-07 23:00:55.556 DEBUG [TerminateEvent$a onChange] 
  ℹ️  TERMINATE_EVENT ignored (MainActivity is still active).
01-07 23:01:14.799 WARN [RNBackgroundGeolocationModule ready] 
  ⚠️  #ready already called.  Redirecting to #setConfig
01-07 23:01:14.799 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [isMoving, notification, notification.text]
01-07 23:01:14.802 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [notification, notification.text]
01-08 08:37:11.025 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ TSLocationManager version: 3.5.4 (433)
╠═════════════════════════════════════════════
╟─ samsung SM-S918B @ 14 (react)
{
  "activityRecognitionInterval": 10000,
  "allowIdenticalLocations": false,
  "authorization": {},
  "autoSync": true,
  "autoSyncThreshold": 0,
  "backgroundPermissionRationale": {
    "title": "Allow {applicationName} to access this device's location even when closed or not in use.",
    "message": "This app collects location data to enable recording your trips to work and calculate distance-travelled.",
    "positiveAction": "Change to \"{backgroundPermissionOptionLabel}\"",
    "negativeAction": "Cancel"
  },
  "batchSync": false,
  "configUrl": "",
  "crashDetector": {
    "enabled": false,
    "accelerometerThresholdHigh": 20,
    "accelerometerThresholdLow": 4.5,
    "gyroscopeThresholdHigh": 20,
    "gyroscopeThresholdLow": 4.5
  },
  "debug": false,
  "deferTime": 0,
  "desiredAccuracy": -1,
  "desiredOdometerAccuracy": 10,
  "disableAutoSyncOnCellular": false,
  "disableElasticity": true,
  "disableLocationAuthorizationAlert": false,
  "disableMotionActivityUpdates": false,
  "disableProviderChangeRecord": false,
  "disableStopDetection": true,
  "distanceFilter": 0,
  "elasticityMultiplier": 1,
  "enableHeadless": true,
  "enableTimestampMeta": false,
  "extras": {},
  "fastestLocationUpdateInterval": 10000,
  "foregroundService": true,
  "geofenceInitialTriggerEntry": true,
  "geofenceModeHighAccuracy": false,
  "geofenceProximityRadius": 1000,
  "geofenceTemplate": "",
  "headers": {},
  "headlessJobService": "com.transistorsoft.rnbackgroundgeolocation.HeadlessTask",
  "heartbeatInterval": 60,
  "httpRootProperty": "location",
  "httpTimeout": 60000,
  "isMoving": true,
  "locationAuthorizationRequest": "Always",
  "locationTemplate": "",
  "locationTimeout": 60,
  "locationUpdateInterval": 1000,
  "locationsOrderDirection": "ASC",
  "logLevel": 5,
  "logMaxDays": 2,
  "maxBatchSize": -1,
  "maxDaysToPersist": 1,
  "maxMonitoredGeofences": 97,
  "maxRecordsToPersist": -1,
  "method": "POST",
  "minimumActivityRecognitionConfidence": 75,
  "motionTriggerDelay": 0,
  "notification": {
    "layout": "",
    "title": "REACH FOR SURE",
    "text": "You are Off Duty now",
    "color": "",
    "channelName": "TSLocationManager",
    "channelId": "",
    "smallIcon": "",
    "largeIcon": "",
    "priority": -1,
    "sticky": false,
    "strings": {},
    "actions": []
  },
  "params": {},
  "persist": true,
  "persistMode": 2,
  "schedule": [],
  "scheduleUseAlarmManager": false,
  "speedJumpFilter": 50,
  "startOnBoot": true,
  "stationaryRadius": 25,
  "stopAfterElapsedMinutes": 0,
  "stopOnStationary": false,
  "stopOnTerminate": false,
  "stopTimeout": 5,
  "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking",
  "url": "",
  "useSignificantChangesOnly": false,
  "enabled": false,
  "schedulerEnabled": false,
  "trackingMode": 1,
  "odometer": 200780.140625,
  "isFirstBoot": false,
  "didLaunchInBackground": false,
  "didDeviceReboot": false
}
01-08 08:37:11.026 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ DEVICE SENSORS
╠═════════════════════════════════════════════
╟─ ✅  ACCELEROMETER: {Sensor name="lsm6dso LSM6DSO Accelerometer Non-wakeup", vendor="STMicro", version=15933, type=1, maxRange=156.9064, resolution=0.0047856453, power=0.17, minDelay=5000}
╟─ ✅  GYROSCOPE: {Sensor name="lsm6dso LSM6DSO Gyroscope Non-wakeup", vendor="STMicro", version=15933, type=4, maxRange=34.906036, resolution=0.0012217296, power=0.55, minDelay=5000}
╟─ ✅  MAGNETOMETER: {Sensor name="AK09918 Magnetometer", vendor="akm", version=146988, type=2, maxRange=4912.0503, resolution=0.15, power=1.1, minDelay=10000}
╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="smd  Wakeup", vendor="Samsung", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.001, minDelay=-1}
╚═════════════════════════════════════════════
01-08 08:37:11.168 DEBUG [LifecycleManager onCreate] ☯️  onCreate
01-08 08:37:11.168 DEBUG [LifecycleManager onStart] ☯️  onStart
01-08 08:37:11.168 DEBUG [LifecycleManager onResume] ☯️  onResume
01-08 08:37:11.168 INFO [BackgroundGeolocation <init>] 
  ✅  Google Play Services: connected (version code:12451000)
01-08 08:37:11.171 INFO [TSProviderManager startMonitoring] 
  🎾  Start monitoring location-provider changes
01-08 08:37:11.279 DEBUG [SQLiteLocationDAO prune] 
  ℹ️  PRUNE -1 days
01-08 08:37:13.957 DEBUG [TSSQLiteAppender$c run] 
  ℹ️  Cleared logs older than 48 hours
01-08 08:37:18.763 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.negativeAction, desiredAccuracy, desiredOdometerAccuracy, disableElasticity, disableStopDetection, distanceFilter, enableHeadless, fastestLocationUpdateInterval, headlessJobService, heartbeatInterval, isMoving, logLevel, logMaxDays, notification, notification.title, notification.text, speedJumpFilter, startOnBoot, stopOnTerminate]
01-08 08:37:18.780 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [notification, notification.text]
01-08 08:37:19.017 DEBUG [TSGeofenceManager$d run] evaluation buffer timer elapsed
01-08 08:39:24.572 DEBUG [LifecycleManager onPause] ☯️  onPause
01-08 08:39:24.581 DEBUG [LifecycleManager onStop] ☯️  onStop
01-08 17:51:26.685 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ TSLocationManager version: 3.5.4 (433)
╠═════════════════════════════════════════════
╟─ samsung SM-S918B @ 14 (react)
{
  "activityRecognitionInterval": 10000,
  "allowIdenticalLocations": false,
  "authorization": {},
  "autoSync": true,
  "autoSyncThreshold": 0,
  "backgroundPermissionRationale": {
    "title": "Allow {applicationName} to access this device's location even when closed or not in use.",
    "message": "This app collects location data to enable recording your trips to work and calculate distance-travelled.",
    "positiveAction": "Change to \"{backgroundPermissionOptionLabel}\"",
    "negativeAction": "Cancel"
  },
  "batchSync": false,
  "configUrl": "",
  "crashDetector": {
    "enabled": false,
    "accelerometerThresholdHigh": 20,
    "accelerometerThresholdLow": 4.5,
    "gyroscopeThresholdHigh": 20,
    "gyroscopeThresholdLow": 4.5
  },
  "debug": false,
  "deferTime": 0,
  "desiredAccuracy": -1,
  "desiredOdometerAccuracy": 10,
  "disableAutoSyncOnCellular": false,
  "disableElasticity": true,
  "disableLocationAuthorizationAlert": false,
  "disableMotionActivityUpdates": false,
  "disableProviderChangeRecord": false,
  "disableStopDetection": true,
  "distanceFilter": 0,
  "elasticityMultiplier": 1,
  "enableHeadless": true,
  "enableTimestampMeta": false,
  "extras": {},
  "fastestLocationUpdateInterval": 10000,
  "foregroundService": true,
  "geofenceInitialTriggerEntry": true,
  "geofenceModeHighAccuracy": false,
  "geofenceProximityRadius": 1000,
  "geofenceTemplate": "",
  "headers": {},
  "headlessJobService": "com.transistorsoft.rnbackgroundgeolocation.HeadlessTask",
  "heartbeatInterval": 60,
  "httpRootProperty": "location",
  "httpTimeout": 60000,
  "isMoving": true,
  "locationAuthorizationRequest": "Always",
  "locationTemplate": "",
  "locationTimeout": 60,
  "locationUpdateInterval": 1000,
  "locationsOrderDirection": "ASC",
  "logLevel": 5,
  "logMaxDays": 2,
  "maxBatchSize": -1,
  "maxDaysToPersist": 1,
  "maxMonitoredGeofences": 97,
  "maxRecordsToPersist": -1,
  "method": "POST",
  "minimumActivityRecognitionConfidence": 75,
  "motionTriggerDelay": 0,
  "notification": {
    "layout": "",
    "title": "REACH FOR SURE",
    "text": "You are On Duty now",
    "color": "",
    "channelName": "TSLocationManager",
    "channelId": "",
    "smallIcon": "",
    "largeIcon": "",
    "priority": -1,
    "sticky": false,
    "strings": {},
    "actions": []
  },
  "params": {},
  "persist": true,
  "persistMode": 2,
  "schedule": [],
  "scheduleUseAlarmManager": false,
  "speedJumpFilter": 50,
  "startOnBoot": true,
  "stationaryRadius": 25,
  "stopAfterElapsedMinutes": 0,
  "stopOnStationary": false,
  "stopOnTerminate": false,
  "stopTimeout": 5,
  "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking",
  "url": "",
  "useSignificantChangesOnly": false,
  "enabled": false,
  "schedulerEnabled": false,
  "trackingMode": 1,
  "odometer": 200780.140625,
  "isFirstBoot": false,
  "didLaunchInBackground": false,
  "didDeviceReboot": false
}
01-08 17:51:26.686 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ DEVICE SENSORS
╠═════════════════════════════════════════════
╟─ ✅  ACCELEROMETER: {Sensor name="lsm6dso LSM6DSO Accelerometer Non-wakeup", vendor="STMicro", version=15933, type=1, maxRange=156.9064, resolution=0.0047856453, power=0.17, minDelay=5000}
╟─ ✅  GYROSCOPE: {Sensor name="lsm6dso LSM6DSO Gyroscope Non-wakeup", vendor="STMicro", version=15933, type=4, maxRange=34.906036, resolution=0.0012217296, power=0.55, minDelay=5000}
╟─ ✅  MAGNETOMETER: {Sensor name="AK09918 Magnetometer", vendor="akm", version=146988, type=2, maxRange=4912.0503, resolution=0.15, power=1.1, minDelay=10000}
╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="smd  Wakeup", vendor="Samsung", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.001, minDelay=-1}
╚═════════════════════════════════════════════
01-08 17:51:26.873 DEBUG [LifecycleManager onCreate] ☯️  onCreate
01-08 17:51:26.874 DEBUG [LifecycleManager onResume] ☯️  onResume
01-08 17:51:26.874 DEBUG [LifecycleManager onStart] ☯️  onStart
01-08 17:51:26.874 INFO [BackgroundGeolocation <init>] 
  ✅  Google Play Services: connected (version code:12451000)
01-08 17:51:26.877 INFO [TSProviderManager startMonitoring] 
  🎾  Start monitoring location-provider changes
01-08 17:51:26.934 DEBUG [SQLiteLocationDAO prune] 
  ℹ️  PRUNE -1 days
01-08 17:51:29.182 DEBUG [TSSQLiteAppender$c run] 
  ℹ️  Cleared logs older than 48 hours
01-08 17:51:31.102 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.negativeAction, desiredAccuracy, desiredOdometerAccuracy, disableElasticity, disableStopDetection, distanceFilter, enableHeadless, extras, fastestLocationUpdateInterval, headers, headlessJobService, heartbeatInterval, isMoving, logLevel, logMaxDays, notification, notification.title, notification.text, params, schedule, speedJumpFilter, startOnBoot, stopOnTerminate]
01-08 17:51:31.119 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [notification, notification.text]
01-08 17:51:31.361 DEBUG [TSGeofenceManager$d run] evaluation buffer timer elapsed
01-08 17:51:36.117 DEBUG [BackgroundGeolocation a] 
  🔴  Cleared callbacks
01-08 17:51:38.551 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.negativeAction, desiredAccuracy, desiredOdometerAccuracy, disableElasticity, disableStopDetection, distanceFilter, enableHeadless, extras, fastestLocationUpdateInterval, headers, headlessJobService, heartbeatInterval, isMoving, logLevel, logMaxDays, notification, notification.title, notification.text, params, schedule, speedJumpFilter, startOnBoot, stopOnTerminate]
01-08 17:51:38.552 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.negativeAction, desiredAccuracy, desiredOdometerAccuracy, disableElasticity, disableStopDetection, distanceFilter, enableHeadless, fastestLocationUpdateInterval, headlessJobService, heartbeatInterval, isMoving, logLevel, logMaxDays, notification, notification.title, notification.text, speedJumpFilter, startOnBoot, stopOnTerminate]
01-08 17:51:38.557 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [notification, notification.text]
01-08 17:51:38.804 DEBUG [TSGeofenceManager$d run] evaluation buffer timer elapsed
01-08 22:28:38.743 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ TSLocationManager version: 3.5.4 (433)
╠═════════════════════════════════════════════
╟─ samsung SM-S918B @ 14 (react)
{
  "activityRecognitionInterval": 10000,
  "allowIdenticalLocations": false,
  "authorization": {},
  "autoSync": true,
  "autoSyncThreshold": 0,
  "backgroundPermissionRationale": {
    "title": "Allow {applicationName} to access this device's location even when closed or not in use.",
    "message": "This app collects location data to enable recording your trips to work and calculate distance-travelled.",
    "positiveAction": "Change to \"{backgroundPermissionOptionLabel}\"",
    "negativeAction": "Cancel"
  },
  "batchSync": false,
  "configUrl": "",
  "crashDetector": {
    "enabled": false,
    "accelerometerThresholdHigh": 20,
    "accelerometerThresholdLow": 4.5,
    "gyroscopeThresholdHigh": 20,
    "gyroscopeThresholdLow": 4.5
  },
  "debug": false,
  "deferTime": 0,
  "desiredAccuracy": -1,
  "desiredOdometerAccuracy": 10,
  "disableAutoSyncOnCellular": false,
  "disableElasticity": true,
  "disableLocationAuthorizationAlert": false,
  "disableMotionActivityUpdates": false,
  "disableProviderChangeRecord": false,
  "disableStopDetection": true,
  "distanceFilter": 0,
  "elasticityMultiplier": 1,
  "enableHeadless": true,
  "enableTimestampMeta": false,
  "extras": {},
  "fastestLocationUpdateInterval": 10000,
  "foregroundService": true,
  "geofenceInitialTriggerEntry": true,
  "geofenceModeHighAccuracy": false,
  "geofenceProximityRadius": 1000,
  "geofenceTemplate": "",
  "headers": {},
  "headlessJobService": "com.transistorsoft.rnbackgroundgeolocation.HeadlessTask",
  "heartbeatInterval": 60,
  "httpRootProperty": "location",
  "httpTimeout": 60000,
  "isMoving": true,
  "locationAuthorizationRequest": "Always",
  "locationTemplate": "",
  "locationTimeout": 60,
  "locationUpdateInterval": 1000,
  "locationsOrderDirection": "ASC",
  "logLevel": 5,
  "logMaxDays": 2,
  "maxBatchSize": -1,
  "maxDaysToPersist": 1,
  "maxMonitoredGeofences": 97,
  "maxRecordsToPersist": -1,
  "method": "POST",
  "minimumActivityRecognitionConfidence": 75,
  "motionTriggerDelay": 0,
  "notification": {
    "layout": "",
    "title": "REACH FOR SURE",
    "text": "You are On Duty now",
    "color": "",
    "channelName": "TSLocationManager",
    "channelId": "",
    "smallIcon": "",
    "largeIcon": "",
    "priority": -1,
    "sticky": false,
    "strings": {},
    "actions": []
  },
  "params": {},
  "persist": true,
  "persistMode": 2,
  "schedule": [],
  "scheduleUseAlarmManager": false,
  "speedJumpFilter": 50,
  "startOnBoot": true,
  "stationaryRadius": 25,
  "stopAfterElapsedMinutes": 0,
  "stopOnStationary": false,
  "stopOnTerminate": false,
  "stopTimeout": 5,
  "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking",
  "url": "",
  "useSignificantChangesOnly": false,
  "enabled": false,
  "schedulerEnabled": false,
  "trackingMode": 1,
  "odometer": 200780.140625,
  "isFirstBoot": false,
  "didLaunchInBackground": false,
  "didDeviceReboot": false
}
01-08 22:28:38.744 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ DEVICE SENSORS
╠═════════════════════════════════════════════
╟─ ✅  ACCELEROMETER: {Sensor name="lsm6dso LSM6DSO Accelerometer Non-wakeup", vendor="STMicro", version=15933, type=1, maxRange=156.9064, resolution=0.0047856453, power=0.17, minDelay=5000}
╟─ ✅  GYROSCOPE: {Sensor name="lsm6dso LSM6DSO Gyroscope Non-wakeup", vendor="STMicro", version=15933, type=4, maxRange=34.906036, resolution=0.0012217296, power=0.55, minDelay=5000}
╟─ ✅  MAGNETOMETER: {Sensor name="AK09918 Magnetometer", vendor="akm", version=146988, type=2, maxRange=4912.0503, resolution=0.15, power=1.1, minDelay=10000}
╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="smd  Wakeup", vendor="Samsung", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.001, minDelay=-1}
╚═════════════════════════════════════════════
01-08 22:28:38.987 DEBUG [LifecycleManager onCreate] ☯️  onCreate
01-08 22:28:38.987 DEBUG [LifecycleManager onStart] ☯️  onStart
01-08 22:28:38.987 DEBUG [LifecycleManager onResume] ☯️  onResume
01-08 22:28:38.987 INFO [BackgroundGeolocation <init>] 
  ✅  Google Play Services: connected (version code:12451000)
01-08 22:28:38.990 INFO [TSProviderManager startMonitoring] 
  🎾  Start monitoring location-provider changes
01-08 22:28:39.026 DEBUG [SQLiteLocationDAO prune] 
  ℹ️  PRUNE -1 days
01-08 22:28:39.941 DEBUG [TSSQLiteAppender$c run] 
  ℹ️  Cleared logs older than 48 hours
01-08 22:28:46.642 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.negativeAction, desiredAccuracy, desiredOdometerAccuracy, disableElasticity, disableStopDetection, distanceFilter, enableHeadless, extras, fastestLocationUpdateInterval, headers, headlessJobService, heartbeatInterval, isMoving, logLevel, logMaxDays, notification, notification.title, notification.text, params, schedule, speedJumpFilter, startOnBoot, stopOnTerminate]
01-08 22:28:46.645 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.negativeAction, desiredAccuracy, desiredOdometerAccuracy, disableElasticity, disableStopDetection, distanceFilter, enableHeadless, fastestLocationUpdateInterval, headlessJobService, heartbeatInterval, isMoving, logLevel, logMaxDays, notification, notification.title, notification.text, speedJumpFilter, startOnBoot, stopOnTerminate]
01-08 22:28:46.662 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [notification, notification.text]
01-08 22:28:46.893 DEBUG [TSGeofenceManager$d run] evaluation buffer timer elapsed
01-08 22:29:41.793 DEBUG [LifecycleManager onPause] ☯️  onPause
01-08 22:29:41.809 DEBUG [LifecycleManager onStop] ☯️  onStop
01-09 10:53:07.316 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ TSLocationManager version: 3.5.4 (433)
╠═════════════════════════════════════════════
╟─ samsung SM-S918B @ 14 (react)
{
  "activityRecognitionInterval": 10000,
  "allowIdenticalLocations": false,
  "authorization": {},
  "autoSync": true,
  "autoSyncThreshold": 0,
  "backgroundPermissionRationale": {
    "title": "Allow {applicationName} to access this device's location even when closed or not in use.",
    "message": "This app collects location data to enable recording your trips to work and calculate distance-travelled.",
    "positiveAction": "Change to \"{backgroundPermissionOptionLabel}\"",
    "negativeAction": "Cancel"
  },
  "batchSync": false,
  "configUrl": "",
  "crashDetector": {
    "enabled": false,
    "accelerometerThresholdHigh": 20,
    "accelerometerThresholdLow": 4.5,
    "gyroscopeThresholdHigh": 20,
    "gyroscopeThresholdLow": 4.5
  },
  "debug": false,
  "deferTime": 0,
  "desiredAccuracy": -1,
  "desiredOdometerAccuracy": 10,
  "disableAutoSyncOnCellular": false,
  "disableElasticity": true,
  "disableLocationAuthorizationAlert": false,
  "disableMotionActivityUpdates": false,
  "disableProviderChangeRecord": false,
  "disableStopDetection": true,
  "distanceFilter": 0,
  "elasticityMultiplier": 1,
  "enableHeadless": true,
  "enableTimestampMeta": false,
  "extras": {},
  "fastestLocationUpdateInterval": 10000,
  "foregroundService": true,
  "geofenceInitialTriggerEntry": true,
  "geofenceModeHighAccuracy": false,
  "geofenceProximityRadius": 1000,
  "geofenceTemplate": "",
  "headers": {},
  "headlessJobService": "com.transistorsoft.rnbackgroundgeolocation.HeadlessTask",
  "heartbeatInterval": 60,
  "httpRootProperty": "location",
  "httpTimeout": 60000,
  "isMoving": true,
  "locationAuthorizationRequest": "Always",
  "locationTemplate": "",
  "locationTimeout": 60,
  "locationUpdateInterval": 1000,
  "locationsOrderDirection": "ASC",
  "logLevel": 5,
  "logMaxDays": 2,
  "maxBatchSize": -1,
  "maxDaysToPersist": 1,
  "maxMonitoredGeofences": 97,
  "maxRecordsToPersist": -1,
  "method": "POST",
  "minimumActivityRecognitionConfidence": 75,
  "motionTriggerDelay": 0,
  "notification": {
    "layout": "",
    "title": "REACH FOR SURE",
    "text": "You are Off Duty now",
    "color": "",
    "channelName": "TSLocationManager",
    "channelId": "",
    "smallIcon": "",
    "largeIcon": "",
    "priority": -1,
    "sticky": false,
    "strings": {},
    "actions": []
  },
  "params": {},
  "persist": true,
  "persistMode": 2,
  "schedule": [],
  "scheduleUseAlarmManager": false,
  "speedJumpFilter": 50,
  "startOnBoot": true,
  "stationaryRadius": 25,
  "stopAfterElapsedMinutes": 0,
  "stopOnStationary": false,
  "stopOnTerminate": false,
  "stopTimeout": 5,
  "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking",
  "url": "",
  "useSignificantChangesOnly": false,
  "enabled": false,
  "schedulerEnabled": false,
  "trackingMode": 1,
  "odometer": 200780.140625,
  "isFirstBoot": false,
  "didLaunchInBackground": false,
  "didDeviceReboot": false
}
01-09 10:53:07.316 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ DEVICE SENSORS
╠═════════════════════════════════════════════
╟─ ✅  ACCELEROMETER: {Sensor name="lsm6dso LSM6DSO Accelerometer Non-wakeup", vendor="STMicro", version=15933, type=1, maxRange=156.9064, resolution=0.0047856453, power=0.17, minDelay=5000}
╟─ ✅  GYROSCOPE: {Sensor name="lsm6dso LSM6DSO Gyroscope Non-wakeup", vendor="STMicro", version=15933, type=4, maxRange=34.906036, resolution=0.0012217296, power=0.55, minDelay=5000}
╟─ ✅  MAGNETOMETER: {Sensor name="AK09918 Magnetometer", vendor="akm", version=146988, type=2, maxRange=4912.0503, resolution=0.15, power=1.1, minDelay=10000}
╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="smd  Wakeup", vendor="Samsung", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.001, minDelay=-1}
╚═════════════════════════════════════════════
01-09 10:53:07.484 DEBUG [LifecycleManager onStart] ☯️  onStart
01-09 10:53:07.484 DEBUG [LifecycleManager onCreate] ☯️  onCreate
01-09 10:53:07.484 DEBUG [LifecycleManager onResume] ☯️  onResume
01-09 10:53:07.484 INFO [BackgroundGeolocation <init>] 
  ✅  Google Play Services: connected (version code:12451000)
01-09 10:53:07.487 INFO [TSProviderManager startMonitoring] 
  🎾  Start monitoring location-provider changes
01-09 10:53:07.502 DEBUG [SQLiteLocationDAO prune] 
  ℹ️  PRUNE -1 days
01-09 10:53:09.848 DEBUG [TSSQLiteAppender$c run] 
  ℹ️  Cleared logs older than 48 hours
01-09 10:53:10.116 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.negativeAction, desiredAccuracy, desiredOdometerAccuracy, disableElasticity, disableStopDetection, distanceFilter, enableHeadless, fastestLocationUpdateInterval, headlessJobService, heartbeatInterval, isMoving, logLevel, logMaxDays, notification, notification.title, notification.text, speedJumpFilter, startOnBoot, stopOnTerminate]
01-09 10:53:10.143 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [notification, notification.text]
01-09 10:53:10.368 DEBUG [TSGeofenceManager$d run] evaluation buffer timer elapsed
01-09 10:53:25.806 DEBUG [LifecycleManager onPause] ☯️  onPause
01-09 10:53:25.834 DEBUG [LifecycleManager onStop] ☯️  onStop
01-09 10:53:45.889 DEBUG [LifecycleManager onStart] ☯️  onStart
01-09 10:53:45.905 DEBUG [LifecycleManager onResume] ☯️  onResume
01-09 10:53:48.064 DEBUG [LifecycleManager onPause] ☯️  onPause
01-09 10:53:48.065 DEBUG [LifecycleManager onStop] ☯️  onStop
01-09 10:53:49.411 DEBUG [LifecycleManager onStart] ☯️  onStart
01-09 10:53:49.424 DEBUG [LifecycleManager onResume] ☯️  onResume
01-09 10:53:50.198 DEBUG [LifecycleManager onPause] ☯️  onPause
01-09 10:53:50.199 DEBUG [LifecycleManager onStop] ☯️  onStop
01-09 10:53:54.793 DEBUG [LifecycleManager onStart] ☯️  onStart
01-09 10:53:54.809 DEBUG [LifecycleManager onResume] ☯️  onResume
01-09 10:54:23.429 DEBUG [LifecycleManager onPause] ☯️  onPause
01-09 10:54:26.415 DEBUG [LifecycleManager onStop] ☯️  onStop
01-09 10:59:58.929 DEBUG [LifecycleManager onStart] ☯️  onStart
01-09 10:59:58.938 DEBUG [LifecycleManager onResume] ☯️  onResume
01-09 11:00:18.125 DEBUG [LifecycleManager onPause] ☯️  onPause
01-09 11:00:18.126 DEBUG [LifecycleManager onStop] ☯️  onStop
01-09 11:00:27.806 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ TSLocationManager version: 3.5.4 (433)
╠═════════════════════════════════════════════
╟─ samsung SM-S918B @ 14 (react)
{
  "activityRecognitionInterval": 10000,
  "allowIdenticalLocations": false,
  "authorization": {},
  "autoSync": true,
  "autoSyncThreshold": 0,
  "backgroundPermissionRationale": {
    "title": "Allow {applicationName} to access this device's location even when closed or not in use.",
    "message": "This app collects location data to enable recording your trips to work and calculate distance-travelled.",
    "positiveAction": "Change to \"{backgroundPermissionOptionLabel}\"",
    "negativeAction": "Cancel"
  },
  "batchSync": false,
  "configUrl": "",
  "crashDetector": {
    "enabled": false,
    "accelerometerThresholdHigh": 20,
    "accelerometerThresholdLow": 4.5,
    "gyroscopeThresholdHigh": 20,
    "gyroscopeThresholdLow": 4.5
  },
  "debug": false,
  "deferTime": 0,
  "desiredAccuracy": -1,
  "desiredOdometerAccuracy": 10,
  "disableAutoSyncOnCellular": false,
  "disableElasticity": true,
  "disableLocationAuthorizationAlert": false,
  "disableMotionActivityUpdates": false,
  "disableProviderChangeRecord": false,
  "disableStopDetection": true,
  "distanceFilter": 0,
  "elasticityMultiplier": 1,
  "enableHeadless": true,
  "enableTimestampMeta": false,
  "extras": {},
  "fastestLocationUpdateInterval": 10000,
  "foregroundService": true,
  "geofenceInitialTriggerEntry": true,
  "geofenceModeHighAccuracy": false,
  "geofenceProximityRadius": 1000,
  "geofenceTemplate": "",
  "headers": {},
  "headlessJobService": "com.transistorsoft.rnbackgroundgeolocation.HeadlessTask",
  "heartbeatInterval": 60,
  "httpRootProperty": "location",
  "httpTimeout": 60000,
  "isMoving": true,
  "locationAuthorizationRequest": "Always",
  "locationTemplate": "",
  "locationTimeout": 60,
  "locationUpdateInterval": 1000,
  "locationsOrderDirection": "ASC",
  "logLevel": 5,
  "logMaxDays": 2,
  "maxBatchSize": -1,
  "maxDaysToPersist": 1,
  "maxMonitoredGeofences": 97,
  "maxRecordsToPersist": -1,
  "method": "POST",
  "minimumActivityRecognitionConfidence": 75,
  "motionTriggerDelay": 0,
  "notification": {
    "layout": "",
    "title": "REACH FOR SURE",
    "text": "You are On Duty now",
    "color": "",
    "channelName": "TSLocationManager",
    "channelId": "",
    "smallIcon": "",
    "largeIcon": "",
    "priority": -1,
    "sticky": false,
    "strings": {},
    "actions": []
  },
  "params": {},
  "persist": true,
  "persistMode": 2,
  "schedule": [],
  "scheduleUseAlarmManager": false,
  "speedJumpFilter": 50,
  "startOnBoot": true,
  "stationaryRadius": 25,
  "stopAfterElapsedMinutes": 0,
  "stopOnStationary": false,
  "stopOnTerminate": false,
  "stopTimeout": 5,
  "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking",
  "url": "",
  "useSignificantChangesOnly": false,
  "enabled": false,
  "schedulerEnabled": false,
  "trackingMode": 1,
  "odometer": 200780.140625,
  "isFirstBoot": false,
  "didLaunchInBackground": false,
  "didDeviceReboot": false
}
01-09 11:00:27.807 INFO [LoggerFacade$a a] 
╔═════════════════════════════════════════════
║ DEVICE SENSORS
╠═════════════════════════════════════════════
╟─ ✅  ACCELEROMETER: {Sensor name="lsm6dso LSM6DSO Accelerometer Non-wakeup", vendor="STMicro", version=15933, type=1, maxRange=156.9064, resolution=0.0047856453, power=0.17, minDelay=5000}
╟─ ✅  GYROSCOPE: {Sensor name="lsm6dso LSM6DSO Gyroscope Non-wakeup", vendor="STMicro", version=15933, type=4, maxRange=34.906036, resolution=0.0012217296, power=0.55, minDelay=5000}
╟─ ✅  MAGNETOMETER: {Sensor name="AK09918 Magnetometer", vendor="akm", version=146988, type=2, maxRange=4912.0503, resolution=0.15, power=1.1, minDelay=10000}
╟─ ✅  SIGNIFICANT_MOTION: {Sensor name="smd  Wakeup", vendor="Samsung", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.001, minDelay=-1}
╚═════════════════════════════════════════════
01-09 11:00:27.925 DEBUG [LifecycleManager onCreate] ☯️  onCreate
01-09 11:00:27.925 DEBUG [LifecycleManager onStart] ☯️  onStart
01-09 11:00:27.925 DEBUG [LifecycleManager onResume] ☯️  onResume
01-09 11:00:27.925 INFO [BackgroundGeolocation <init>] 
  ✅  Google Play Services: connected (version code:12451000)
01-09 11:00:27.927 INFO [TSProviderManager startMonitoring] 
  🎾  Start monitoring location-provider changes
01-09 11:00:27.931 DEBUG [SQLiteLocationDAO prune] 
  ℹ️  PRUNE -1 days
01-09 11:00:28.187 DEBUG [TSSQLiteAppender$c run] 
  ℹ️  Cleared logs older than 48 hours
01-09 11:00:30.593 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.negativeAction, desiredAccuracy, desiredOdometerAccuracy, disableElasticity, disableStopDetection, distanceFilter, enableHeadless, extras, fastestLocationUpdateInterval, headers, headlessJobService, heartbeatInterval, isMoving, logLevel, logMaxDays, notification, notification.title, notification.text, params, schedule, speedJumpFilter, startOnBoot, stopOnTerminate]
01-09 11:00:30.602 DEBUG [TSConfig e] ℹ️   Persist config, dirty: [notification, notification.text]
01-09 11:00:30.850 DEBUG [TSGeofenceManager$d run] evaluation buffer timer elapsed
01-09 11:00:50.936 DEBUG [LifecycleManager onPause] ☯️  onPause
01-09 11:00:50.958 DEBUG [LifecycleManager onStop] ☯️  onStop
01-09 11:00:52.171 DEBUG [LifecycleManager onStart] ☯️  onStart
01-09 11:00:52.196 DEBUG [LifecycleManager onResume] ☯️  onResume
01-09 11:01:32.631 INFO [TSProviderManager a] 
╔═════════════════════════════════════════════
`
@invictustech
Copy link
Author

Consider it on priority as urgently require an solution.

@christocracy
Copy link
Member

"enabled": false,

You need to tell the plug-in to .start()

@invictustech
Copy link
Author

invictustech commented Jan 9, 2025

In the code I have pasted above I have added .start() method

.stop() method was not called yet it got terminated

@christocracy
Copy link
Member

The logs don’t lie.

you are doing something unusual. The logs clearly show “enabled: false”.

review your code

@christocracy
Copy link
Member

BackgroundGeolocation.setOdometer(0)

Delete that

@invictustech
Copy link
Author

Okay. But does this log mean that after it was terminated. the library automatically tried to start the geolocation but .start() was not present

@christocracy
Copy link
Member

You are making assumptions on things you don’t understand.

There is nothing unusual about the logs.

you are not telling the plug-in to .start()

you are doing something unusual

@invictustech
Copy link
Author

Because user did not call .stop() method than how did it terminate. I will share full logs wait

@invictustech
Copy link
Author

@christocracy
Copy link
Member

Calling .start() -> enabled: true
Calling .stop() -> enabled: false

@invictustech
Copy link
Author

Okay I will check my code once.

Copy link

github-actions bot commented Feb 9, 2025

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants