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

Two ENTER or two EXIT events in a row #2162

Open
UnderTheMoonspell opened this issue Oct 4, 2024 · 10 comments
Open

Two ENTER or two EXIT events in a row #2162

UnderTheMoonspell opened this issue Oct 4, 2024 · 10 comments

Comments

@UnderTheMoonspell
Copy link

UnderTheMoonspell commented Oct 4, 2024

For a while our users have been generating two events in the same direction (two EXIT or two ENTER) but we were never able to reproduce it until now where I can do it consistently, it ALWAYS happens under these conditions. And it happens both with ENTER and EXIT events.

I tried with [geofenceInitialTriggerEntry](https://transistorsoft.github.io/react-native-background-geolocation/interfaces/config.html#geofenceinitialtriggerentry) but still the same thing happens (also this prop only refers to ENTER events, and our problem is for both events). Also tried setting [startOnBoot](https://transistorsoft.github.io/react-native-background-geolocation/interfaces/config.html#startonboot)to false, same thing happens.

Your Environment

  • Plugin version: 4.14.3
  • Platform: iOS
  • OS version: 17.2 (emulator)
  • Device manufacturer / model:
  • React Native version (react-native -v): 0.73.9
  • Plugin config
{
          url: ****,
          headers: {
            ...getGlobalDefaultHeaders(),
          },
          geofenceTemplate: ****,
          autoSync: true,
          geofenceModeHighAccuracy: true, // <-- consumes more power; default is false.
          debug: false, // NOTE: if true it will request the notification permissions
          logLevel:
            __DEV__ 
              ? BackgroundGeolocation.LOG_LEVEL_VERBOSE
              : BackgroundGeolocation.LOG_LEVEL_OFF,
          stopOnTerminate: false,
          startOnBoot: true,
          desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
          disableLocationAuthorizationAlert: true,
          locationAuthorizationRequest: 'Always',
          disableMotionActivityUpdates: true,
          disableProviderChangeRecord: true,
          backgroundPermissionRationale: strings.screen.geolocationIntro.androidPermissionsDialog,
          params: {
            user_id: userId,
            device_id: device.deviceId || undefined,
            device_name: device.deviceName,
            device_os: device.platform,
          },
        }

Expected Behavior

That there is only one event sent in these conditions

Actual Behavior

The app is producing two EXIT or two ENTER events in a row

Steps to Reproduce

  1. Enter the app and let the plugin initiate
  2. Change the location in the emulator to trigger an exit event (can be done with app closed or open)
  3. If the app was open, kill the app, start the app again without changing location
  4. A new event will be created so now you will have two ENTER or EXIT in a row

Context

Debug logs

2024-10-04 12:40:58.392 ℹ️-[TSConfig persist]

2024-10-04 12:40:58.399 🔵-[TSLocationManager ready]

2024-10-04 12:40:58.410 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-04 12:40:58.419 ℹ️-[TSLocationManager log:message:] [useGeolocation] [initBackgroundGeolocation] ready function - Enabled

2024-10-04 12:41:15.424 ℹ️-[TSConfig persist]

2024-10-04 12:41:21.334 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-04 12:41:26.105 ℹ️-[TSLocationManager log:message:] [useGeolocation] [requestUserPermission] start

2024-10-04 12:41:26.113 ℹ️+[LocationAuthorization run:onCancel:] status: 0

2024-10-04 12:41:26.114 🔵+[LocationAuthorization run:onCancel:] Request: requestAlwaysAuthorization

2024-10-04 12:41:28.373 🔵-[PolygonGeofencingService locationManager:didChangeAuthorizationStatus:] 4

2024-10-04 12:41:28.374 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 4

2024-10-04 12:41:28.374 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 4

2024-10-04 12:41:28.375 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 4

2024-10-04 12:41:28.376 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 4

2024-10-04 12:41:28.377 ℹ️-[TSConfig persist]

2024-10-04 12:41:28.379 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 4

2024-10-04 12:41:28.391 ℹ️+[LocationAuthorization run:onCancel:] status: 4

2024-10-04 12:41:28.391 ℹ️-[TSConfig persist]

2024-10-04 12:41:28.393 ℹ️+[LocationAuthorization run:onCancel:] Location authorization upgrade: WhenInUse -> Always

2024-10-04 12:41:28.394 🔵+[LocationAuthorization run:onCancel:] Request: requestAlwaysAuthorization

2024-10-04 12:41:28.422 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-04 12:41:29.671 🔵-[PolygonGeofencingService locationManager:didChangeAuthorizationStatus:] 3

2024-10-04 12:41:29.672 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-04 12:41:29.672 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-04 12:41:29.673 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-04 12:41:29.674 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-04 12:41:29.674 ℹ️-[TSConfig persist]

2024-10-04 12:41:29.677 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3

2024-10-04 12:41:29.701 ℹ️-[TSLocationManager log:message:] [useGeolocation] [requestUserPermission] finish

2024-10-04 12:41:29.701 ℹ️-[TSLocationManager log:message:] [useGeolocation] [checkAccuracyAuthorizationStatus] start

2024-10-04 12:41:29.707 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-04 12:41:29.721 ℹ️-[TSLocationManager log:message:] [useGeolocation] [checkAccuracyAuthorizationStatus] GRANTED:

2024-10-04 12:41:29.724
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager startGeofences]
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:29.724 ℹ️-[TSLocationManager doStart:] trackingMode: 0

2024-10-04 12:41:29.724 ℹ️-[TSConfig persist]

2024-10-04 12:41:29.727 ℹ️-[TSConfig persist]

2024-10-04 12:41:29.729 ℹ️-[TSLocationManager clearLastOdometerLocation]

2024-10-04 12:41:29.729 🎾-[TSGeofenceManager start]

2024-10-04 12:41:29.729 🔵-[TSLocationManager setPace:] 0

2024-10-04 12:41:29.735 ℹ️-[TSLocationManager log:message:] [useGeolocation] [onEnabledChange]

2024-10-04 12:41:29.754 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2024-10-04 12:41:29.758
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:29.759 ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS

2024-10-04 12:41:29.759
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:29.771 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-04 12:41:29.771 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON

2024-10-04 12:41:29.773 ℹ️-[PolygonGeofencingService setLocation:] Already updating location

2024-10-04 12:41:29.776 ℹ️-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch

2024-10-04 12:41:29.783
📍<-38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 04/10/2024, 12:41:29 Central European Summer Time

2024-10-04 12:41:29.783
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 239 ms
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:29.784 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <-38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 04/10/2024, 12:41:29 Central European Summer Time

2024-10-04 12:41:29.784 🔵-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 1000

2024-10-04 12:41:29.785 🔴-[TSLocationManager stopUpdatingLocation]

2024-10-04 12:41:29.786 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0

2024-10-04 12:41:29.786 ℹ️-[PolygonGeofencingService setLocation:] Already updating location

2024-10-04 12:41:29.865 ℹ️-[TSLocationManager log:message:] [useGeolocation] [onConnectivityChange]

2024-10-04 12:41:29.898 ℹ️-[TSLocationManager log:message:] [useGeolocation] Start tracking geofences

