transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
655 stars 277 forks source link

Plugin in iOS suddenly stops working #548

Closed danielolivaresd closed 5 years ago

danielolivaresd commented 6 years ago

When running in iOS, after some time (it can take hours or some days after the app was started and then put in the background) the app stops geolocating. We could see this because while other (non iOS devices) continue to POST to our endpoint, the iOS device running the same version of our app (i.e. same config) stops updating its location. This has happened multiple times during the last weeks.

Your Environment

Expected Behavior

I expect the app to keep tracking the device indefinitely either when in foreground or background, since the app never calls the plugin to stop doing so.

Actual Behavior

The app stops INSERTing locations (and therefore POSTing them to our endpoint) unexpectedly after some short time (hours - days). Note: We have detected that after this "interruption" happens, when we try to open the app, it hangs on the splash screen and we have to close it and reopen it to make it work again. At this point, the plugin starts working as expected.

Steps to Reproduce

Nothing is needed to reproduce the bug. It happens "by itself".

Context

Track the device constantly without it being interrupted in iOS devices

Debug logs

[Log] 2017-11-25 14:58:22.347 πŸ”΅-[Settings init] Settings loaded (cordova.js, line 1731)

2017-11-25 14:58:22.348 πŸ”΅-[Settings setOdometer:] 57173

2017-11-25 14:58:22.364 βœ…-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS

2017-11-25 14:58:22.376 ⚠️-[Settings load:] Unknown @config: notificationTitle

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: fastestLocationUpdateInterval

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: notificationPriority

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: notificationColor

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: foregroundService

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: forceReloadOnLocationChange

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: forceReloadOnBoot

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: forceReloadOnHeartbeat

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: forceReloadOnSchedule

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: notificationText

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: forceReloadOnGeofence

2017-11-25 14:58:22.377 ⚠️-[Settings load:] Unknown @config: forceReloadOnMotionChange

2017-11-25 14:58:22.378 ⚠️-[Settings load:] Unknown @config: deferTime

2017-11-25 14:58:22.395 🎾-[SOMotionDetector startDetection] 

2017-11-25 14:58:22.396 ℹ️-[LocationDAO purge:] 1

2017-11-25 14:58:22.427 ℹ️-[LocationDAO purge:]_block_invoke Found 4 stale records older than 1 days

2017-11-25 14:58:22.434 πŸ”΅-[TSLocationManager setPace:] 0

2017-11-25 14:58:22.479 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2017-11-25 14:58:22.491 βœ…-[SOMotionDetector startDetection]_block_invoke Enabled M7 MotionActivity updates

2017-11-25 14:58:22.492 ℹ️+[LocationAuthorization run:] status: 3

2017-11-25 14:58:22.492 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON

2017-11-25 14:58:22.492 πŸ”΅-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3

2017-11-25 14:58:22.502 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2017-11-25 14:58:22.502 πŸ”΅-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-25 14:58:22.502 πŸ”΅-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-25 14:58:22.502 πŸ”΅-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-25 14:58:22.502 πŸ”΅-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-25 14:58:22.503 ⚠️-[TSLocationManager start] Already started (ignored)

2017-11-25 14:58:22.517 ℹ️+[LocationAuthorization run:] status: 3

2017-11-25 14:58:22.519 βœ…-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+22.12884365,-101.04025726> +/- 65.00m (speed -1.00 mps / course -1.00) @ 25/11/17 14:58:18 hora estΓ‘ndar central

2017-11-25 14:58:22.519 πŸ”΅-[Settings incrementOdometer:] 60046.6

2017-11-25 14:58:22.519 πŸ”΅-[TSLocationManager startMonitoringStationaryRegion:] Radius: 25

2017-11-25 14:58:22.520 πŸ”΄-[TSLocationManager stopUpdatingLocation] 

2017-11-25 14:58:22.520 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 14:58:22.520 🎾-[TSLocationManager startMonitoringSignificantLocationChanges] 

2017-11-25 14:58:22.547 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 54D569C1-3318-4ECB-9A69-107D9B522D8D

2017-11-25 14:58:51.080 πŸ”΅-[TSLocationManager onSuspend:] enabled? 1)

2017-11-25 15:15:50.081 πŸ”΅-[Settings init] Settings loaded

2017-11-25 15:15:50.082 πŸ”΅-[Settings setOdometer:] 60046

2017-11-25 15:15:50.103 βœ…-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS

2017-11-25 15:15:50.171 ⚠️-[Settings load:] Unknown @config: notificationTitle

2017-11-25 15:15:50.172 ⚠️-[Settings load:] Unknown @config: fastestLocationUpdateInterval

2017-11-25 15:15:50.172 ⚠️-[Settings load:] Unknown @config: notificationPriority

2017-11-25 15:15:50.172 ⚠️-[Settings load:] Unknown @config: notificationColor

2017-11-25 15:15:50.172 ⚠️-[Settings load:] Unknown @config: foregroundService

2017-11-25 15:15:50.177 ⚠️-[Settings load:] Unknown @config: forceReloadOnLocationChange

2017-11-25 15:15:50.185 ⚠️-[Settings load:] Unknown @config: forceReloadOnBoot

2017-11-25 15:15:50.185 ⚠️-[Settings load:] Unknown @config: forceReloadOnHeartbeat

2017-11-25 15:15:50.185 ⚠️-[Settings load:] Unknown @config: forceReloadOnSchedule

