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

Two ENTER or two EXIT events in a row

Open UnderTheMoonspell opened this issue 1 year ago β€’ 10 comments

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 <IGNORED>

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 <IGNORED>

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 <IGNORED>

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

UnderTheMoonspell avatar Oct 04 '24 11:10 UnderTheMoonspell

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

christocracy avatar Oct 04 '24 11:10 christocracy

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

christocracy avatar Oct 04 '24 12:10 christocracy

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,
  },
];

UnderTheMoonspell avatar Oct 04 '24 12:10 UnderTheMoonspell

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

christocracy avatar Oct 04 '24 12:10 christocracy

notifyOnEntry: true, notifyOnExit: true

UnderTheMoonspell avatar Oct 04 '24 12:10 UnderTheMoonspell

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.

christocracy avatar Oct 04 '24 13:10 christocracy

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

UnderTheMoonspell avatar Oct 04 '24 14:10 UnderTheMoonspell

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)

christocracy avatar Oct 04 '24 14:10 christocracy

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)

https://github.com/user-attachments/assets/8a441dd3-abbf-4fa4-84ae-640a4c152e51

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 <IGNORED>

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 <IGNORED>

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 <IGNORED>

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 avatar Oct 07 '24 12:10 UnderTheMoonspell

@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?

UnderTheMoonspell avatar Oct 11 '24 11:10 UnderTheMoonspell

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

github-actions[bot] avatar Nov 11 '24 02:11 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Nov 25 '24 02:11 github-actions[bot]

@christocracy we're still observing this bug in production. Do you have any update on this?

jdlourenco avatar Jan 31 '25 12:01 jdlourenco