2024-10-04 12:41:30.109 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-04 12:41:30.254 ℹ️-[TSLocationManager log:message:] [useGeolocation] [fetchDeleteOldAndCreateNewGeofences] [page] [{"id":"cf676d36-be4b-4b67-b90c-dadc3654826b","organization_id":"a94676dd-3a65-405a-92ac-cc80eef5f80c","employer_id":"084d03d1-a7fb-4b0d-9984-17f96f769c52","name":"12345","description":"54321","location":{"latitude":38.584916,"longitude":-9.146074,"radius":150},"full_address":"zerozero","created_at":"2024-02-12T17:40:02.055109Z","updated_at":"2024-02-12T17:40:02.055109Z"},{"id":"5e8401d6-2dce-4e4a-9b4e-1e122876d3e8","organization_id":"a94676dd-3a65-405a-92ac-cc80eef5f80c","employer_id":"084d03d1-a7fb-4b0d-9984-17f96f769c52","name":"12345","description":"54321","location":{"latitude":38.794889,"longitude":-9.21892,"radius":150},"full_address":"zerozero","created_at":"2024-02-12T17:40:09.767405Z","updated_at":"2024-02-12T17:40:09.767405Z"},{"id":"cd00ea4e-702c-45c4-abc8-7ce8438d5b50","organization_id":"a94676dd-3a65-405a-92ac-cc80eef5f80c","employer_id":"084d03d1-a7fb-4b0d-9984-17f96f769c52","name":"nome001","description":"description001","location":{"latitude":38.782,"longitude":-9.0947,"radius":150},"full_address":"full_name001","created_at":"2024-02-13T17:47:01.864658Z","updated_at":"2024-02-13T17:47:01.864658Z"}]

2024-10-04 12:41:30.255 🔵-[TSLocationManager addGeofences:success:failure:]

2024-10-04 12:41:30.255 ℹ️-[GeofenceDAO doInsert:geofence:] cf676d36-be4b-4b67-b90c-dadc3654826b

2024-10-04 12:41:30.256 ℹ️-[GeofenceDAO doInsert:geofence:] 5e8401d6-2dce-4e4a-9b4e-1e122876d3e8

2024-10-04 12:41:30.256 ℹ️-[GeofenceDAO doInsert:geofence:] cd00ea4e-702c-45c4-abc8-7ce8438d5b50

2024-10-04 12:41:30.262 ℹ️-[TSLocationManager log:message:] [useGeolocation] [addGeofences] added geofences

2024-10-04 12:41:30.262 ℹ️-[TSLocationManager log:message:] [useGeolocation] [fetchDeleteOldAndCreateNewGeofences] Finish iterating

2024-10-04 12:41:30.460
📍<-38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 04/10/2024, 12:41:29 Central European Summer Time

2024-10-04 12:41:30.460
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager evaluateProximity:] Found 3 / 3 within 2000 m
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:30.462 🎾-[TSGeofenceManager startMonitoringGeofence:] cf676d36-be4b-4b67-b90c-dadc3654826b

2024-10-04 12:41:30.462 🎾-[TSGeofenceManager startMonitoringGeofence:] 5e8401d6-2dce-4e4a-9b4e-1e122876d3e8

2024-10-04 12:41:30.463 🎾-[TSGeofenceManager startMonitoringGeofence:] cd00ea4e-702c-45c4-abc8-7ce8438d5b50

2024-10-04 12:41:39.439 🎾-[TSGeofenceManager locationManager:didEnterRegion:] cf676d36-be4b-4b67-b90c-dadc3654826b

2024-10-04 12:41:39.439 🎾-[TSGeofenceManager requestLocation]

2024-10-04 12:41:39.454 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-04 12:41:39.456 🔵-[TSLocationManager locationManager:didExitRegion:] Exit stationary region

2024-10-04 12:41:39.469 🔵-[TSGeofenceManager locationManager:didUpdateLocations:] <+38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 04/10/2024, 12:41:39 Central European Summer Time

2024-10-04 12:41:39.470
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager fireGeofenceEvent:] 📢ENTER Geofence: cf676d36-be4b-4b67-b90c-dadc3654826b
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:39.471 ✅-[TSGeofenceManager fireGeofenceEvent:] INSERT: 4A5A2FB3-B81D-420F-A7E6-6599FFD35344

2024-10-04 12:41:39.471
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:39.473 ✅-[BackgroundTaskManager createBackgroundTask] 341

2024-10-04 12:41:39.474 ℹ️-[TSLocationManager log:message:] [useGeolocation] [Geofence]

2024-10-04 12:41:39.474 ✅-[BackgroundTaskManager createBackgroundTask] 342

2024-10-04 12:41:39.474 ✅-[TSHttpService schedulePost] LOCKED: 4A5A2FB3-B81D-420F-A7E6-6599FFD35344

2024-10-04 12:41:39.964 🔵-[HttpResponse handleResponse] Response: 201

2024-10-04 12:41:39.967 ✅-[TSHttpService post:]_block_invoke DESTROY: 4A5A2FB3-B81D-420F-A7E6-6599FFD35344

2024-10-04 12:41:39.967
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:39.967 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 341 OF (
341,
342
)

2024-10-04 12:41:40.477
📍<+38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 04/10/2024, 12:41:39 Central European Summer Time

2024-10-04 12:41:40.477
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager evaluateProximity:] Found 3 / 3 within 2000 m
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:40.483 🔵-[TSGeofenceManager evaluateProximity:delay:]_block_invoke Re-evaluation timer fired

2024-10-04 12:41:40.483 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 342 OF (
342
)

2024-10-04 12:41:43.712 🔵-[TSLocationManager onSuspend:] enabled? 1)

2024-10-04 12:41:43.723 ℹ️-[TSDBLogger db_save] Log committed

2024-10-04 12:41:46.389 ℹ️-[TSDBLogger db_delete] maxAge: 259200

2024-10-04 12:41:46.389 ℹ️-[TSLocationManager init]
╔═════════════════════════════════════════════
║ TSLocationManager (build 388)
╠══════════════════════════════════════════════
{
activityRecognitionInterval = 10000;
activityType = 1;
authorization = {
};
autoSync = 1;
autoSyncThreshold = 0;
batchSync = 0;
debug = 0;
desiredAccuracy = "-1";
desiredOdometerAccuracy = 100;
didDeviceReboot = 0;
didLaunchInBackground = 0;
didRequestUpgradeLocationAuthorization = 1;
disableAutoSyncOnCellular = 0;
disableElasticity = 0;
disableLocationAuthorizationAlert = 1;
disableMotionActivityUpdates = 1;
disableStopDetection = 0;
distanceFilter = 10;
elasticityMultiplier = 1;
enableTimestampMeta = 0;
enabled = 1;
extras = {
};
geofenceInitialTriggerEntry = 1;
geofenceProximityRadius = 2000;
geofenceTemplate = "{ "timestamp": "<%= timestamp %>", "uuid": "<%= uuid %>", "age": <%= age %>, "event": "<%= event %>", "odometer": <%= odometer %>, "geofence": { "identifier": "<%= geofence.identifier %>", "action": "<%= geofence.action %>" }, "coords":{ "latitude": <%= latitude %>, "longitude": <%= longitude %>, "accuracy": <%= accuracy %>, "altitude": <%= altitude %>, "altitude_accuracy": <%= altitude_accuracy %> }, "activity": { "type": "<%= activity.type %>", "confidence": <%= activity.confidence %> }, "is_mock": <%= mock %>, "is_moving": <%= is_moving %> }";
headers = {
Accept = "application/json";
"Accept-Language" = "en-US";
"Content-Type" = "application/json";
"Rain-Version" = "2020-04-21";
"source-code" = RAIN;
"x-rain-app-key" = 408776b60d8f4295ae806b2dce0bfae2;
"x-rain-app-name" = "MOBILE_APP";
"x-rain-app-platform" = IOS;
"x-rain-app-version" = "999.999.999";
"x-rain-brand" = RAIN;
"x-rain-client" = RAIN;
};
heartbeatInterval = 60;
httpRootProperty = location;
httpTimeout = 60000;
iOSHasWarnedLocationServicesOff = 0;
isFirstBoot = 0;
isMoving = 0;
lastLocationAuthorizationStatus = 3;
locationAuthorizationAlert = {
cancelButton = Cancel;
instructions = "To use background location, you must enable '{locationAuthorizationRequest}' in the Location Services settings";
settingsButton = Settings;
titleWhenNotEnabled = "Background location is not enabled";
titleWhenOff = "Location services are off";
};
locationAuthorizationRequest = Always;
locationTemplate = "";
locationTimeout = 60;
locationsOrderDirection = ASC;
logLevel = 5;
logMaxDays = 3;
maxBatchSize = "-1";
maxDaysToPersist = 1;
maxRecordsToPersist = "-1";
method = POST;
minimumActivityRecognitionConfidence = 70;
odometer = 0;
params = {
"device_id" = "831292c5-1719-4b14-b162-e554d8e5c7aa";
"device_name" = "iPhone 15 Pro";
"device_os" = ios;
"user_id" = "925be8b8-0329-4ebb-939e-04d8fdc02abf";
};
pausesLocationUpdatesAutomatically = 1;
persistMode = 2;
preventSuspend = 0;
schedule = (
);
schedulerEnabled = 0;
showsBackgroundLocationIndicator = 1;
startOnBoot = 1;
stationaryRadius = 25;
stopAfterElapsedMinutes = "-1";
stopDetectionDelay = 0;
stopOnStationary = 0;
stopOnTerminate = 0;
stopTimeout = 5;
trackingMode = 0;
url = "************";
useSignificantChangesOnly = 0;
}