2017-11-25 15:15:50.185 ⚠️-[Settings load:] Unknown @config: notificationText

2017-11-25 15:15:50.209 ⚠️-[Settings load:] Unknown @config: forceReloadOnGeofence

2017-11-25 15:15:50.209 ⚠️-[Settings load:] Unknown @config: forceReloadOnMotionChange

2017-11-25 15:15:50.210 ⚠️-[Settings load:] Unknown @config: deferTime

2017-11-25 15:15:50.217 🎾-[SOMotionDetector startDetection] 

2017-11-25 15:15:50.219 ℹ️-[LocationDAO purge:] 1

2017-11-25 15:15:50.220 πŸ”΅-[TSLocationManager configure:] Booted in background

2017-11-25 15:15:50.228 πŸ”΅-[TSLocationManager setPace:] 0

2017-11-25 15:15:50.238 βœ…-[SOMotionDetector startDetection]_block_invoke Enabled M7 MotionActivity updates

2017-11-25 15:15:50.244 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2017-11-25 15:15:50.246 πŸ”΅-[TSLocationManager setPace:] 1

2017-11-25 15:15:50.266 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2017-11-25 15:15:50.277 ℹ️+[LocationAuthorization run:] status: 3

2017-11-25 15:15:50.277 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON

2017-11-25 15:15:50.278 ℹ️+[LocationAuthorization run:] status: 3

2017-11-25 15:15:50.279 πŸ”΅-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3

2017-11-25 15:15:50.279 πŸ”΅-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-25 15:15:50.279 πŸ”΅-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-25 15:15:50.279 πŸ”΅-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-25 15:15:50.280 πŸ”΅-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-25 15:15:50.281 βœ…-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+22.12824559,-101.03718771> +/- 65.00m (speed -1.00 mps / course -1.00) @ 25/11/17 15:15:46 hora estΓ‘ndar central

2017-11-25 15:15:50.282 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2017-11-25 15:15:50.283 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 15:15:50.284 πŸ”΅-[Settings incrementOdometer:] 60370.2

2017-11-25 15:15:50.287 🎾-[TSLocationManager startMonitoringSignificantLocationChanges] 

2017-11-25 15:15:50.288 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 15:15:50.289 πŸ”΅-[Settings incrementOdometer:] 60370.2

2017-11-25 15:15:50.290 ℹ️+[LocationAuthorization run:] status: 3

2017-11-25 15:15:50.291 ℹ️+[LocationAuthorization run:] status: 3

2017-11-25 15:15:50.291 ⚠️-[TSLocationManager start] Already started (ignored)

2017-11-25 15:15:50.294 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 81D233EA-31AF-49C6-95E2-5FF5F916A79A

2017-11-25 15:15:50.305 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 0A461D7E-4065-4887-8B8F-C8C1AC368E71

2017-11-25 15:15:55.087 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 15:15:55.088 πŸ”΅-[Settings incrementOdometer:] 60466.4

2017-11-25 15:15:55.109 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 231864C2-55B6-430A-9DF1-D3D0EC855509

2017-11-25 15:15:55.996 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 56.5

2017-11-25 15:15:55.996 πŸ”΅-[Settings incrementOdometer:] 60479.2

2017-11-25 15:15:56.011 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 707A6DF9-99F9-4983-BC28-1B0A983692A0

2017-11-25 15:17:23.334 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 15:17:23.335 πŸ”΅-[Settings incrementOdometer:] 61222.9

2017-11-25 15:17:23.358 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 952F93A0-ADF0-47BC-A84D-9F6AD498F4C6

2017-11-25 15:17:23.694 πŸ”΅-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds...

2017-11-25 15:17:26.132 πŸ”΅-[TSLocationManager locationManager:didUpdateLocations:] Updated distanceFilter, new: 40.000000, old: 10.000000

2017-11-25 15:17:26.133 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 56.5

2017-11-25 15:17:26.135 πŸ”΅-[Settings incrementOdometer:] 61244.0

2017-11-25 15:17:26.165 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 825E1C02-F7C9-4269-A73E-080A9E3A0124

2017-11-25 15:17:29.184 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 48.0

2017-11-25 15:17:29.185 πŸ”΅-[Settings incrementOdometer:] 61302.6

2017-11-25 15:17:29.186 ℹ️-[TSLocationManager resetMotionTriggerTimer] 

2017-11-25 15:17:29.207 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 25A2C4C1-7B61-4B9B-BD9A-5065F559205A

2017-11-25 15:17:31.793 πŸ”΅-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds...

2017-11-25 15:17:32.131 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 36.0

2017-11-25 15:17:32.131 πŸ”΅-[Settings incrementOdometer:] 61356.5

2017-11-25 15:17:32.152 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: B959E937-26B8-4139-B983-3E463FDF1B3D

2017-11-25 15:23:01.562 πŸ”΅-[TSLocationManager locationManager:didUpdateLocations:] Updated distanceFilter, new: 10.000000, old: 40.000000

2017-11-25 15:23:01.563 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 48.0

2017-11-25 15:23:01.563 πŸ”΅-[Settings incrementOdometer:] 62623.8

2017-11-25 15:23:01.583 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: AD84B762-23FE-4A05-A519-8E6B1ACF8D8F

2017-11-25 15:23:01.584 βœ…-[BackgroundTaskManager createBackgroundTask] 2

2017-11-25 15:23:01.596 πŸ”΅-[LocationDAO allWithLocking:]_block_invoke LOCKED 10 RECORDS

