Closed FrikkieSnyman closed 4 years ago
Set notifyOnDwell: false
and try again.
Yeah that seems to have worked. Why is this happening?
Why is this happening?
Because of a bug. It is fixed currently in the private repo. Have you purchased a license?
No, not yet. We're evaluating the plugin for our use cases, so this is good to know. Are any of these "broken but fixed" bugs listed somewhere?
Are any of these "broken but fixed" bugs listed somewhere?
Yes, in the private repo's CHANGELOG. You'll have access to the private repo after purchase. This public repo gets mirrored from the private "customers only" repo only about every 3 months.
Your Environment
react-native -v
): 0.61.5Plugin config
Expected Behavior
I expect to receive an event when I EXIT the Geofence.
Actual Behavior
The radius is set to 200m. I do receive the initial ENTRY event, followed by a DWELL shortly after. Upon leaving the area I do not receive any events. Then, upon re-entering, it seems that the ENTRY, EXIT and DWELL events all trigger within 30ms of each other:
From the logs:
I tested it this morning by setting a geofence at my current location, then going out for a ride on my bike, about 1km away from the original point.
Steps to Reproduce
Context
I'm trying to send a push notification when a user leaves a certain area.
Debug logs
Logs
``` 2020-07-06 11:51:44.804 ℹ️-[TSDBLogger db_delete] maxAge: 259200 2020-07-06 11:51:44.806 ℹ️-[TSLocationManager init] ╔═════════════════════════════════════════════ ║ TSLocationManager (build 359) ╠══════════════════════════════════════════════ { activityRecognitionInterval = 10000; activityType = 1; authorization = { }; autoSync = 1; autoSyncThreshold = 0; batchSync = 0; debug = 0; desiredAccuracy = "-1"; desiredOdometerAccuracy = 100; didLaunchInBackground = 0; disableAutoSyncOnCellular = 0; disableElasticity = 0; disableLocationAuthorizationAlert = 0; disableMotionActivityUpdates = 0; disableStopDetection = 0; distanceFilter = 1; elasticityMultiplier = 1; enableTimestampMeta = 0; enabled = 1; encrypt = 0; extras = { }; geofenceInitialTriggerEntry = 1; geofenceProximityRadius = 2000; geofenceTemplate = ""; headers = { }; 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 = { }; pausesLocationUpdatesAutomatically = 1; persistMode = 0; preventSuspend = 0; schedule = ( ); schedulerEnabled = 0; showsBackgroundLocationIndicator = 0; startOnBoot = 1; stationaryRadius = 25; stopAfterElapsedMinutes = "-1"; stopDetectionDelay = 0; stopOnStationary = 0; stopOnTerminate = 0; stopTimeout = 5; trackingMode = 0; url = ""; useSignificantChangesOnly = 0; } 2020-07-06 11:51:44.812 ℹ️-[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) 2020-07-06 11:51:44.812 ℹ️-[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); 2020-07-06 11:51:44.833 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3 2020-07-06 11:51:44.840 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3 2020-07-06 11:51:44.841 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3 2020-07-06 11:51:44.841 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3 2020-07-06 11:51:44.841 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3 2020-07-06 11:51:44.874 ℹ️+[LocationAuthorization run:onCancel:] status: 3 2020-07-06 11:53:27.346 ℹ️-[TSDBLogger db_delete] maxAge: 259200 2020-07-06 11:53:27.348 ℹ️-[TSLocationManager init] ╔═════════════════════════════════════════════ ║ TSLocationManager (build 359) ╠════════════════════════════════════════════════════════════════════════ ║ TSLocationManager (build 359) ╠═══════════════════════════\342═══════════════════ { activityRecognitionInterval = 10000; activityType = 1; authorization = { }; autoSync = 1; autoSyncThreshold = 0; batchSync = 0; debug = 0; desiredAccuracy = "-1"; desiredOdometerAccuracy = 100; didLaunchInBackground = 0; disableAutoSyncOnCellular = 0; disableElasticity = 0; disableLocationAuthorizationAlert = 0; disableMotionActivityUpdates = 0; disableStopDetection = 0; distanceFilter = 1; elasticityMultiplier = 1; enableTimestampMeta = 0; enabled = 1; encrypt = 0; extras = { }; geofenceInitialTriggerEntry = 1; geofenceProximityRadius = 2000; geofenceTemplate = ""; headers = { }; 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 = { }; pausesLocationUpdatesAutomatically = 1; persistMode = 0; preventSuspend = 0; schedule = ( ); schedulerEnabled = 0; showsBackgroundLocationIndicator = 0; startOnBoot = 1; stationaryRadius = 25; stopAfterElapsedMinutes = "-1"; stopDetectionDelay = 0; stopOnStationary = 0; stopOnTerminate = 0; stopTimeout = 5; trackingMode = 0; url = ""; useSignificantChangesOnly = 0; } 2020-07-06 11:53:27.350 ℹ️-[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) 2020-07-06 11:53:27.350 ℹ️-[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); 2020-07-06 11:53:27.369 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3 2020-07-06 11:53:27.381 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3 2020-07-06 11:53:27.381 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3 2020-07-06 11:53:27.381 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3 2020-07-06 11:53:27.389 ℹ️+[LocationAuthorization run:onCancel:] status: 3 2020-07-06 11:53:27.390 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3 2020-07-06 11:53:36.962 ℹ️-[GeofenceDAO destroyAll]_block_invoke 2020-07-06 11:53:36.965 ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager stop] ╚═════════════════════════════════════════════════════════════════════════ ║ -[TSLocationManager stop] ╚══════════════════════════════════════════════════════\342═════ 2020-07-06 11:53:36.965 ℹ️-[TSConfig persist] 2020-07-06 11:53:36.969 ℹ️-[TSLocationManager clearLastOdometerLocation] 2020-07-06 11:53:36.969 🔴-[TSGeofenceManager stop] 2020-07-06 11:53:36.970 🔴-[TSGeofenceManager stopMonitoringGeofences] 2020-07-06 11:53:36.972 🔴-[TSGeofenceManager stopMonitoringGeofences] HOME200 2020-07-06 11:53:36.973 🔴-[TSGeofenceManager stopMonitoringGeofences] HOME50 2020-07-06 11:53:36.973 🔴-[TSGeofenceManager stopMonitoringGeofences] HOME100 2020-07-06 11:53:36.974 🔴-[TSLocationManager stopUpdatingLocation] 2020-07-06 11:53:36.977 🔴-[TSLocationManager stopMonitoringBackgroundFetch] BackgroundFetch: OFF 2020-07-06 11:53:36.979 🔴-[TSLocationManager stopMonitoringSignificantLocationChanges] 2020-07-06 11:53:36.985 🔵-[TSLocationManager getCurrentPosition:] 2020-07-06 11:53:36.986 🎾-[LocationManager startUpdatingLocation] ON 2020-07-06 11:53:36.991 ℹ️+[LocationAuthorization run:onCancel:] status: 3 2020-07-06 11:53:36.992 📍<+[redacted],+[redacted]> +/- 65.00m (speed -1.00 mps / course -1.00) @ 06/07/2020, 11:53:28 Central European Summer Time 2020-07-06 11:53:36.992 ╔═══════════════════════════════════════════════════════════ ║ -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 3 ╚═══════════════════════════════════════════════════════════ ║ -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 3 ╚══════════════════\342═════════════════════════════════════════ 2020-07-06 11:53:37.002 📍<+[redacted],+[redacted]> +/- 65.00m (speed -1.00 mps / course -1.00) @ 06/07/2020, 11:53:36 Central European Summer Time 2020-07-06 11:53:37.002 ╔═══════════════════════════════════════════════════════════ ║ -[LocationManager locationManager:didUpdateLocations:] Sample 2 of 3 ╚═══════════════════════════════════════════════════════════ 2020-07-06 11:53:37.164 📍<+[redacted],+[redacted]> +/- 122.64m (speed -1.00 mps / course -1.00) @ 06/07/2020, 11:53:37 Central European Summer Time 2020-07-06 11:53:37.164 🔴-[LocationManager stopUpdatingLocation] OFF 2020-07-06 11:53:37.164 ╔═══════════════════════════════════════════════════════════ ║ -[LocationManager locationManager:didUpdateLocations:] Sample 3 of 3 ╚═══════════════════════════════════════════════════════════ 2020-07-06 11:53:37.176 ℹ️-[GeofenceDAO doInsert:geofence:] HOME200 2020-07-06 11:53:37.182 ℹ️-[TSGeofenceManager onGeofence:] 2020-07-06 11:53:37.202 ℹ️-[TSConfig persist] 2020-07-06 11:53:37.204 🔵-[TSLocationManager ready] 2020-07-06 11:53:37.207 ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager startGeofences] ╚══════════════════════════════════════════════════════════════════════ ║ -[TSLocationManager startGeofences] ╚═══════════════════════════════\342════════════════════════════ 2020-07-06 11:53:37.207 ℹ️-[TSLocationManager doStart:] trackingMode: 0 2020-07-06 11:53:37.207 ℹ️-[TSConfig persist] 2020-07-06 11:53:37.208 ℹ️-[TSLocationManager clearLastOdometerLocation] 2020-07-06 11:53:37.208 🎾-[TSGeofenceManager start] 2020-07-06 11:53:37.209 🔵-[TSLocationManager setPace:] 0 2020-07-06 11:53:37.210 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON 2020-07-06 11:53:37.211 ╔═══════════════════════════════════════════════════════════ ║ -[TSHttpService flush:] ╚═══════════════════════════════════════════════════════════ 2020-07-06 11:53:37.211 ╔═══════════════════════════════════════════════════════════ ║ -[TSHttpService finish:error:] Success: 0 ╚═══════════════════════════════════════════════════════════ 2020-07-06 11:53:37.212 ℹ️+[LocationAuthorization run:onCancel:] status: 3 2020-07-06 11:53:37.213 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON 2020-07-06 11:53:37.241 ℹ️-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch 2020-07-06 11:53:37.242 📍<+[redacted],+[redacted]> +/- 1097.66m (speed -1.00 mps / course -1.00) @ 28/06/2020, 15:05:21 Central European Summer Time 2020-07-06 11:53:37.242 ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 679696.0s ╚═══════════════════════════════════════════════════════════ 2020-07-06 11:53:37.242 ℹ️-[TSLocationManager locationManager:didUpdateLocations:] Received stale motionchange location. Retrying... 2020-07-06 11:53:37.242 📍<+[redacted],+[redacted]> +/- 65.00m (speed -1.00 mps / course -1.00) @ 06/07/2020, 11:53:36 Central European Summer Time 2020-07-06 11:53:37.242 ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 0.3s ╚═══════════════════════════════════════════════ ║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 0.3s ╚════════════════════════════════\342═══════════════════════════ 2020-07-06 11:53:37.242 ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+[redacted],+[redacted]> +/- 65.00m (speed -1.00 mps / course -1.00) @ 06/07/2020, 11:53:36 Central European Summer Time 2020-07-06 11:53:37.242 🔵-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 1000 2020-07-06 11:53:37.242 🔴-[TSLocationManager stopUpdatingLocation] 2020-07-06 11:53:37.244 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0 2020-07-06 11:53:37.244 📍<+[redacted],+[redacted]> +/- 122.64m (speed -1.00 mps / course -1.00) @ 06/07/2020, 11:53:37 Central European Summer Time 2020-07-06 11:53:37.244 ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: 10.0m | age: 0.1s ╚═══════════════════════════════════════════════════════════ 2020-07-06 11:53:37.244 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 93.8 2020-07-06 11:53:37.245 📍<+[redacted],+[redacted]> +/- 122.65m (speed -1.00 mps / course -1.00) @ 06/07/2020, 11:53:37 Central European Summer Time 2020-07-06 11:53:37.245 ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: 10.0m | age: 0.0s ╚═══════════════════════════════════════════════════════════ 2020-07-06 11:53:37.245 ℹ️-[TSLocationManager locationManager:didUpdateLocations:]