2024-10-04 12:41:46.397 ℹ️-[GeofenceDAO init] CREATE TABLE IF NOT EXISTS geofences (id INTEGER PRIMARY KEY AUTOINCREMENT, identifier TEXT NOT NULL UNIQUE, latitude DOUBLE NOT NULL, sin_latitude DOUBLE NOT NULL, cos_latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, sin_longitude DOUBLE NOT NULL, cos_longitude DOUBLE NOT NULL, radius DOUBLE NOT NULL, notifyOnEntry BOOLEAN NOT NULL DEFAULT 0, notifyOnExit BOOLEAN NOT NULL DEFAULT 0, notifyOnDwell BOOLEAN NOT NULL DEFAULT 0, loiteringDelay DOUBLE NOT NULL DEFAULT 0, extras TEXT, vertices TEXT)

2024-10-04 12:41:46.397 ℹ️-[GeofenceDAO init] CREATE index IF NOT EXISTS identifier ON geofences (identifier);CREATE index IF NOT EXISTS latitude ON geofences (latitude);CREATE index IF NOT EXISTS longitude ON geofences (longitude);CREATE index IF NOT EXISTS sin_latitude ON geofences (sin_latitude);CREATE index IF NOT EXISTS cos_latitude ON geofences (cos_latitude);CREATE index IF NOT EXISTS sin_longitude ON geofences (sin_longitude);CREATE index IF NOT EXISTS cos_longitude ON geofences (cos_longitude);

2024-10-04 12:41:46.614 🎾-[TSGeofenceManager locationManager:didEnterRegion:] cf676d36-be4b-4b67-b90c-dadc3654826b

2024-10-04 12:41:46.614 🎾-[TSGeofenceManager requestLocation]

2024-10-04 12:41:46.615 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-04 12:41:46.616 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-04 12:41:46.617 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3

2024-10-04 12:41:46.626 🔵-[TSLocationManager locationManager:didExitRegion:] Exit stationary region

2024-10-04 12:41:46.626 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-04 12:41:46.627 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-04 12:41:46.628 🔵-[PolygonGeofencingService locationManager:didChangeAuthorizationStatus:] 3

2024-10-04 12:41:46.643 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-04 12:41:46.648 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-04 12:41:48.244 ℹ️-[TSLocationManager log:message:] [RNBackgroundGeolocation startObserving]

2024-10-04 12:41:48.249 ℹ️-[TSConfig persist]

2024-10-04 12:41:48.302 ℹ️-[TSConfig persist]

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager log:message:] [useGeolocation] [createGeolocationBootSettings]

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager on:success:failure:] location

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager on:success:failure:] motionchange

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager on:success:failure:] activitychange

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager on:success:failure:] heartbeat

2024-10-04 12:41:48.335 ℹ️-[TSGeofenceManager onGeofence:]

2024-10-04 12:41:48.335 ℹ️-[TSGeofenceManager onGeofencesChange:]

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager on:success:failure:] http

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager on:success:failure:] providerchange

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager on:success:failure:] schedule

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager on:success:failure:] powersavechange

2024-10-04 12:41:48.335 ℹ️-[TSHttpService onConnectivityChange:]

2024-10-04 12:41:48.335 ℹ️-[TSLocationManager on:success:failure:] enabledchange

2024-10-04 12:41:48.335 ℹ️-[TSHttpService onAuthorization:]

2024-10-04 12:41:48.335 🔵-[TSLocationManager ready]

2024-10-04 12:41:48.339 ℹ️-[TSLocationManager doStart:] trackingMode: 0

2024-10-04 12:41:48.339 ℹ️-[TSLocationManager clearLastOdometerLocation]

2024-10-04 12:41:48.339 🎾-[TSGeofenceManager start]

2024-10-04 12:41:48.340 🔵-[TSLocationManager setPace:] 0

2024-10-04 12:41:48.353 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2024-10-04 12:41:48.355
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:48.356 ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS

2024-10-04 12:41:48.356
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:48.367 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-04 12:41:48.367 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON

2024-10-04 12:41:48.374 ℹ️-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch

2024-10-04 12:41:48.375
📍<+38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 04/10/2024, 12:41:47 Central European Summer Time

2024-10-04 12:41:48.375
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 910 ms
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:48.375 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 04/10/2024, 12:41:47 Central European Summer Time

2024-10-04 12:41:48.375 🔵-[TSGeofenceManager didBecomeStationary:] TSGeofenceManager became stationary with outstanding loitering timers. Firing all loitering geofences

2024-10-04 12:41:48.375
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager fireGeofenceEvent:] 📢ENTER Geofence: cf676d36-be4b-4b67-b90c-dadc3654826b
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:48.376 ✅-[TSGeofenceManager fireGeofenceEvent:] INSERT: 2FE8A936-8C9E-4ACB-A851-CF60B64431DA

2024-10-04 12:41:48.376
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:48.377 ✅-[BackgroundTaskManager createBackgroundTask] 16

2024-10-04 12:41:48.378 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-04 12:41:48.378 ✅-[TSHttpService schedulePost] LOCKED: 2FE8A936-8C9E-4ACB-A851-CF60B64431DA

2024-10-04 12:41:48.379 ✅-[BackgroundTaskManager createBackgroundTask] 17

2024-10-04 12:41:48.379 🔵-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 1000

2024-10-04 12:41:48.381 🔴-[TSLocationManager stopUpdatingLocation]

2024-10-04 12:41:48.382 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0

2024-10-04 12:41:48.382 ℹ️-[PolygonGeofencingService setLocation:] Already updating location

2024-10-04 12:41:48.386 ℹ️-[TSLocationManager log:message:] [useGeolocation] [onConnectivityChange]

2024-10-04 12:41:48.389 ℹ️-[TSLocationManager log:message:] [useGeolocation] [initBackgroundGeolocation] ready function - Enabled

2024-10-04 12:41:48.403 ℹ️-[TSLocationManager log:message:] [useGeolocation] [Geofence]

2024-10-04 12:41:48.784 🔵-[HttpResponse handleResponse] Response: 201

2024-10-04 12:41:48.785 ✅-[TSHttpService post:]_block_invoke DESTROY: 2FE8A936-8C9E-4ACB-A851-CF60B64431DA

2024-10-04 12:41:48.785
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:48.785 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 16 OF (
16,
17
)