2017-11-25 15:23:01.596 πŸ”΅-[TSHttpService postBatch:error:] 10 records

2017-11-25 15:23:04.570 πŸ”΅-[TSHttpService doPost:] HTTP Response: 200

2017-11-25 15:23:04.571 βœ…-[LocationDAO destroyAll:] DESTROY: 54D569C1-3318-4ECB-9A69-107D9B522D8D

2017-11-25 15:23:04.571 βœ…-[LocationDAO destroyAll:] DESTROY: 81D233EA-31AF-49C6-95E2-5FF5F916A79A

2017-11-25 15:23:04.571 βœ…-[LocationDAO destroyAll:] DESTROY: 0A461D7E-4065-4887-8B8F-C8C1AC368E71

2017-11-25 15:23:04.572 βœ…-[LocationDAO destroyAll:] DESTROY: 231864C2-55B6-430A-9DF1-D3D0EC855509

2017-11-25 15:23:04.572 βœ…-[LocationDAO destroyAll:] DESTROY: 707A6DF9-99F9-4983-BC28-1B0A983692A0

2017-11-25 15:23:04.572 βœ…-[LocationDAO destroyAll:] DESTROY: 952F93A0-ADF0-47BC-A84D-9F6AD498F4C6

2017-11-25 15:23:04.572 βœ…-[LocationDAO destroyAll:] DESTROY: 825E1C02-F7C9-4269-A73E-080A9E3A0124

2017-11-25 15:23:04.572 βœ…-[LocationDAO destroyAll:] DESTROY: 25A2C4C1-7B61-4B9B-BD9A-5065F559205A

2017-11-25 15:23:04.572 βœ…-[LocationDAO destroyAll:] DESTROY: B959E937-26B8-4139-B983-3E463FDF1B3D

2017-11-25 15:23:04.573 βœ…-[LocationDAO destroyAll:] DESTROY: AD84B762-23FE-4A05-A519-8E6B1ACF8D8F

2017-11-25 15:23:04.601 βœ…-[LocationDAO destroyAll:]_block_invoke DESTROY SUCCESS (10)

2017-11-25 15:23:04.603 πŸ”΅-[LocationDAO allWithLocking:]_block_invoke LOCKED 0 RECORDS

2017-11-25 15:23:04.604 βœ…-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 2 OF (
    2
)

2017-11-25 15:23:06.425 πŸ”΅-[TSLocationManager locationManager:didUpdateLocations:] Updated distanceFilter, new: 50.000000, old: 10.000000

2017-11-25 15:23:06.426 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 40.0

2017-11-25 15:23:06.428 πŸ”΅-[Settings incrementOdometer:] 62753.9

2017-11-25 15:23:06.460 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 014B73BE-B43A-4F98-B7B2-1BD78B26E896

2017-11-25 15:23:07.028 πŸ”΅-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds...

2017-11-25 15:23:09.278 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 32.0

2017-11-25 15:23:09.280 πŸ”΅-[Settings incrementOdometer:] 62822.3

2017-11-25 15:23:09.300 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 3AF864AE-E6AF-4DFC-A83D-01BD11540B39

2017-11-25 15:29:26.878 πŸ”΅-[TSHttpService init]_block_invoke Network: WiFi | Flags: -R -------

2017-11-25 15:29:27.147 πŸ”΅-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds...

2017-11-25 15:29:27.340 πŸ”΅-[TSLocationManager locationManager:didUpdateLocations:] Updated distanceFilter, new: 10.000000, old: 50.000000

2017-11-25 15:29:27.342 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 32.0

2017-11-25 15:29:27.346 πŸ”΅-[Settings incrementOdometer:] 63308.3

2017-11-25 15:29:27.749 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 2D71AC89-FF48-4005-836F-73FEC3115109

2017-11-25 15:29:27.760 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 32.0

2017-11-25 15:29:27.847 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 2505DA18-3CAC-419E-8D3F-F7BDD19D0435

2017-11-25 18:29:43.509 πŸ”΅-[TSHttpService init]_block_invoke Network: Cellular | Flags: WR -t-----

2017-11-25 18:29:43.548 πŸ”΅-[TSLocationManager beginStopDetection] ⏲Stop-timeout engaged: 300 s...

2017-11-25 18:29:43.567 βœ…-[BackgroundTaskManager createBackgroundTask] 3

2017-11-25 18:29:43.569 πŸ”΄-[TSLocationManager stopUpdatingLocation] 

2017-11-25 18:29:43.867 ℹ️-[TSLocationManager resetStopTimeoutTimer] 

2017-11-25 18:29:43.869 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2017-11-25 18:29:43.949 ℹ️+[LocationAuthorization run:] status: 3

2017-11-25 18:29:43.950 βœ…-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 3 OF (
    3
)

2017-11-25 18:29:44.640 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 32.0

2017-11-25 18:29:45.031 πŸ”΅-[Settings incrementOdometer:] 63961.6

2017-11-25 18:29:45.050 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:29:45.051 πŸ”΅-[Settings incrementOdometer:] 63961.6

2017-11-25 18:29:45.054 πŸ”΅-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds...

2017-11-25 18:29:45.055 ℹ️-[TSLocationManager locationManager:didUpdateLocations:] <IGNORED> Ξ”t since last: 0.0s

2017-11-25 18:29:45.073 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: D100C5DD-82E1-4757-8C30-ACEDB5876652