2024-10-04 12:41:48.791 ℹ️-[TSLocationManager log:message:] [useGeolocation] [fetchDeleteOldAndCreateNewGeofences] [page] [{"id":"cf676d36-be4b-4b67-b90c-dadc3654826b","organization_id":"a94676dd-3a65-405a-92ac-cc80eef5f80c","employer_id":"084d03d1-a7fb-4b0d-9984-17f96f769c52","name":"12345","description":"54321","location":{"latitude":38.584916,"longitude":-9.146074,"radius":150},"full_address":"zerozero","created_at":"2024-02-12T17:40:02.055109Z","updated_at":"2024-02-12T17:40:02.055109Z"},{"id":"5e8401d6-2dce-4e4a-9b4e-1e122876d3e8","organization_id":"a94676dd-3a65-405a-92ac-cc80eef5f80c","employer_id":"084d03d1-a7fb-4b0d-9984-17f96f769c52","name":"12345","description":"54321","location":{"latitude":38.794889,"longitude":-9.21892,"radius":150},"full_address":"zerozero","created_at":"2024-02-12T17:40:09.767405Z","updated_at":"2024-02-12T17:40:09.767405Z"},{"id":"cd00ea4e-702c-45c4-abc8-7ce8438d5b50","organization_id":"a94676dd-3a65-405a-92ac-cc80eef5f80c","employer_id":"084d03d1-a7fb-4b0d-9984-17f96f769c52","name":"nome001","description":"description001","location":{"latitude":38.782,"longitude":-9.0947,"radius":150},"full_address":"full_name001","created_at":"2024-02-13T17:47:01.864658Z","updated_at":"2024-02-13T17:47:01.864658Z"}]

2024-10-04 12:41:48.795 ℹ️-[TSLocationManager log:message:] [useGeolocation] [fetchDeleteOldAndCreateNewGeofences] Finish iterating

2024-10-04 12:41:48.795 ℹ️-[TSLocationManager log:message:] [useGeolocation] [fetchDeleteOldAndCreateNewGeofences] Employer locations haven't changed

2024-10-04 12:41:49.381
📍<+38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 04/10/2024, 12:41:47 Central European Summer Time

2024-10-04 12:41:49.381
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager evaluateProximity:] Found 3 / 3 within 2000 m
╚═══════════════════════════════════════════════════════════

2024-10-04 12:41:49.386 🔵-[TSGeofenceManager evaluateProximity:delay:]_block_invoke Re-evaluation timer fired

2024-10-04 12:41:49.386 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 17 OF (
17
)

PASTE_YOUR_LOGS_HERE
@christocracy
Copy link
Member

Are you calling .addGeofence(s) each time your app launches?

@christocracy
Copy link
Member

Also, I need to see the parameters of the Geofences you’re monitoring.

@UnderTheMoonspell
Copy link
Author

UnderTheMoonspell commented Oct 4, 2024

Thats what i thought, but no we are not calling it each time (i just reconfirmed). Also the events are not triggered if the location doesnt change, which would be the case for addGeofences being called. These are the geofences:

[
  {
    latitude: 38.584916,
    longitude: -9.146074,
    radius: 150,
  },
  {
    latitude: 38.794889,
    longitude: -9.21892,
    radius: 150,
  },
  {
    latitude: 38.782,
    longitude: -9.0947,
    radius: 150,
  },
];

@christocracy
Copy link
Member

I need all the params (notifyOnEntry, notifyOnDwell, notifyInExit)

@UnderTheMoonspell
Copy link
Author

notifyOnEntry: true,
notifyOnExit: true

@christocracy
Copy link
Member

I'm unable to reproduce this phenomenon using the demo app in the Simulator.

Plugin version: 4.14.3

I notice you're using a version from a year ago

From your logs, I see two cases where a geofence ENTER fired.

2024-10-04 12:41:46.614 🎾-[TSGeofenceManager locationManager:didEnterRegion:] cf676d36-be4b-4b67-b90c-dadc3654826b
.
. <terminated, relaunched>
.
2024-10-04 12:41:46.614 🎾-[TSGeofenceManager locationManager:didEnterRegion:] cf676d36-be4b-4b67-b90c-dadc3654826b

When we see locationManager:didEnterRegion, this is the native location API's delegate method being fired by the OS. It is the operating system itself saying that this geofence was entered..

The method didEnterRegion is like a mailbox. The operating system is the mailman for geofence events. If the mailman delivered the mail, then that geofence must have had a legitimate reason to be fired.

Screenshot 2024-10-04 at 9 57 49 AM

Please double check your reproduction steps and provide more detail.

For example, I'm creating my geofence at the location "Apple" in the simulator.

@UnderTheMoonspell
Copy link
Author

@christocracy thanks for the detailed explanation! I'll try updating the lib :)

@christocracy
Copy link
Member

re: reproduction steps:

  1. Change the location in the emulator to trigger an exit event (can be done with app closed or open)

After the geofence fires at location "Apple", I change my location via:
Simulator menu -> Features -> Location -> Custom Location. I accept the default value (somewhere in downtown SF).

Screenshot 2024-10-04 at 10 04 34 AM (1)

@UnderTheMoonspell
Copy link
Author

UnderTheMoonspell commented Oct 7, 2024

I updated the lib, confirmed that init is called only once and that no geofences are added after the app restarts. I made a video that shows the problem (the first time theres two events because one of them is a tracking event)

WhatsApp.Video.2024-10-07.at.13.05.32.mp4

And these are the logs for this video:

LOG 2024-10-07 12:17:55.063 ℹ️-[TSConfig persist]

2024-10-07 12:17:55.066 🔵-[TSLocationManager ready]

2024-10-07 12:17:55.089 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-07 12:17:55.092 ℹ️-[TSLocationManager log:message:] [useGeolocation] [initBackgroundGeolocation] ready function - Enabled

2024-10-07 12:18:11.596 ℹ️-[TSConfig persist]

2024-10-07 12:18:17.023 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-07 12:18:19.943 ℹ️-[TSLocationManager log:message:] [useGeolocation] [requestUserPermission] start

2024-10-07 12:18:19.961 ℹ️+[LocationAuthorization run:onCancel:] status: 0

2024-10-07 12:18:19.961 🔵+[LocationAuthorization run:onCancel:] Request: requestAlwaysAuthorization

2024-10-07 12:18:21.055 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 4

2024-10-07 12:18:21.056 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 4

2024-10-07 12:18:21.057 ℹ️-[TSConfig persist]

2024-10-07 12:18:21.065 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 4

2024-10-07 12:18:21.072 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 4

2024-10-07 12:18:21.073 🔵-[PolygonGeofencingService locationManager:didChangeAuthorizationStatus:] 4

2024-10-07 12:18:21.074 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 4

2024-10-07 12:18:21.076 ℹ️+[LocationAuthorization run:onCancel:] status: 4

2024-10-07 12:18:21.077 ℹ️-[TSConfig persist]

2024-10-07 12:18:21.079 ℹ️+[LocationAuthorization run:onCancel:] Location authorization upgrade: WhenInUse -> Always

2024-10-07 12:18:21.079 🔵+[LocationAuthorization run:onCancel:] Request: requestAlwaysAuthorization

2024-10-07 12:18:21.098 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-07 12:18:22.511 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:22.512 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:22.513 ℹ️-[TSConfig persist]

2024-10-07 12:18:22.516 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3

2024-10-07 12:18:22.524 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:22.525 🔵-[PolygonGeofencingService locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:22.525 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:22.551 ℹ️-[TSLocationManager log:message:] [useGeolocation] [requestUserPermission] finish

2024-10-07 12:18:22.551 ℹ️-[TSLocationManager log:message:] [useGeolocation] [checkAccuracyAuthorizationStatus] start

2024-10-07 12:18:22.557 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-07 12:18:22.572 ℹ️-[TSLocationManager log:message:] [useGeolocation] [checkAccuracyAuthorizationStatus] GRANTED:

2024-10-07 12:18:22.575
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager startGeofences]
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:22.575 ℹ️-[TSLocationManager doStart:] trackingMode: 0

2024-10-07 12:18:22.575 ℹ️-[TSConfig persist]

2024-10-07 12:18:22.578 ℹ️-[TSConfig persist]

2024-10-07 12:18:22.581 ℹ️-[TSLocationManager clearLastOdometerLocation]

2024-10-07 12:18:22.581 🎾-[TSGeofenceManager start]

2024-10-07 12:18:22.582 🔵-[TSLocationManager setPace:] 0

2024-10-07 12:18:22.589 ℹ️-[TSLocationManager log:message:] [useGeolocation] [onEnabledChange]

2024-10-07 12:18:22.601 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2024-10-07 12:18:22.605
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:22.606 ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS

2024-10-07 12:18:22.606
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:22.617 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-07 12:18:22.617 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON

2024-10-07 12:18:22.620
📍<+38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:21 Central European Summer Time

2024-10-07 12:18:22.620
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 669 ms
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:22.620 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:21 Central European Summer Time

2024-10-07 12:18:22.620 🔵-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 1000

2024-10-07 12:18:22.622 🔴-[TSLocationManager stopUpdatingLocation]

2024-10-07 12:18:22.622 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0

2024-10-07 12:18:22.622 ℹ️-[PolygonGeofencingService setLocation:] Already updating location

2024-10-07 12:18:22.626 ℹ️-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch

2024-10-07 12:18:22.694 ℹ️-[TSLocationManager log:message:] [useGeolocation] [onConnectivityChange]

2024-10-07 12:18:22.726 ℹ️-[TSLocationManager log:message:] [useGeolocation] Start tracking geofences

2024-10-07 12:18:22.946 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-07 12:18:23.084 ℹ️-[TSLocationManager log:message:] [useGeolocation] [fetchDeleteOldAndCreateNewGeofences] [page] [{"id":"cf676d36-be4b-4b67-b90c-dadc3654826b","organization_id":"a94676dd-3a65-405a-92ac-cc80eef5f80c","employer_id":"084d03d1-a7fb-4b0d-9984-17f96f769c52","name":"12345","description":"54321","location":{"latitude":38.584916,"longitude":-9.146074,"radius":150},"full_address":"zerozero","created_at":"2024-02-12T17:40:02.055109Z","updated_at":"2024-02-12T17:40:02.055109Z"},{"id":"5e8401d6-2dce-4e4a-9b4e-1e122876d3e8","organization_id":"a94676dd-3a65-405a-92ac-cc80eef5f80c","employer_id":"084d03d1-a7fb-4b0d-9984-17f96f769c52","name":"12345","description":"54321","location":{"latitude":38.794889,"longitude":-9.21892,"radius":150},"full_address":"zerozero","created_at":"2024-02-12T17:40:09.767405Z","updated_at":"2024-02-12T17:40:09.767405Z"},{"id":"cd00ea4e-702c-45c4-abc8-7ce8438d5b50","organization_id":"a94676dd-3a65-405a-92ac-cc80eef5f80c","employer_id":"084d03d1-a7fb-4b0d-9984-17f96f769c52","name":"nome001","description":"description001","location":{"latitude":38.782,"longitude":-9.0947,"radius":150},"full_address":"full_name001","created_at":"2024-02-13T17:47:01.864658Z","updated_at":"2024-02-13T17:47:01.864658Z"}]

2024-10-07 12:18:23.084 🔵-[TSLocationManager addGeofences:success:failure:]

2024-10-07 12:18:23.085 ℹ️-[GeofenceDAO doInsert:geofence:] cf676d36-be4b-4b67-b90c-dadc3654826b

2024-10-07 12:18:23.085 ℹ️-[GeofenceDAO doInsert:geofence:] 5e8401d6-2dce-4e4a-9b4e-1e122876d3e8

2024-10-07 12:18:23.085 ℹ️-[GeofenceDAO doInsert:geofence:] cd00ea4e-702c-45c4-abc8-7ce8438d5b50

2024-10-07 12:18:23.093 ℹ️-[TSLocationManager log:message:] [useGeolocation] [addGeofences] added geofences

2024-10-07 12:18:23.093 ℹ️-[TSLocationManager log:message:] [useGeolocation] [fetchDeleteOldAndCreateNewGeofences] Finish iterating

2024-10-07 12:18:23.289 🔴-[TSGeofenceManager stopMonitoringSignificantLocationChanges]

2024-10-07 12:18:23.290
📍<+38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:21 Central European Summer Time

2024-10-07 12:18:23.290
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager evaluateProximity:] Found 3 / 3 within 2000 m
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:23.292 🎾-[TSGeofenceManager startMonitoringGeofence:] cf676d36-be4b-4b67-b90c-dadc3654826b

2024-10-07 12:18:23.292 🎾-[TSGeofenceManager startMonitoringGeofence:] 5e8401d6-2dce-4e4a-9b4e-1e122876d3e8

2024-10-07 12:18:23.292 🎾-[TSGeofenceManager startMonitoringGeofence:] cd00ea4e-702c-45c4-abc8-7ce8438d5b50

2024-10-07 12:18:23.300 🎾-[TSGeofenceManager requestLocation]

2024-10-07 12:18:23.314 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-07 12:18:23.322 - requestLocation
📍<+38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:22 Central European Summer Time

2024-10-07 12:18:23.323
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager fireGeofenceEvent:] 📢ENTER Geofence: cf676d36-be4b-4b67-b90c-dadc3654826b
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:23.323 ✅-[TSGeofenceManager fireGeofenceEvent:] INSERT: D5183F63-9D90-4FC7-88DA-B3C489D85F17

2024-10-07 12:18:23.323
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:23.325 ✅-[BackgroundTaskManager createBackgroundTask] 444

2024-10-07 12:18:23.326 ✅-[TSHttpService schedulePost] LOCKED: D5183F63-9D90-4FC7-88DA-B3C489D85F17

2024-10-07 12:18:23.326 ℹ️-[TSLocationManager log:message:] [useGeolocation] [Geofence]

2024-10-07 12:18:23.326 ✅-[BackgroundTaskManager createBackgroundTask] 445

2024-10-07 12:18:23.754 🔵-[HttpResponse handleResponse] Response: 201

2024-10-07 12:18:23.757 ✅-[TSHttpService post:]_block_invoke DESTROY: D5183F63-9D90-4FC7-88DA-B3C489D85F17

2024-10-07 12:18:23.757
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:23.757 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 444 OF (
444,
445
)

2024-10-07 12:18:24.328 🔴-[TSGeofenceManager stopMonitoringSignificantLocationChanges]

2024-10-07 12:18:24.328
📍<+38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:22 Central European Summer Time

2024-10-07 12:18:24.328
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager evaluateProximity:] Found 3 / 3 within 2000 m
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:24.335 🔵-[TSGeofenceManager evaluateProximity:delay:]_block_invoke Re-evaluation timer fired

2024-10-07 12:18:24.335 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 445 OF (
445
)

2024-10-07 12:18:29.774 🔵-[TSLocationManager onSuspend:] enabled? 1)

2024-10-07 12:18:29.782 ℹ️-[TSDBLogger db_save] Log committed

2024-10-07 12:18:37.012 ℹ️-[TSDBLogger db_delete] maxAge: 259200