2017-11-25 18:29:45.118 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: F2B769BA-F333-49AF-85BA-CCD2954EC78E

2017-11-25 18:29:48.875 ℹ️-[TSLocationManager resetMotionTriggerTimer] 

2017-11-25 18:29:50.011 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 48.0

2017-11-25 18:29:50.013 πŸ”΅-[Settings incrementOdometer:] 63983.5

2017-11-25 18:29:50.055 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: AE90209C-3E3E-47EF-9232-90C05A124397

2017-11-25 18:29:51.892 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 48.0

2017-11-25 18:29:51.896 πŸ”΅-[Settings incrementOdometer:] 63994.3

2017-11-25 18:29:51.933 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: F3C322F6-9A2E-4065-8318-573E2203E6D4

2017-11-25 18:39:09.941 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:39:09.944 πŸ”΅-[Settings incrementOdometer:] 65030.6

2017-11-25 18:39:10.316 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:39:10.326 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 283AF404-BAEE-4950-A17E-3A9FE95AA048

2017-11-25 18:39:10.328 πŸ”΅-[Settings incrementOdometer:] 65030.6

2017-11-25 18:39:10.368 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: EC5D3736-CCA6-425D-92EE-81941D211A42

2017-11-25 18:39:10.373 βœ…-[BackgroundTaskManager createBackgroundTask] 4

2017-11-25 18:39:10.396 πŸ”΅-[LocationDAO allWithLocking:]_block_invoke LOCKED 10 RECORDS

2017-11-25 18:39:10.399 πŸ”΅-[TSHttpService postBatch:error:] 10 records

2017-11-25 18:39:13.174 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:39:13.177 πŸ”΅-[Settings incrementOdometer:] 65050.2

2017-11-25 18:39:13.182 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:39:13.184 πŸ”΅-[Settings incrementOdometer:] 65077.0

2017-11-25 18:39:14.036 πŸ”΅-[TSHttpService doPost:] HTTP Response: 200

2017-11-25 18:39:14.036 βœ…-[LocationDAO destroyAll:] DESTROY: 014B73BE-B43A-4F98-B7B2-1BD78B26E896

2017-11-25 18:39:14.037 βœ…-[LocationDAO destroyAll:] DESTROY: 3AF864AE-E6AF-4DFC-A83D-01BD11540B39

2017-11-25 18:39:14.037 βœ…-[LocationDAO destroyAll:] DESTROY: 2D71AC89-FF48-4005-836F-73FEC3115109

2017-11-25 18:39:14.037 βœ…-[LocationDAO destroyAll:] DESTROY: 2505DA18-3CAC-419E-8D3F-F7BDD19D0435

2017-11-25 18:39:14.037 βœ…-[LocationDAO destroyAll:] DESTROY: D100C5DD-82E1-4757-8C30-ACEDB5876652

2017-11-25 18:39:14.037 βœ…-[LocationDAO destroyAll:] DESTROY: F2B769BA-F333-49AF-85BA-CCD2954EC78E

2017-11-25 18:39:14.037 βœ…-[LocationDAO destroyAll:] DESTROY: AE90209C-3E3E-47EF-9232-90C05A124397

2017-11-25 18:39:14.037 βœ…-[LocationDAO destroyAll:] DESTROY: F3C322F6-9A2E-4065-8318-573E2203E6D4

2017-11-25 18:39:14.038 βœ…-[LocationDAO destroyAll:] DESTROY: 283AF404-BAEE-4950-A17E-3A9FE95AA048

2017-11-25 18:39:14.038 βœ…-[LocationDAO destroyAll:] DESTROY: EC5D3736-CCA6-425D-92EE-81941D211A42

2017-11-25 18:39:14.068 βœ…-[LocationDAO destroyAll:]_block_invoke DESTROY SUCCESS (10)

2017-11-25 18:39:14.072 πŸ”΅-[LocationDAO allWithLocking:]_block_invoke LOCKED 0 RECORDS

2017-11-25 18:39:14.077 βœ…-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 4 OF (
    4
)

2017-11-25 18:39:14.101 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 439775C4-6DF9-479C-89BB-C13BDB87C70F

2017-11-25 18:39:14.120 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 81D9555B-35D2-4AF6-ADC5-09568BA2DB8B

2017-11-25 18:39:15.808 πŸ”΅-[TSLocationManager locationManager:didUpdateLocations:] Updated distanceFilter, new: 40.000000, old: 10.000000

2017-11-25 18:39:15.815 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:39:15.816 πŸ”΅-[Settings incrementOdometer:] 65157.7

2017-11-25 18:39:15.849 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: F399DFA4-B621-4F53-9624-59CC3F774CFF

2017-11-25 18:39:16.565 πŸ”΅-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds...

2017-11-25 18:39:17.815 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:39:17.818 πŸ”΅-[Settings incrementOdometer:] 65199.0

2017-11-25 18:39:17.844 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: ED04B1BB-264E-42D3-A8F1-575FE23BF837

2017-11-25 18:49:07.599 πŸ”΅-[TSLocationManager locationManager:didUpdateLocations:] Updated distanceFilter, new: 10.000000, old: 40.000000

2017-11-25 18:49:07.599 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:49:07.601 πŸ”΅-[Settings incrementOdometer:] 66417.9

2017-11-25 18:49:07.611 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 9422AD39-E037-4712-BFBE-F824E3777F51

2017-11-25 18:49:07.660 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:49:07.661 ℹ️-[TSLocationManager locationManager:didUpdateLocations:] <IGNORED> Ξ”t since last: 0.0s