2024-10-07 12:18:37.012 ℹ️-[TSLocationManager init]
╔═════════════════════════════════════════════
║ TSLocationManager (build 388)
╠══════════════════════════════════════════════
{
activityRecognitionInterval = 10000;
activityType = 1;
authorization = {
};
autoSync = 1;
autoSyncThreshold = 0;
batchSync = 0;
debug = 0;
desiredAccuracy = "-1";
desiredOdometerAccuracy = 100;
didDeviceReboot = 0;
didLaunchInBackground = 0;
didRequestUpgradeLocationAuthorization = 1;
disableAutoSyncOnCellular = 0;
disableElasticity = 0;
disableLocationAuthorizationAlert = 1;
disableMotionActivityUpdates = 1;
disableStopDetection = 0;
distanceFilter = 10;
elasticityMultiplier = 1;
enableTimestampMeta = 0;
enabled = 1;
extras = {
};
geofenceInitialTriggerEntry = 1;
geofenceProximityRadius = 2000;
geofenceTemplate = "{ "timestamp": "<%= timestamp %>", "uuid": "<%= uuid %>", "age": <%= age %>, "event": "<%= event %>", "odometer": <%= odometer %>, "geofence": { "identifier": "<%= geofence.identifier %>", "action": "<%= geofence.action %>" }, "coords":{ "latitude": <%= latitude %>, "longitude": <%= longitude %>, "accuracy": <%= accuracy %>, "altitude": <%= altitude %>, "altitude_accuracy": <%= altitude_accuracy %> }, "activity": { "type": "<%= activity.type %>", "confidence": <%= activity.confidence %> }, "is_mock": <%= mock %>, "is_moving": <%= is_moving %> }";
headers = {
Accept = "application/json";
"Accept-Language" = "en-US";
"Content-Type" = "application/json";
"Rain-Version" = "2020-04-21";
"source-code" = RAIN;
"x-rain-app-key" = 408776b60d8f4295ae806b2dce0bfae2;
"x-rain-app-name" = "MOBILE_APP";
"x-rain-app-platform" = IOS;
"x-rain-app-version" = "999.999.999";
"x-rain-brand" = RAIN;
"x-rain-client" = RAIN;
};
heartbeatInterval = 60;
httpRootProperty = location;
httpTimeout = 60000;
iOSHasWarnedLocationServicesOff = 0;
isFirstBoot = 0;
isMoving = 0;
lastLocationAuthorizationStatus = 3;
locationAuthorizationAlert = {
cancelButton = Cancel;
instructions = "To use background location, you must enable '{locationAuthorizationRequest}' in the Location Services settings";
settingsButton = Settings;
titleWhenNotEnabled = "Background location is not enabled";
titleWhenOff = "Location services are off";
};
locationAuthorizationRequest = Always;
locationTemplate = "";
locationTimeout = 60;
locationsOrderDirection = ASC;
logLevel = 5;
logMaxDays = 3;
maxBatchSize = "-1";
maxDaysToPersist = 1;
maxRecordsToPersist = "-1";
method = POST;
minimumActivityRecognitionConfidence = 70;
odometer = 0;
params = {
"device_id" = "831292c5-1719-4b14-b162-e554d8e5c7aa";
"device_name" = "iPhone 15 Pro";
"device_os" = ios;
"user_id" = "925be8b8-0329-4ebb-939e-04d8fdc02abf";
};
pausesLocationUpdatesAutomatically = 1;
persistMode = 2;
preventSuspend = 0;
schedule = (
);
schedulerEnabled = 0;
showsBackgroundLocationIndicator = 1;
startOnBoot = 1;
stationaryRadius = 25;
stopAfterElapsedMinutes = "-1";
stopDetectionDelay = 0;
stopOnStationary = 0;
stopOnTerminate = 0;
stopTimeout = 5;
trackingMode = 0;
url = "*********";
useSignificantChangesOnly = 0;
}

2024-10-07 12:18:37.028 ℹ️-[GeofenceDAO init] CREATE TABLE IF NOT EXISTS geofences (id INTEGER PRIMARY KEY AUTOINCREMENT, identifier TEXT NOT NULL UNIQUE, latitude DOUBLE NOT NULL, sin_latitude DOUBLE NOT NULL, cos_latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, sin_longitude DOUBLE NOT NULL, cos_longitude DOUBLE NOT NULL, radius DOUBLE NOT NULL, notifyOnEntry BOOLEAN NOT NULL DEFAULT 0, notifyOnExit BOOLEAN NOT NULL DEFAULT 0, notifyOnDwell BOOLEAN NOT NULL DEFAULT 0, loiteringDelay DOUBLE NOT NULL DEFAULT 0, extras TEXT, vertices TEXT)

2024-10-07 12:18:37.028 ℹ️-[GeofenceDAO init] CREATE index IF NOT EXISTS identifier ON geofences (identifier);CREATE index IF NOT EXISTS latitude ON geofences (latitude);CREATE index IF NOT EXISTS longitude ON geofences (longitude);CREATE index IF NOT EXISTS sin_latitude ON geofences (sin_latitude);CREATE index IF NOT EXISTS cos_latitude ON geofences (cos_latitude);CREATE index IF NOT EXISTS sin_longitude ON geofences (sin_longitude);CREATE index IF NOT EXISTS cos_longitude ON geofences (cos_longitude);

2024-10-07 12:18:37.296 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3

2024-10-07 12:18:37.316 🔵-[TSLocationManager locationManager:didExitRegion:] Exit stationary region

2024-10-07 12:18:37.325 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:37.338 🔴-[TSGeofenceManager locationManager:didExitRegion:] cf676d36-be4b-4b67-b90c-dadc3654826b

2024-10-07 12:18:37.341 🎾-[TSGeofenceManager requestLocation]

2024-10-07 12:18:37.341 🔵-[PolygonGeofencingService locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:37.352 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:37.354 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:37.357 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:37.373 🔴-[TSGeofenceManager stopUpdatingLocation]

2024-10-07 12:18:37.382 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-07 12:18:37.391 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-07 12:18:38.859 ℹ️-[TSLocationManager log:message:] [RNBackgroundGeolocation startObserving]

2024-10-07 12:18:38.907 ℹ️-[TSConfig persist]

2024-10-07 12:18:38.914 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-07 12:18:38.959 ℹ️-[TSLocationManager log:message:] [useGeolocation] [createGeolocationBootSettings]

2024-10-07 12:18:38.959 ℹ️-[TSLocationManager on:success:failure:] location

2024-10-07 12:18:38.959 ℹ️-[TSLocationManager on:success:failure:] motionchange

2024-10-07 12:18:38.959 ℹ️-[TSLocationManager on:success:failure:] activitychange

2024-10-07 12:18:38.959 ℹ️-[TSLocationManager on:success:failure:] heartbeat

2024-10-07 12:18:38.959 ℹ️-[TSGeofenceManager onGeofence:]

2024-10-07 12:18:38.959 ℹ️-[TSGeofenceManager onGeofencesChange:]

2024-10-07 12:18:38.959 ℹ️-[TSLocationManager on:success:failure:] http

2024-10-07 12:18:38.959 ℹ️-[TSLocationManager on:success:failure:] providerchange

2024-10-07 12:18:38.959 ℹ️-[TSLocationManager on:success:failure:] schedule

2024-10-07 12:18:38.959 ℹ️-[TSLocationManager on:success:failure:] powersavechange

2024-10-07 12:18:38.959 ℹ️-[TSHttpService onConnectivityChange:]

2024-10-07 12:18:38.959 ℹ️-[TSLocationManager on:success:failure:] enabledchange

2024-10-07 12:18:38.959 ℹ️-[TSHttpService onAuthorization:]

2024-10-07 12:18:38.959 🔵-[TSLocationManager ready]

2024-10-07 12:18:38.962 🔵-[TSLocationManager ready] Booted in background

2024-10-07 12:18:38.962 ℹ️-[TSLocationManager doStart:] trackingMode: 0

2024-10-07 12:18:38.962 ℹ️-[TSLocationManager clearLastOdometerLocation]

2024-10-07 12:18:38.962 🎾-[TSGeofenceManager start]

2024-10-07 12:18:38.962 🔵-[TSLocationManager setPace:] 0

2024-10-07 12:18:38.968 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-07 12:18:38.972 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2024-10-07 12:18:38.974
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:38.974 ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS

2024-10-07 12:18:38.974
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:38.975 ℹ️-[TSLocationManager log:message:] [useGeolocation] [onConnectivityChange]

2024-10-07 12:18:38.980 ℹ️-[TSLocationManager log:message:] [useGeolocation] [initBackgroundGeolocation] ready function - Enabled

2024-10-07 12:18:38.985 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-07 12:18:38.985 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON

2024-10-07 12:18:38.986
📍<-38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:38 Central European Summer Time

2024-10-07 12:18:38.986
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 23 ms
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:38.986 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <-38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:38 Central European Summer Time

2024-10-07 12:18:38.986 🔵-[TSGeofenceManager didBecomeStationary:] TSGeofenceManager became stationary with outstanding loitering timers. Firing all loitering geofences

2024-10-07 12:18:38.986
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager fireGeofenceEvent:] 📢EXIT Geofence: cf676d36-be4b-4b67-b90c-dadc3654826b
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:38.987 ✅-[TSGeofenceManager fireGeofenceEvent:] INSERT: 11EBB162-094D-4209-A14F-73120B3B57D4