2017-11-25 18:49:07.669 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: F0DB2673-7F56-4057-B4F3-475FD3A5E913

2017-11-25 18:49:10.473 πŸ”΅-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds...

2017-11-25 18:49:12.436 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:49:12.438 πŸ”΅-[Settings incrementOdometer:] 67526.9

2017-11-25 18:49:12.481 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 92417619-016B-471F-BE75-998F35D59917

2017-11-25 18:49:13.313 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 18:49:13.318 πŸ”΅-[Settings incrementOdometer:] 67528.5

2017-11-25 18:49:13.349 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: A5254DBA-E9CA-44F6-91DA-9055D3B94344

2017-11-25 18:49:13.840 ℹ️-[TSLocationManager resetMotionTriggerTimer] 

2017-11-25 18:49:16.587 πŸ”΅-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds...

2017-11-25 21:08:25.490 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 21:08:25.498 πŸ”΅-[Settings incrementOdometer:] 68651.4

2017-11-25 21:08:25.509 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 21:08:25.557 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: C91B11F0-B5E7-49F8-82C3-F49235C2CA54

2017-11-25 21:08:25.579 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 7EBEFFBB-2E4C-4415-8B86-90E245CB2523

2017-11-25 21:08:25.583 βœ…-[BackgroundTaskManager createBackgroundTask] 5

2017-11-25 21:08:25.607 πŸ”΅-[LocationDAO allWithLocking:]_block_invoke LOCKED 10 RECORDS

2017-11-25 21:08:25.608 πŸ”΅-[TSHttpService postBatch:error:] 10 records

2017-11-25 21:08:29.131 πŸ”΅-[TSHttpService doPost:] HTTP Response: 200

2017-11-25 21:08:29.131 βœ…-[LocationDAO destroyAll:] DESTROY: 439775C4-6DF9-479C-89BB-C13BDB87C70F

2017-11-25 21:08:29.132 βœ…-[LocationDAO destroyAll:] DESTROY: 81D9555B-35D2-4AF6-ADC5-09568BA2DB8B

2017-11-25 21:08:29.132 βœ…-[LocationDAO destroyAll:] DESTROY: F399DFA4-B621-4F53-9624-59CC3F774CFF

2017-11-25 21:08:29.132 βœ…-[LocationDAO destroyAll:] DESTROY: ED04B1BB-264E-42D3-A8F1-575FE23BF837

2017-11-25 21:08:29.132 βœ…-[LocationDAO destroyAll:] DESTROY: 9422AD39-E037-4712-BFBE-F824E3777F51

2017-11-25 21:08:29.132 βœ…-[LocationDAO destroyAll:] DESTROY: F0DB2673-7F56-4057-B4F3-475FD3A5E913

2017-11-25 21:08:29.132 βœ…-[LocationDAO destroyAll:] DESTROY: 92417619-016B-471F-BE75-998F35D59917

2017-11-25 21:08:29.133 βœ…-[LocationDAO destroyAll:] DESTROY: A5254DBA-E9CA-44F6-91DA-9055D3B94344

2017-11-25 21:08:29.133 βœ…-[LocationDAO destroyAll:] DESTROY: C91B11F0-B5E7-49F8-82C3-F49235C2CA54

2017-11-25 21:08:29.133 βœ…-[LocationDAO destroyAll:] DESTROY: 7EBEFFBB-2E4C-4415-8B86-90E245CB2523

2017-11-25 21:08:29.168 βœ…-[LocationDAO destroyAll:]_block_invoke DESTROY SUCCESS (10)

2017-11-25 21:08:29.170 πŸ”΅-[LocationDAO allWithLocking:]_block_invoke LOCKED 0 RECORDS

2017-11-25 21:08:29.171 βœ…-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 5 OF (
    5
)

2017-11-25 21:08:32.957 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 21:08:32.983 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 18176712-8489-4BAC-BE2F-53A9F4917C61

2017-11-25 21:08:33.390 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 21:08:33.394 πŸ”΅-[Settings incrementOdometer:] 68817.2

2017-11-25 21:08:33.421 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: DC72EB81-BCB7-40DA-8FC8-A1B6973CE041

2017-11-25 21:14:35.700 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 21:14:35.701 πŸ”΅-[Settings incrementOdometer:] 70621.3

2017-11-25 21:14:35.703 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 21:14:35.711 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: FCAA5FCE-1944-4133-A215-4BE9306F2515

2017-11-25 21:14:35.722 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 3EB7369F-031C-46DE-9A73-07F16A73210F

2017-11-25 21:14:44.443 πŸ”΅-[TSLocationManager locationManager:didUpdateLocations:] Updated distanceFilter, new: 20.000000, old: 10.000000

2017-11-25 21:14:44.452 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 21:14:44.463 πŸ”΅-[Settings incrementOdometer:] 71185.1

2017-11-25 21:14:44.487 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 9F434D9E-0399-467A-8378-EF3D4A8C33F4

2017-11-25 21:20:07.546 πŸ”΅-[TSLocationManager locationManager:didUpdateLocations:] Updated distanceFilter, new: 10.000000, old: 20.000000

2017-11-25 21:20:07.549 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 21:20:07.556 πŸ”΅-[Settings incrementOdometer:] 71494.4

2017-11-25 21:20:07.578 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: BDA3F889-15BD-4D1A-B511-0E3275466C17

2017-11-25 21:20:13.234 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 21:20:13.235 πŸ”΅-[Settings incrementOdometer:] 71517.2

2017-11-25 21:20:13.258 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 61C0C35B-65B3-4EE1-A05B-EE2004C1780B

2017-11-25 21:20:16.328 πŸ”΅-[TSLocationManager locationManager:didUpdateLocations:] Updated distanceFilter, new: 20.000000, old: 10.000000

2017-11-25 21:20:16.343 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 21:20:16.347 πŸ”΅-[Settings incrementOdometer:] 71517.9

2017-11-25 21:20:16.378 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 2C86591E-D372-40AF-9585-6E333F60BA4E

2017-11-25 23:45:43.568 πŸ”΅-[TSLocationManager startMotionTriggerTimer] Motion-trigger timer engaged: Stop-detection will trigger in 10 seconds...

2017-11-25 23:45:43.569 πŸ”΅-[TSLocationManager locationManager:didUpdateLocations:] Updated distanceFilter, new: 10.000000, old: 20.000000

2017-11-25 23:45:43.578 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 23:45:43.873 πŸ”΅-[Settings incrementOdometer:] 72119.3

2017-11-25 23:45:43.970 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 23:45:43.978 πŸ”΅-[Settings incrementOdometer:] 72119.3

2017-11-25 23:45:43.997 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 46697D81-68C3-4859-9876-63C12DFAF9EF

2017-11-25 23:45:44.112 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: BCC4506A-71ED-4DE6-9628-E4FAD2B71861

2017-11-25 23:45:44.163 βœ…-[BackgroundTaskManager createBackgroundTask] 6

2017-11-25 23:45:44.198 πŸ”΅-[LocationDAO allWithLocking:]_block_invoke LOCKED 10 RECORDS

2017-11-25 23:45:44.199 πŸ”΅-[TSHttpService postBatch:error:] 10 records

2017-11-25 23:45:45.334 πŸ”΅-[TSHttpService doPost:] HTTP Response: 200

2017-11-25 23:45:45.335 βœ…-[LocationDAO destroyAll:] DESTROY: 18176712-8489-4BAC-BE2F-53A9F4917C61

2017-11-25 23:45:45.335 βœ…-[LocationDAO destroyAll:] DESTROY: DC72EB81-BCB7-40DA-8FC8-A1B6973CE041

2017-11-25 23:45:45.335 βœ…-[LocationDAO destroyAll:] DESTROY: FCAA5FCE-1944-4133-A215-4BE9306F2515

2017-11-25 23:45:45.335 βœ…-[LocationDAO destroyAll:] DESTROY: 3EB7369F-031C-46DE-9A73-07F16A73210F

2017-11-25 23:45:45.336 βœ…-[LocationDAO destroyAll:] DESTROY: 9F434D9E-0399-467A-8378-EF3D4A8C33F4

2017-11-25 23:45:45.336 βœ…-[LocationDAO destroyAll:] DESTROY: BDA3F889-15BD-4D1A-B511-0E3275466C17

2017-11-25 23:45:45.336 βœ…-[LocationDAO destroyAll:] DESTROY: 61C0C35B-65B3-4EE1-A05B-EE2004C1780B

2017-11-25 23:45:45.337 βœ…-[LocationDAO destroyAll:] DESTROY: 2C86591E-D372-40AF-9585-6E333F60BA4E

2017-11-25 23:45:45.337 βœ…-[LocationDAO destroyAll:] DESTROY: 46697D81-68C3-4859-9876-63C12DFAF9EF

2017-11-25 23:45:45.337 βœ…-[LocationDAO destroyAll:] DESTROY: BCC4506A-71ED-4DE6-9628-E4FAD2B71861

2017-11-25 23:45:45.703 βœ…-[LocationDAO destroyAll:]_block_invoke DESTROY SUCCESS (10)

2017-11-25 23:45:45.707 πŸ”΅-[LocationDAO allWithLocking:]_block_invoke LOCKED 0 RECORDS

2017-11-25 23:45:45.709 βœ…-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 6 OF (
    6
)

2017-11-25 23:45:48.236 ℹ️-[TSLocationManager resetMotionTriggerTimer] 

2017-11-25 23:45:50.765 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-25 23:45:50.771 πŸ”΅-[Settings incrementOdometer:] 72242.0

2017-11-25 23:45:50.813 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: DB7CD12D-D442-48A4-9653-2D01179C6410

2017-11-27 09:44:37.906 πŸ”΅-[Settings init] Settings loaded

2017-11-27 09:44:37.907 πŸ”΅-[Settings setOdometer:] 73038

2017-11-27 09:44:37.922 βœ…-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS

2017-11-27 09:44:37.932 ⚠️-[Settings load:] Unknown @config: notificationTitle

2017-11-27 09:44:37.932 ⚠️-[Settings load:] Unknown @config: fastestLocationUpdateInterval

2017-11-27 09:44:37.932 ⚠️-[Settings load:] Unknown @config: notificationPriority

2017-11-27 09:44:37.932 ⚠️-[Settings load:] Unknown @config: notificationColor

2017-11-27 09:44:37.932 ⚠️-[Settings load:] Unknown @config: foregroundService

2017-11-27 09:44:37.932 ⚠️-[Settings load:] Unknown @config: forceReloadOnLocationChange

2017-11-27 09:44:37.933 ⚠️-[Settings load:] Unknown @config: forceReloadOnBoot