2024-10-07 12:18:38.987
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:38.988 ✅-[BackgroundTaskManager createBackgroundTask] 18

2024-10-07 12:18:38.989 ℹ️-[TSLocationManager log:message:] [useGeolocation] [Geofence]

2024-10-07 12:18:38.989 ✅-[BackgroundTaskManager createBackgroundTask] 19

2024-10-07 12:18:38.990 ✅-[TSHttpService schedulePost] LOCKED: 11EBB162-094D-4209-A14F-73120B3B57D4

2024-10-07 12:18:38.990 🔵-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 1000

2024-10-07 12:18:38.995 🔴-[TSLocationManager stopUpdatingLocation]

2024-10-07 12:18:38.996 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0

2024-10-07 12:18:38.996 ℹ️-[PolygonGeofencingService setLocation:] Already updating location

2024-10-07 12:18:39.008 ℹ️-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch

2024-10-07 12:18:39.150 🔵-[HttpResponse handleResponse] Response: 201

2024-10-07 12:18:39.151 ✅-[TSHttpService post:]_block_invoke DESTROY: 11EBB162-094D-4209-A14F-73120B3B57D4

2024-10-07 12:18:39.152
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:39.152 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 18 OF (
18,
19
)

2024-10-07 12:18:39.993 🔴-[TSGeofenceManager stopMonitoringSignificantLocationChanges]

2024-10-07 12:18:39.993
📍<-38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:38 Central European Summer Time

2024-10-07 12:18:39.993
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager evaluateProximity:] Found 3 / 3 within 2000 m
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:39.997 🔵-[TSGeofenceManager evaluateProximity:delay:]_block_invoke Re-evaluation timer fired

2024-10-07 12:18:39.997 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 19 OF (
19
)

2024-10-07 12:18:42.045 🔵-[TSLocationManager onResume:] enabled? 1

2024-10-07 12:18:42.064 ℹ️-[LocationDAO purge:] 1

2024-10-07 12:18:42.066 ℹ️-[TSDBLogger db_save] Log committed

2024-10-07 12:18:42.066
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:42.067
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:42.364 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-07 12:18:45.299 🔵-[TSLocationManager onSuspend:] enabled? 1)

2024-10-07 12:18:45.306 ℹ️-[TSDBLogger db_save] Log committed

2024-10-07 12:18:47.299 ℹ️-[TSDBLogger db_delete] maxAge: 259200

2024-10-07 12:18:47.300 ℹ️-[TSLocationManager init]
╔═════════════════════════════════════════════
║ TSLocationManager (build 388)
╠══════════════════════════════════════════════
{
activityRecognitionInterval = 10000;
activityType = 1;
authorization = {
};
autoSync = 1;
autoSyncThreshold = 0;
batchSync = 0;
debug = 0;
desiredAccuracy = "-2";
desiredOdometerAccuracy = 100;
didDeviceReboot = 0;
didLaunchInBackground = 0;
didRequestUpgradeLocationAuthorization = 1;
disableAutoSyncOnCellular = 0;
disableElasticity = 0;
disableLocationAuthorizationAlert = 1;
disableMotionActivityUpdates = 1;
disableStopDetection = 0;
distanceFilter = 10;
elasticityMultiplier = 1;
enableTimestampMeta = 0;
enabled = 1;
extras = {
};
geofenceInitialTriggerEntry = 1;
geofenceProximityRadius = 2000;
geofenceTemplate = "{ "timestamp": "<%= timestamp %>", "uuid": "<%= uuid %>", "age": <%= age %>, "event": "<%= event %>", "odometer": <%= odometer %>, "geofence": { "identifier": "<%= geofence.identifier %>", "action": "<%= geofence.action %>" }, "coords":{ "latitude": <%= latitude %>, "longitude": <%= longitude %>, "accuracy": <%= accuracy %>, "altitude": <%= altitude %>, "altitude_accuracy": <%= altitude_accuracy %> }, "activity": { "type": "<%= activity.type %>", "confidence": <%= activity.confidence %> }, "is_mock": <%= mock %>, "is_moving": <%= is_moving %> }";
headers = {
Accept = "application/json";
"Accept-Language" = "en-US";
"Content-Type" = "application/json";
"Rain-Version" = "2020-04-21";
"source-code" = RAIN;
"x-rain-app-key" = 408776b60d8f4295ae806b2dce0bfae2;
"x-rain-app-name" = "MOBILE_APP";
"x-rain-app-platform" = IOS;
"x-rain-app-version" = "999.999.999";
"x-rain-brand" = RAIN;
"x-rain-client" = RAIN;
};
heartbeatInterval = 60;
httpRootProperty = location;
httpTimeout = 60000;
iOSHasWarnedLocationServicesOff = 0;
isFirstBoot = 0;
isMoving = 0;
lastLocationAuthorizationStatus = 3;
locationAuthorizationAlert = {
cancelButton = Cancel;
instructions = "To use background location, you must enable '{locationAuthorizationRequest}' in the Location Services settings";
settingsButton = Settings;
titleWhenNotEnabled = "Background location is not enabled";
titleWhenOff = "Location services are off";
};
locationAuthorizationRequest = Always;
locationTemplate = "";
locationTimeout = 60;
locationsOrderDirection = ASC;
logLevel = 5;
logMaxDays = 3;
maxBatchSize = "-1";
maxDaysToPersist = 1;
maxRecordsToPersist = "-1";
method = POST;
minimumActivityRecognitionConfidence = 70;
odometer = 0;
params = {
"device_id" = "831292c5-1719-4b14-b162-e554d8e5c7aa";
"device_name" = "iPhone 15 Pro";
"device_os" = ios;
"user_id" = "925be8b8-0329-4ebb-939e-04d8fdc02abf";
};
pausesLocationUpdatesAutomatically = 1;
persistMode = 2;
preventSuspend = 0;
schedule = (
);
schedulerEnabled = 0;
showsBackgroundLocationIndicator = 1;
startOnBoot = 1;
stationaryRadius = 25;
stopAfterElapsedMinutes = "-1";
stopDetectionDelay = 0;
stopOnStationary = 0;
stopOnTerminate = 0;
stopTimeout = 5;
trackingMode = 0;
url = "*******";
useSignificantChangesOnly = 0;
}

2024-10-07 12:18:47.309 ℹ️-[GeofenceDAO init] CREATE TABLE IF NOT EXISTS geofences (id INTEGER PRIMARY KEY AUTOINCREMENT, identifier TEXT NOT NULL UNIQUE, latitude DOUBLE NOT NULL, sin_latitude DOUBLE NOT NULL, cos_latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, sin_longitude DOUBLE NOT NULL, cos_longitude DOUBLE NOT NULL, radius DOUBLE NOT NULL, notifyOnEntry BOOLEAN NOT NULL DEFAULT 0, notifyOnExit BOOLEAN NOT NULL DEFAULT 0, notifyOnDwell BOOLEAN NOT NULL DEFAULT 0, loiteringDelay DOUBLE NOT NULL DEFAULT 0, extras TEXT, vertices TEXT)