2017-11-27 09:44:37.933 ⚠️-[Settings load:] Unknown @config: forceReloadOnHeartbeat

2017-11-27 09:44:37.933 ⚠️-[Settings load:] Unknown @config: forceReloadOnSchedule

2017-11-27 09:44:37.933 ⚠️-[Settings load:] Unknown @config: notificationText

2017-11-27 09:44:37.933 ⚠️-[Settings load:] Unknown @config: forceReloadOnGeofence

2017-11-27 09:44:37.933 ⚠️-[Settings load:] Unknown @config: forceReloadOnMotionChange

2017-11-27 09:44:37.933 ⚠️-[Settings load:] Unknown @config: deferTime

2017-11-27 09:44:37.949 🎾-[SOMotionDetector startDetection] 

2017-11-27 09:44:37.950 ℹ️-[LocationDAO purge:] 1

2017-11-27 09:44:37.964 ℹ️-[LocationDAO purge:]_block_invoke Found 2 stale records older than 1 days

2017-11-27 09:44:37.965 πŸ”΅-[TSLocationManager setPace:] 0

2017-11-27 09:44:38.006 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2017-11-27 09:44:38.016 βœ…-[SOMotionDetector startDetection]_block_invoke Enabled M7 MotionActivity updates

2017-11-27 09:44:38.017 ℹ️+[LocationAuthorization run:] status: 3

2017-11-27 09:44:38.017 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON

2017-11-27 09:44:38.017 πŸ”΅-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3

2017-11-27 09:44:38.019 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON

2017-11-27 09:44:38.020 πŸ”΅-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-27 09:44:38.021 πŸ”΅-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-27 09:44:38.021 πŸ”΅-[LocationManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-27 09:44:38.021 πŸ”΅-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3

2017-11-27 09:44:38.034 ℹ️-[TSLocationManager locationManager:didUpdateLocations:] Received stale motionchange location.  Retrying...

2017-11-27 09:44:38.039 ℹ️+[LocationAuthorization run:] status: 3

2017-11-27 09:44:38.039 ℹ️-[TSLocationManager locationManager:didUpdateLocations:] Received stale motionchange location.  Retrying...

2017-11-27 09:44:38.057 ⚠️-[TSLocationManager start] Already started (ignored)

2017-11-27 09:44:38.067 βœ…-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <+22.12892251,-101.04023620> +/- 65.00m (speed -1.00 mps / course -1.00) @ 27/11/17 09:44:38 hora estΓ‘ndar central

2017-11-27 09:44:38.067 πŸ”΅-[Settings incrementOdometer:] 75884.4

2017-11-27 09:44:38.067 πŸ”΅-[TSLocationManager startMonitoringStationaryRegion:] Radius: 25

2017-11-27 09:44:38.068 πŸ”΄-[TSLocationManager stopUpdatingLocation] 

2017-11-27 09:44:38.069 πŸ”΅-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0

2017-11-27 09:44:38.069 🎾-[TSLocationManager startMonitoringSignificantLocationChanges] 

2017-11-27 09:44:38.082 βœ…-[TSLocationManager persistLocation:]_block_invoke INSERT: 2FD8620B-6AA0-41A1-BE38-4F6A1FF3620D

Note how after 2017-11-25 23:45:50.813, the plugin doesn't have any logs until today, after we opened, closed, and reopened the app (see "Actual Behavior")

EDIT: I forgot to mention, that I also add an HTTP header as follows. PLUGIN_CONFIGURATION is a constant with the contents that I mention above.

this.bgGeo = (<any>window).BackgroundGeolocation;
if (this.bgGeo) {
  const config = PLUGIN_CONFIGURATION
  config.headers = {
    "Authorization": `Bearer ${this.auth.getToken()}`
  }
  this.bgGeo.configure(config, (state) => {
    this.bgGeo.start();
  })
}
christocracy commented 6 years ago

Are you seeing your app boot and hanging at splash-screen periodically?

I'm experiencing this myself on iOS 11.1.2 / iPhone X. If this occurs, you will miss tracking for periods. These splash-screen hangs don't seem to occur on my iPhone 6s.

I'm erasing my iPhone 6s to do some further testing alongside the iPhone X to verify.

I'm thinking this is a Cordova issue related to apps booting in the background.

I'm also seeing a large number of app crashes (not related to the plugin):

Incident Identifier: A0F3F136-EE10-4360-A511-B65D535C65CC
CrashReporter Key:   5e43e12affadca8ecf3e8be2546fcf1c7b5b7ba7
Hardware Model:      iPhone10,6
Process:             BG Geo [14992]
Path:                /private/var/containers/Bundle/Application/5D7AC67D-02BA-4488-A6B8-908F30908B09/BG Geo.app/BG Geo
Identifier:          com.transistorsoft.backgroundgeolocation.ionic2
Version:             2.9.1 (2.9.1)
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.transistorsoft.backgroundgeolocation.ionic2 [6029]

Date/Time:           2017-11-27 11:27:50.6976 -0500
Launch Time:         2017-11-27 11:24:44.2623 -0500
OS Version:          iPhone OS 11.1.2 (15B202)
Baseband Version:    1.02.03
Report Version:      104

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Termination Reason: Namespace <0xF>, Code 0x8badf00d
Triggered by Thread:  0

Filtered syslog:
None found

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x0000000182ee4bc4 mach_msg_trap + 8
1   libsystem_kernel.dylib          0x0000000182ee4a3c mach_msg + 72
2   CoreFoundation                  0x0000000183395c74 __CFRunLoopServiceMachPort + 196
3   CoreFoundation                  0x0000000183393840 __CFRunLoopRun + 1424
4   CoreFoundation                  0x00000001832b3fb8 CFRunLoopRunSpecific + 436
5   GraphicsServices                0x000000018514bf84 GSEventRunModal + 100
6   UIKit                           0x000000018c8882e8 UIApplicationMain + 208
7   BG Geo                          0x000000010297a3cc main + 25548 (main.m:32)
8   libdyld.dylib                   0x0000000182dd656c start + 4
danielolivaresd commented 6 years ago

Are you seeing your app boot and hanging at splash-screen periodically?

I only notice this after a day or two, but I'm not constantly checking. The reason being, the main use for the app is to run in background, so when I do re-open the app is after I check my backend and see I'm not receiving updates anymore. I'll try to keep checking to see if the hanging occurs in the next hours, and compare this to the plugin's updates.

I'm experiencing this myself on iOS 11.1.2 / iPhone X. If this occurs, you will miss tracking for periods. These splash-screen hangs don't seem to occur on my iPhone 6s. I'm erasing my iPhone 6s to do some further testing alongside the iPhone X to verify.

I have an iPhone 4S lying around, so I will also install the app to this device and check how it goes.

I'm thinking this is a Cordova issue related to apps booting in the background. I'm also seeing a large number of app crashes (not related to the plugin):

Makes sense to me. Any ideas on how to make sure, or where to report this?

BTW: Thanks for your lightning-fast support!

danielolivaresd commented 6 years ago

Update: Just to give you more context.

By googling similar issues I found https://github.com/meteor/meteor/issues/8482#issuecomment-329103530 which mentions that when debugging the app when the splash screen hangs, the following error is returned: exception native EvalAnd Fetch : ReferenceError: Can't find variable: cordova and I remember I also found that error today, so this enforces your idea of it being a Cordova related issue.

christocracy commented 6 years ago

I've just received a report from another iPhone X user experiencing same issue as me #539

ukgrant commented 6 years ago

@christocracy, I am experiencing the exact same issue, but with cordova-plugin-ibeacon. I think you're right that it must be caused by iOS launching the app in the background. I am about to try putting this script in below my Cordova reference to see if that makes a difference, but it's difficult to test as it doesn't always happen.

<script src="cordova.js"></script>
<script>
    if (!window.cordova) {
      window.cordova = require('cordova');
    }
</script>
christocracy commented 6 years ago

Try removing cordova-plugin-splashscreen

ukgrant commented 6 years ago

Neither of these fixes worked

christocracy commented 6 years ago

More information here

I don't think splashscreen is the culprit here. There's definitely something weird happening with cordova-plugin-ionic-webview.

christocracy commented 6 years ago

I'm having good performance now simply removing cordova-plugin-ionic-webview. ionic-webview is far too buggy for use with apps which can boot in the background.

christocracy commented 6 years ago

cordova-plugin-splashscreen was a red herring. It's not involved at all.

imrvshah commented 6 years ago

Are you getting same with iPhoneX as well?

christocracy commented 6 years ago

I’m primarily developing on iPhone X. I’m not seeing whitescreen

gotjennie commented 6 years ago

I'm having the same problem described at the top on both iPhone SE and iPhone 6. We are not using cordova-plugin-ionic-webview. Any idea of other plugins that might be causing the same problem?

christocracy commented 6 years ago

I’m no longer having this issue. Show me your cordova plugins.

Try the sample app.

gotjennie commented 6 years ago

My cordova plugins are:

cordova:cordova-background-geolocation-lt cordova:cordova-custom-config
cordova:cordova-plugin-device
cordova:cordova-plugin-flashlight
cordova:cordova-plugin-meteor-webapp

christocracy commented 6 years ago

Most likely related to cordova-plugin-meteor-webapp doing some poor behaviour.

christocracy commented 6 years ago

I would check the issues at cordova-plugin-meteor to see if there's anything there matching your problem.

gregor-srdic commented 6 years ago

Is cordova-plugin-ionic-webview still causing problems? Because I also sometimes notice app being stuck at splashscreen and background location plugin seems to stop working sometimes when I close the app entirely - the debug message "App booted in background" does not appear and no locations are tracked.

christocracy commented 6 years ago

I don’t use it. I would assume it still causes problems with iOS apps booted in the background.

Louar commented 5 years ago

Any recent updates on this issue? This issue still persists using cordova-plugin-ionic-webview i.e. WKWebView.

Any suggestions on alternatives for the cordova-plugin-ionic-webview? Has anyone tried a 'downgrade' from WKWebView to the legacy UIWebView?

christocracy commented 5 years ago

I have not tried this since March. I do not trust webview plugins in apps that boot in the background. Simply remove your -webview plugin.

obkdev commented 5 years ago

Hi Chris,

When the plugin is in Debug mode, should I expect to see a notification when the app is rebooted in the background?

christocracy commented 5 years ago

Yes, it emits a β€œBooted in background” local-notification, in addition to all the usual notifications you’d see when launching from home-screen.

This is easy to observe in simulator by simulating location then terminating app.

obkdev commented 5 years ago

Okay that's great. Thanks Chris.

obkdev commented 5 years ago

When you say 'Terminating the app' do you mean clicking the home button on iPhone. Or do you mean swiping the app out of the selection of minimized apps?

christocracy commented 5 years ago