2024-10-07 12:18:47.309 ℹ️-[GeofenceDAO init] CREATE index IF NOT EXISTS identifier ON geofences (identifier);CREATE index IF NOT EXISTS latitude ON geofences (latitude);CREATE index IF NOT EXISTS longitude ON geofences (longitude);CREATE index IF NOT EXISTS sin_latitude ON geofences (sin_latitude);CREATE index IF NOT EXISTS cos_latitude ON geofences (cos_latitude);CREATE index IF NOT EXISTS sin_longitude ON geofences (sin_longitude);CREATE index IF NOT EXISTS cos_longitude ON geofences (cos_longitude);

2024-10-07 12:18:47.467 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3

2024-10-07 12:18:47.473 🔵-[TSLocationManager locationManager:didExitRegion:] Exit stationary region

2024-10-07 12:18:47.474 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:47.475 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:47.476 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:47.477 🔵-[PolygonGeofencingService locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:47.479 🔴-[TSGeofenceManager locationManager:didExitRegion:] cf676d36-be4b-4b67-b90c-dadc3654826b

2024-10-07 12:18:47.479 🎾-[TSGeofenceManager requestLocation]

2024-10-07 12:18:47.481 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2024-10-07 12:18:47.500 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-07 12:18:47.511 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-07 12:18:47.514 🔴-[TSGeofenceManager stopUpdatingLocation]

2024-10-07 12:18:48.922 ℹ️-[TSLocationManager log:message:] [RNBackgroundGeolocation startObserving]

2024-10-07 12:18:48.968 ℹ️-[TSConfig persist]

2024-10-07 12:18:48.978 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-07 12:18:49.025 ℹ️-[TSLocationManager log:message:] [useGeolocation] [createGeolocationBootSettings]

2024-10-07 12:18:49.025 ℹ️-[TSLocationManager on:success:failure:] location

2024-10-07 12:18:49.025 ℹ️-[TSLocationManager on:success:failure:] motionchange

2024-10-07 12:18:49.025 ℹ️-[TSLocationManager on:success:failure:] activitychange

2024-10-07 12:18:49.025 ℹ️-[TSLocationManager on:success:failure:] heartbeat

2024-10-07 12:18:49.025 ℹ️-[TSGeofenceManager onGeofence:]

2024-10-07 12:18:49.025 ℹ️-[TSGeofenceManager onGeofencesChange:]

2024-10-07 12:18:49.025 ℹ️-[TSLocationManager on:success:failure:] http

2024-10-07 12:18:49.025 ℹ️-[TSLocationManager on:success:failure:] providerchange

2024-10-07 12:18:49.025 ℹ️-[TSLocationManager on:success:failure:] schedule

2024-10-07 12:18:49.025 ℹ️-[TSLocationManager on:success:failure:] powersavechange

2024-10-07 12:18:49.025 ℹ️-[TSHttpService onConnectivityChange:]

2024-10-07 12:18:49.025 ℹ️-[TSLocationManager on:success:failure:] enabledchange

2024-10-07 12:18:49.025 ℹ️-[TSHttpService onAuthorization:]

2024-10-07 12:18:49.025 🔵-[TSLocationManager ready]

2024-10-07 12:18:49.038 ℹ️-[TSLocationManager doStart:] trackingMode: 0

2024-10-07 12:18:49.038 ℹ️-[TSLocationManager clearLastOdometerLocation]

2024-10-07 12:18:49.039 🎾-[TSGeofenceManager start]

2024-10-07 12:18:49.039 🔵-[TSLocationManager setPace:] 0

2024-10-07 12:18:49.044 ℹ️-[TSLocationManager log:message:] [useGeolocation] [_updateOnProviderState]

2024-10-07 12:18:49.045 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2024-10-07 12:18:49.047
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:49.047 ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS

2024-10-07 12:18:49.047
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:49.048 ℹ️-[TSLocationManager log:message:] [useGeolocation] [onConnectivityChange]

2024-10-07 12:18:49.050 ℹ️-[TSLocationManager log:message:] [useGeolocation] [initBackgroundGeolocation] ready function - Enabled

2024-10-07 12:18:49.066 ℹ️+[LocationAuthorization run:onCancel:] status: 3

2024-10-07 12:18:49.066 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON

2024-10-07 12:18:49.067
📍<-38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:49 Central European Summer Time

2024-10-07 12:18:49.067
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 54 ms
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:49.067 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <-38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:49 Central European Summer Time

2024-10-07 12:18:49.067 🔵-[TSGeofenceManager didBecomeStationary:] TSGeofenceManager became stationary with outstanding loitering timers. Firing all loitering geofences

2024-10-07 12:18:49.067
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager fireGeofenceEvent:] 📢EXIT Geofence: cf676d36-be4b-4b67-b90c-dadc3654826b
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:49.068 ✅-[TSGeofenceManager fireGeofenceEvent:] INSERT: 07B78137-693E-4FF4-B4F7-9242D6B328D5

2024-10-07 12:18:49.068
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:49.070 ✅-[BackgroundTaskManager createBackgroundTask] 20

2024-10-07 12:18:49.071 ℹ️-[TSLocationManager log:message:] [useGeolocation] [Geofence]

2024-10-07 12:18:49.072 ✅-[BackgroundTaskManager createBackgroundTask] 21

2024-10-07 12:18:49.072 🔵-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 1000

2024-10-07 12:18:49.073 ✅-[TSHttpService schedulePost] LOCKED: 07B78137-693E-4FF4-B4F7-9242D6B328D5

2024-10-07 12:18:49.074 🔴-[TSLocationManager stopUpdatingLocation]

2024-10-07 12:18:49.075 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0

2024-10-07 12:18:49.075 ℹ️-[PolygonGeofencingService setLocation:] Already updating location

2024-10-07 12:18:49.082 ℹ️-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch

2024-10-07 12:18:49.403 🔵-[HttpResponse handleResponse] Response: 201

2024-10-07 12:18:49.404 ✅-[TSHttpService post:]_block_invoke DESTROY: 07B78137-693E-4FF4-B4F7-9242D6B328D5

2024-10-07 12:18:49.404
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 1
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:49.405 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 20 OF (
20,
21
)

2024-10-07 12:18:50.074 🔴-[TSGeofenceManager stopMonitoringSignificantLocationChanges]

2024-10-07 12:18:50.074
📍<-38.58491600,-9.14607400> +/- 5.00m (speed -1.00 mps / course -1.00) @ 07/10/2024, 12:18:49 Central European Summer Time

2024-10-07 12:18:50.074
╔═══════════════════════════════════════════════════════════
║ -[TSGeofenceManager evaluateProximity:] Found 3 / 3 within 2000 m
╚═══════════════════════════════════════════════════════════

2024-10-07 12:18:50.081 🔵-[TSGeofenceManager evaluateProximity:delay:]_block_invoke Re-evaluation timer fired

2024-10-07 12:18:50.081 ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 21 OF (
21
)

2024-10-07 12:19:04.149 ℹ️-[TSDBLogger db_save] Log committed


@UnderTheMoonspell
Copy link
Author

@christocracy i was thinking about your analogy and reanalysing the logs and theres something that your analogy doesnt seem to explain. I would understand if the OS would trigger two ENTER events if there was something in my code that would make the geofences being recreated. But how would that explain the OS sending two EXIT events in a row? Even if you recreate the geofences you never trigger an EXIT event on .ready(), the only thing it can happen, AFAIK, is creating a geofence and trigger immediately an ENTER one if you happen to already be in it.

Correct me if im wrong, also, can the demo app be downloaded for iOS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants