react-native-background-geolocation
react-native-background-geolocation copied to clipboard
service starting on app startup
Your Environment
- Plugin version: 3.9.3
- Platform: Both
- OS version:
- Device manufacturer / model: iPhone8, Samsung S10
- React Native version (
react-native -v
): 0.63.3 - Plugin config
BackgroundGeolocation.onLocation(onLocation, onError);
BackgroundGeolocation.onMotionChange(onMotionChange);
BackgroundGeolocation.onActivityChange(onActivityChange);
BackgroundGeolocation.onProviderChange(onProviderChange);
BackgroundGeolocation.ready({
// Geolocation Config
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
distanceFilter: 10,
// Activity Recognition
stopTimeout: 1,
// Application config
debug: false, // <-- enable this hear sounds for background-geolocation life-cycle.
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
stopOnTerminate: false, // <-- Allow the background-service to continue tracking when user closes the app.
startOnBoot: false, // <-- Auto start tracking when device is powered-up.
// HTTP / SQLite config
url: 'http://yourserver.com/locations',
batchSync: false, // <-- [Default: false] Set true to sync locations to server in a single HTTP request.
autoSync: true, // <-- [Default: true] Set true to sync each location to server as it arrives.
headers: { // <-- Optional HTTP headers
'X-FOO': 'bar'
},
params: { // <-- Optional HTTP params
'auth_token': 'maybe_your_server_authenticates_via_token_YES?'
}
}, (state) => {
console.log('- BackgroundGeolocation is configured and ready: ', state.enabled);
// if (!state.enabled) {
// BackgroundGeolocation.start(function () {
// console.log('- Start success');
// });
// }
});
Expected Behavior
Service should not automatically start on app init/startup
Actual Behavior
App does start, even if startOnBoot: false and I comment out the success Background
Steps to Reproduce
Context
Debug logs
Logs
PASTE_YOUR_LOGS_HERE
Yes, you will briefly see the foreground notification on startup, then immediately go off. The plugin launches a foreground-service to call stop
upon itself in order to ensure that all services are stopped.
I monitor it and it doesnt go off as it says in the docs
Show me logs from $ adb logcat *:S TSLocationManager:V
currently testing on ios, but i can clearly see the activity logs going in the debugger
I have uncommented the success callback code in my initial code block above
I'm not interested in Javascript logs. I'm only interested in native Android logs from the plugin.
See Wiki Debugging and learn to observe the Android logs.
And for iOS, I'm only interested in the native iOS logs.
But by javascript logs showing that activity is changing every few seconds, it means the plugin is tracking in the background / on. ?
Yes, and you'll never determine WHY unless you learn to observe the native logs.
hmm... it only seems to be logging/active on ios. how do I inspect ios device logs? I tried using Console.app and filtered by LocationManager, output below I tried using this but it doesnt show logs more like a summary report from todays date.
default 14:51:37.041254+0200 contextstored {"msg":"CLLocationManager", "event":"activity", "_cmd":"stopUpdatingLocation", "self":"0x104128d40"}
default 14:51:37.041508+0200 contextstored {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x104128d40", "property":"updatingLocation", "old":0, "new":0}
default 14:51:37.042211+0200 contextstored {"msg":"CLLocationManager", "event":"activity", "_cmd":"location", "self":"0x104128d40"}
default 14:51:38.295376+0200 duetexpertd {"msg":"CLLocationManager", "event":"activity", "_cmd":"location", "self":"0x10aa4e610"}
default 14:51:38.356101+0200 duetexpertd {"msg":"CLLocationManager", "event":"activity", "_cmd":"location", "self":"0x10aa4e610"}
default 14:51:38.359879+0200 duetexpertd {"msg":"CLLocationManager", "event":"activity", "_cmd":"location", "self":"0x10aa4e610"}
default 14:51:38.366713+0200 duetexpertd {"msg":"CLLocationManager", "event":"activity", "_cmd":"location", "self":"0x10aa4e610"}
default 14:52:05.465287+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"initWithEffectiveBundleIdentifier:bundle:delegate:silo:", "self":"0x283a20940", "identifier":"", "bundle":""}
default 14:52:05.465528+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a20940", "property":"init", "new":{"previousAuthorizationStatusValid":false,"paused":false,"requestingLocation":false,"updatingVehicleSpeed":false,"desiredAccuracy":-1,"allowsBackgroundLocationUpdates":false,"dynamicAccuracyReductionEnabled":false,"distanceFilter":-1,"allowsLocationPrompts":true,"activityType":0,"groundAltitudeEnabled":false,"pausesLocationUpdatesAutomatically":0,"fusionInfoEnabled":false,"isAuthorizedForWidgetUpdates":false,"updatingVehicleHeading":false,"batchingLocation":false,"showsBackgroundLocationIndicator":false,"updatingLocation":false,"requestingRanging":false,"updatingHeading":false,"previousAuthorizationStatus":0,"allowsMapCorrection":true,"matchInfoEnabled":false,"allowsAlteredAccessoryLocations":false,"updatingRanging":false,"limitsPrecision":false,"courtesyPromptNeeded":false,"headingFilter":1}}
default 14:52:05.465693+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a20940", "property":"lifecycle", "old":"0x0", "new":"0x28132c540"}
default 14:52:05.467808+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"setDelegate:", "self":"0x283a20940", "delegate":"0x283822800"}
default 14:52:05.468250+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"pausesLocationUpdatesAutomatically", "self":"0x283a20940"}
default 14:52:05.468493+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a20940", "property":"pausesLocationUpdatesAutomatically", "old":{"type":"decode failure","raw value":0,"expected type":"Generic"}, "new":{"type":"decode failure","raw value":0,"expected type":"Generic"}}
default 14:52:05.469602+0200 locationd Client com.nvent.olarm connected with message name LocationManager/kCLConnectionMessageRegistration
default 14:52:05.472032+0200 locationd {"msg":"LocationManager/kCLConnectionMessageRegistration", "event":"activity", "this":"0x107677330", "registrationRequired":0, "registrationReceived":0}
default 14:52:05.494323+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a20940", "property":"limitsPrecision", "old":0, "new":0}
default 14:52:05.494532+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a20940", "property":"previousAuthorizationStatus", "old":"NotDetermined", "new":"AuthorizedAlways"}
default 14:52:05.494632+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a20940", "property":"previousAuthorizationStatusValid", "old":0, "new":1}
default 14:52:05.494785+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a20940", "property":"isAuthorizedForWidgetUpdates", "old":0, "new":1}
default 14:52:05.494900+0200 Orobe {"msg":"#CLLocationManager invoking #delegate", "self":"0x283a20940", "delegate":"0x283822800", "selector":"locationManager:didChangeAuthorizationStatus:", "authorizationStatus":"AuthorizedAlways", "limitsPrecision":0, "isAuthorizedForWidgetUpdates":1}
default 14:52:07.170959+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"dealloc", "self":"0x283a31890"}
default 14:52:07.171181+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a31890", "property":"requestingLocation", "old":0, "new":0}
default 14:52:07.171343+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a31890", "property":"requestingRanging", "old":0, "new":0}
default 14:52:07.171454+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a31890", "property":"updatingRanging", "old":0, "new":0}
default 14:52:07.172054+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a31890", "property":"lifecycle", "old":"0x2813250a0", "new":"0x0"}
default 14:52:23.891073+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"startMonitoringSignificantLocationChanges", "self":"0x283a3d3c0"}
default 14:52:23.896022+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"location", "self":"0x283a30f40"}
default 14:52:23.903527+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"location", "self":"0x283a30f40"}
default 14:52:23.904665+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"setDistanceFilter:", "self":"0x283a30f40", "distance":"-1.000000"}
default 14:52:23.904840+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a30f40", "property":"distanceFilter", "old":"-1.000000", "new":"-1.000000"}
default 14:52:23.904998+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"setDesiredAccuracy:", "self":"0x283a30f40", "accuracy":"-2.000000"}
default 14:52:23.905138+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a30f40", "property":"desiredAccuracy", "old":"-1.000000", "new":"-2.000000"}
default 14:52:23.905478+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"setPausesLocationUpdatesAutomatically:", "self":"0x283a30f40", "pausesLocationUpdatesAutomatically":0}
default 14:52:23.905719+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a30f40", "property":"pausesLocationUpdatesAutomatically", "old":{"type":"decode failure","raw value":0,"expected type":"Generic"}, "new":{"type":"decode failure","raw value":4,"expected type":"Generic"}}
default 14:52:23.906428+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"setAllowsBackgroundLocationUpdates:", "self":"0x283a30f40", "allows":1}
default 14:52:23.906750+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a30f40", "property":"allowsBackgroundLocationUpdates", "old":0, "new":1}
default 14:52:23.907236+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"setShowsBackgroundLocationIndicator:", "self":"0x283a30f40", "shows":0}
default 14:52:23.907366+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a30f40", "property":"showsBackgroundLocationIndicator", "old":0, "new":0}
default 14:52:23.908680+0200 Orobe {"msg":"CLLocationManager", "event":"activity", "_cmd":"startUpdatingLocation", "self":"0x283a30f40"}
default 14:52:23.909054+0200 Orobe {"msg":"state transition", "event":"state_transition", "state":"LocationManager", "id":"0x283a30f40", "property":"updatingLocation", "old":0, "new":1}
default 14:52:23.913139+0200 Orobe {"msg":"#CLLocationManager invoking #delegate", "self":"0x283a3d3c0", "delegate":"0x280a28360", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageSignificantLocationChange"}
default 14:52:23.961838+0200 wifid {"msg":"#CLLocationManager invoking #delegate", "self":"0x10290fb90", "delegate":"0x1029089d0", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageLocation"}
default 14:52:23.991974+0200 navd {"msg":"#CLLocationManager invoking #delegate", "self":"0x1019072a0", "delegate":"0x10180b2b0", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageLocation"}
default 14:55:08.031166+0200 destinationd {"msg":"#CLLocationManager invoking #delegate", "self":"0x104e0a800", "delegate":"0x104b139f0", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageLocation"}
default 14:55:08.031394+0200 destinationd {"msg":"CLLocationManager", "event":"activity", "_cmd":"_limitsPrecision", "self":"0x104e0a800"}
default 14:55:08.033196+0200 navd {"msg":"#CLLocationManager invoking #delegate", "self":"0x1019072a0", "delegate":"0x10180b2b0", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageLocation"}
default 14:55:28.105875+0200 duetexpertd {"msg":"CLLocationManager", "event":"activity", "_cmd":"location", "self":"0x10aa4e610"}
default 14:55:44.862940+0200 wifid {"msg":"#CLLocationManager invoking #delegate", "self":"0x10290fb90", "delegate":"0x1029089d0", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageLocation"}
default 14:55:44.867546+0200 destinationd {"msg":"#CLLocationManager invoking #delegate", "self":"0x104e0a800", "delegate":"0x104b139f0", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageLocation"}
default 14:55:44.867805+0200 destinationd {"msg":"CLLocationManager", "event":"activity", "_cmd":"_limitsPrecision", "self":"0x104e0a800"}
default 14:55:44.868026+0200 navd {"msg":"#CLLocationManager invoking #delegate", "self":"0x1019072a0", "delegate":"0x10180b2b0", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageLocation"}
default 14:56:20.833151+0200 wifid {"msg":"#CLLocationManager invoking #delegate", "self":"0x10290fb90", "delegate":"0x1029089d0", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageLocation"}
default 14:56:20.846857+0200 destinationd {"msg":"#CLLocationManager invoking #delegate", "self":"0x104e0a800", "delegate":"0x104b139f0", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageLocation"}
default 14:56:20.847167+0200 destinationd {"msg":"CLLocationManager", "event":"activity", "_cmd":"_limitsPrecision", "self":"0x104e0a800"}
default 14:56:20.851026+0200 navd {"msg":"#CLLocationManager invoking #delegate", "self":"0x1019072a0", "delegate":"0x10180b2b0", "selector":"locationManager:didUpdateLocations:", "location":<private>, "eventType":"kCLConnectionMessageLocation"}
default 14:56:29.437890+0200 duetexpertd {"msg":"CLLocationManager", "event":"activity", "_cmd":"location", "self":"0x10aa4e610"}
See wiki Debugging
I did check it before my post... It just says
"When testing at your work-station, you can observe the plugin logs in XCode:" Which is what I did via above... ?
Boot your app in XCode and view the logs, after configuring the plugin for verbose logging.
2021-02-03 13:21:28.571962+0200 Orobe[324:9185] ℹ️-[TSLocationManager init]
╔═════════════════════════════════════════════
║ TSLocationManager (build 371)
╠══════════════════════════════════════════════
{
activityRecognitionInterval = 10000;
activityType = 1;
authorization = {
};
autoSync = 1;
autoSyncThreshold = 0;
batchSync = 0;
debug = 0;
desiredAccuracy = "-1";
desiredOdometerAccuracy = 100;
didLaunchInBackground = 0;
didRequestUpgradeLocationAuthorization = 1;
disableAutoSyncOnCellular = 0;
disableElasticity = 0;
disableLocationAuthorizationAlert = 0;
disableMotionActivityUpdates = 0;
disableStopDetection = 0;
distanceFilter = 10;
elasticityMultiplier = 1;
enableTimestampMeta = 0;
enabled = 1;
encrypt = 0;
extras = {
};
geofenceInitialTriggerEntry = 1;
geofenceProximityRadius = 2000;
geofenceTemplate = "";
headers = {
"X-FOO" = bar;
};
heartbeatInterval = 60;
httpRootProperty = location;
httpTimeout = 60000;
iOSHasWarnedLocationServicesOff = 1;
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 = {
"auth_token" = "maybe_your_server_authenticates_via_token_YES?";
};
pausesLocationUpdatesAutomatically = 1;
persistMode = 2;
preventSuspend = 0;
schedule = (
);
schedulerEnabled = 0;
showsBackgroundLocationIndicator = 0;
startOnBoot = 0;
stationaryRadius = 25;
stopAfterElapsedMinutes = "-1";
stopDetectionDelay = 0;
stopOnStationary = 0;
stopOnTerminate = 0;
stopTimeout = 1;
trackingMode = 1;
url = "http://yourserver.com/locations";
useSignificantChangesOnly = 0;
}
2021-02-03 13:21:28.578567+0200 Orobe[324:9188] ℹ️-[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)
2021-02-03 13:21:28.578784+0200 Orobe[324:9188] ℹ️-[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);
2021-02-03 13:21:28.586542+0200 Orobe[324:9185] 7.3.0 - [Firebase/Core][I-COR000005] No app has been configured yet.
2021-02-03 13:21:28.586730+0200 Orobe[324:9185] 7.3.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure];
(FirebaseApp.configure()
in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.
2021-02-03 13:21:28.590571+0200 Orobe[324:9004] RNWIFI:Init
2021-02-03 13:21:28.603603+0200 Orobe[324:9185] 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3
2021-02-03 13:21:28.605290+0200 Orobe[324:9186] 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3
2021-02-03 13:21:28.606466+0200 Orobe[324:9186] 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3
2021-02-03 13:21:28.607141+0200 Orobe[324:9188] 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3
2021-02-03 13:21:28.607752+0200 Orobe[324:9188] 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3
2021-02-03 13:21:28.608355+0200 Orobe[324:9004] RNWIFI:statechaged 3
2021-02-03 13:21:28.615046+0200 Orobe[324:9185] ℹ️+[LocationAuthorization run:onCancel:] status: 3
2021-02-03 13:21:28.615367+0200 Orobe[324:9188] 7.3.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure];
(FirebaseApp.configure()
in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.
2021-02-03 13:21:28.615392+0200 Orobe[324:9004] [native] Invalidating <RCTCxxBridge: 0x13be12be0> (parent: <RCTBridge: 0x281868150>, executor: RCTWebSocketExecutor)
2021-02-03 13:21:28.616731+0200 Orobe[324:9185] ℹ️-[TSLocationManager removeListeners]
2021-02-03 13:21:28.629912+0200 Orobe[324:9190] 7.3.0 - [Firebase/Core][I-COR000005] No app has been configured yet.
2021-02-03 13:21:28.630070+0200 Orobe[324:9188] 🔴-[LocationManager stopWatchPosition] STOP
2021-02-03 13:21:28.631279+0200 Orobe[324:9190] 7.3.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure];
(FirebaseApp.configure()
in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.
2021-02-03 13:21:28.632938+0200 Orobe[324:9004] RNWIFI:Init
2021-02-03 13:21:28.633978+0200 Orobe[324:9200] ℹ️-[TSLocationManager removeListeners]
2021-02-03 13:21:28.673569+0200 Orobe[324:9004] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x13be24de0>.
2021-02-03 13:21:28.673972+0200 Orobe[324:9004] RNWIFI:statechaged 3
2021-02-03 13:21:34.702730+0200 Orobe[324:9004] [native] Running application Orobe ({
initialProps = {
};
rootTag = 11;
})
2021-02-03 13:21:34.920815+0200 Orobe[324:9184] [connection] nw_socket_handle_socket_event [C7:1] Socket SO_ERROR [61: Connection refused]
2021-02-03 13:21:34.922766+0200 Orobe[324:9200] [connection] nw_connection_get_connected_socket [C7] Client called nw_connection_get_connected_socket on unconnected nw_connection
2021-02-03 13:21:34.923119+0200 Orobe[324:9200] TCP Conn 0x28047c000 Failed : error 0:61 [61]
2021-02-03 13:21:34.929717+0200 Orobe[324:9200] 7.3.0 - [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure];
(FirebaseApp.configure()
in Swift) to your application initialization. Read more: https://goo.gl/ctyzm8.
2021-02-03 13:21:35.005616+0200 Orobe[324:9185] ℹ️-[TSLocationManager on:success:failure:] location
2021-02-03 13:21:35.005927+0200 Orobe[324:9184] ℹ️-[TSLocationManager on:success:failure:] motionchange
2021-02-03 13:21:35.006281+0200 Orobe[324:9185] ℹ️-[TSLocationManager on:success:failure:] activitychange
2021-02-03 13:21:35.006542+0200 Orobe[324:9184] ℹ️-[TSLocationManager on:success:failure:] providerchange
2021-02-03 13:21:35.034303+0200 Orobe[324:9188] ℹ️-[TSConfig persist]
2021-02-03 13:21:35.039687+0200 Orobe[324:9191] ℹ️-[TSConfig persist]
2021-02-03 13:21:35.042524+0200 Orobe[324:9184] 🔵-[TSLocationManager ready]
2021-02-03 13:21:35.043586+0200 Orobe[324:9200] ℹ️-[TSLocationManager doStart:] trackingMode: 1
2021-02-03 13:21:35.044448+0200 Orobe[324:9191] ℹ️-[TSLocationManager loadLastOdometerLocation] <-34.16054736,+18.43008063> +/- -1.00m (speed -1.00 mps / course -1.00) @ 2021/02/03, 13:21:35 South Africa Standard Time
2021-02-03 13:21:35.044572+0200 Orobe[324:9200] 🎾-[TSGeofenceManager start]
2021-02-03 13:21:35.045359+0200 Orobe[324:9191] 🎾-[SOMotionDetector startDetection]
2021-02-03 13:21:35.045474+0200 Orobe[324:9191] 🔵-[TSLocationManager setPace:] 0
2021-02-03 13:21:35.045475+0200 Orobe[324:9004] [Client] {"msg":"#NullIsland Either the latitude or longitude was exactly 0! That's highly unlikely", "latIsZero":0, "lonIsZero":0}
2021-02-03 13:21:35.048658+0200 Orobe[324:9188] 🎾-[TSLocationManager startUpdatingLocation] Location-services: ON
2021-02-03 13:21:35.064152+0200 Orobe[324:9184] ✅-[SOMotionDetector startDetection]_block_invoke Enabled M7 MotionActivity updates
2021-02-03 13:21:35.209826+0200 Orobe[324:9004] WF: === Starting WebFilter logging for process Orobe
2021-02-03 13:21:35.209869+0200 Orobe[324:9004] WF: _userSettingsForUser mobile: {
filterBlacklist = (
);
filterWhitelist = (
);
restrictWeb = 1;
useContentFilter = 0;
useContentFilterOverrides = 0;
whitelistEnabled = 0;
}
2021-02-03 13:21:35.209898+0200 Orobe[324:9004] WF: _WebFilterIsActive returning: NO
2021-02-03 13:21:35.241392+0200 Orobe[324:9185]
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2021-02-03 13:21:35.241684+0200 Orobe[324:9188] ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS
2021-02-03 13:21:35.243116+0200 Orobe[324:9188] ✅-[BackgroundTaskManager createBackgroundTask] 1
2021-02-03 13:21:35.243964+0200 Orobe[324:9188] ℹ️+[LocationAuthorization run:onCancel:] status: 3
2021-02-03 13:21:35.244666+0200 Orobe[324:9185] 🎾-[TSLocationManager startMonitoringBackgroundFetch] BackgroundFetch: ON
2021-02-03 13:21:35.246066+0200 Orobe[324:9184] ✅-[TSHttpService schedulePost] LOCKED: F876FD8E-6D87-483D-BADF-6C7DF95FC5D6
2021-02-03 13:21:35.246252+0200 Orobe[324:9185]
📍<-34.16053496,+18.43009335> +/- 65.00m (speed -1.00 mps / course -1.00) @ 2021/02/03, 13:21:01 South Africa Standard Time
2021-02-03 13:21:35.246328+0200 Orobe[324:9184]
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 33.4s
╚═══════════════════════════════════════════════════════════
2021-02-03 13:21:35.246418+0200 Orobe[324:9188] ℹ️-[TSLocationManager locationManager:didUpdateLocations:] Received stale motionchange location. Retrying...
2021-02-03 13:21:35.246474+0200 Orobe[324:9185]
📍<-34.16053496,+18.43009335> +/- 65.00m (speed -1.00 mps / course -1.00) @ 2021/02/03, 13:21:10 South Africa Standard Time
2021-02-03 13:21:35.260457+0200 Orobe[324:9004] [TSBackgroundFetch scheduleBGAppRefresh] com.transistorsoft.fetch
2021-02-03 13:21:35.260492+0200 Orobe[324:9188]
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 24.4s
╚═══════════════════════════════════════════════════════════
2021-02-03 13:21:35.263004+0200 Orobe[324:9250] ℹ️-[TSLocationManager locationManager:didUpdateLocations:] Received stale motionchange location. Retrying...
2021-02-03 13:21:35.263823+0200 Orobe[324:9246]
📍<-34.16053496,+18.43009335> +/- 65.00m (speed -1.00 mps / course -1.00) @ 2021/02/03, 13:21:35 South Africa Standard Time
2021-02-03 13:21:35.264000+0200 Orobe[324:9253]
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager locationManager:didUpdateLocations:] Enabled: 1 | isMoving: 0 | df: -1.0m | age: 0.1s
╚═══════════════════════════════════════════════════════════
2021-02-03 13:21:35.264047+0200 Orobe[324:9246] ✅-[TSLocationManager locationManager:didUpdateLocations:] Acquired motionchange position: <-34.16053496,+18.43009335> +/- 65.00m (speed -1.00 mps / course -1.00) @ 2021/02/03, 13:21:35 South Africa Standard Time
2021-02-03 13:21:35.264332+0200 Orobe[324:9253] 🔵-[TSLocationManager startMonitoringStationaryRegion:radius:] Radius: 90
2021-02-03 13:21:35.264559+0200 Orobe[324:9246] 🔴-[TSLocationManager stopUpdatingLocation]
2021-02-03 13:21:35.264595+0200 Orobe[324:9253] 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 65.0
2021-02-03 13:21:35.264629+0200 Orobe[324:9246] 🎾-[TSLocationManager startMonitoringSignificantLocationChanges]
2021-02-03 13:21:35.264670+0200 Orobe[324:9253]
╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
2021-02-03 13:21:35.264814+0200 Orobe[324:9246] ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: 2CC7F43F-1602-4EDD-8811-92DB71CEB81F
2021-02-03 13:21:35.264869+0200 Orobe[324:9246] ℹ️-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke Configured BackgroundFetch
2021-02-03 13:21:35.265072+0200 Orobe[324:9253]
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
2021-02-03 13:21:35.265595+0200 Orobe[324:9253] ⚠️-[TSHttpService flush:] Busy with previous request
2021-02-03 13:21:37.059391+0200 Orobe[324:9244] [tcp] tcp_input [C10.1:2] flags=[R.] seq=1156059577, ack=1163599876, win=9814 state=ESTABLISHED rcv_nxt=1156059577, snd_una=1163599603
2021-02-03 13:21:37.060765+0200 Orobe[324:9244] [connection] nw_read_request_report [C10] Receive failed with error "Connection reset by peer"
2021-02-03 13:21:37.062460+0200 Orobe[324:9244] Task <DB98256A-7750-43DE-952C-0EFA939A0C8F>.<1> HTTP load failed, 807/0 bytes (error code: -1005 [4:-4])
2021-02-03 13:21:37.065506+0200 Orobe[324:9250] Task <DB98256A-7750-43DE-952C-0EFA939A0C8F>.<1> finished with error [-1005] Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=-4, NSUnderlyingError=0x283dea940 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x281049630 [0x1d48ddb20]>{length = 16, capacity = 16, bytes = 0x100200508d08e0c30000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <DB98256A-7750-43DE-952C-0EFA939A0C8F>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <DB98256A-7750-43DE-952C-0EFA939A0C8F>.<1>"
), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=http://yourserver.com/locations, NSErrorFailingURLKey=http://yourserver.com/locations, _kCFStreamErrorDomainKey=4}
2021-02-03 13:21:37.066050+0200 Orobe[324:9244] ⚠️-[HttpResponse handleResponse] HTTP ERROR: 0
- The network connection was lost.
{ NSErrorFailingURLKey = "http://yourserver.com/locations"; NSErrorFailingURLStringKey = "http://yourserver.com/locations"; NSLocalizedDescription = "The network connection was lost."; NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x281049630 [0x1d48ddb20]>{length = 16, capacity = 16, bytes = 0x100200508d08e0c30000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}"; "_NSURLErrorFailingURLSessionTaskErrorKey" = "LocalDataTask <DB98256A-7750-43DE-952C-0EFA939A0C8F>.<1>"; "_NSURLErrorRelatedURLSessionTaskErrorKey" = ( "LocalDataTask <DB98256A-7750-43DE-952C-0EFA939A0C8F>.<1>" ); "_kCFStreamErrorCodeKey" = "-4"; "_kCFStreamErrorDomainKey" = 4; } 2021-02-03 13:21:37.072057+0200 Orobe[324:9244] ✅-[TSHttpService post:]_block_invoke UNLOCKED: F876FD8E-6D87-483D-BADF-6C7DF95FC5D6 2021-02-03 13:21:37.072236+0200 Orobe[324:9244] ╔═══════════════════════════════════════════════════════════ ║ -[TSHttpService finish:error:] Success: 0 ╚═══════════════════════════════════════════════════════════ 2021-02-03 13:21:37.072506+0200 Orobe[324:9249] ✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 1 OF ( 1 ) 2021-02-03 13:21:50.211228+0200 Orobe[324:9250] ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0 ╚═══════════════════════════════════════════════════════════ 2021-02-03 13:21:53.404665+0200 Orobe[324:9250] ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0 ╚═══════════════════════════════════════════════════════════ 2021-02-03 13:22:29.419656+0200 Orobe[324:9250] ℹ️-[TSDBLogger db_save] Log committed 2021-02-03 13:22:35.312985+0200 Orobe[324:9249] ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0 ╚═══════════════════════════════════════════════════════════ 2021-02-03 13:22:38.512633+0200 Orobe[324:9250] ╔═══════════════════════════════════════════════════════════ ║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0 ╚═══════════════════════════════════════════════════════════
Interesting. I don't think I've ever actually implemented startOnBoot
for iOS. iOS has no way of detecting when a device is rebooted (Android does provide a signal to apps when a device is rebooted).. Device boot will have to be inferred by noting the current device uptime
and performing some logic. {startOnBoot: false, stopOnTerminate: false}
seems to be a rare configuration since nobody has previously reported this in 6 years.
I'll look into it.
btw, when you configure the plugin with:
BackgroundGeolocation.ready({
...
// HTTP / SQLite config
url: 'http://yourserver.com/locations',
...
});
The plugin IS actually going to waste energy attempting to POST
locations to that invalid url.
2021-02-03 13:21:37.066050+0200 Orobe[324:9244] ⚠️-[HttpResponse handleResponse] HTTP ERROR: 0
The network connection was lost.
{
NSErrorFailingURLKey = "http://yourserver.com/locations";
NSErrorFailingURLStringKey = "http://yourserver.com/locations";
NSLocalizedDescription = "The network connection was lost.";
NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x281049630 [0x1d48ddb20]>{length = 16, capacity = 16, bytes = 0x100200508d08e0c30000000000000000}, _kCFStreamErrorCodeKey=-4, _kCFStreamErrorDomainKey=4}";
"_NSURLErrorFailingURLSessionTaskErrorKey" = "LocalDataTask .<1>";
"_NSURLErrorRelatedURLSessionTaskErrorKey" = (
"LocalDataTask .<1>"
);
"_kCFStreamErrorCodeKey" = "-4";
"_kCFStreamErrorDomainKey" = 4;
}
Ok, I have a solution for iOS startOnBoot: false
. It will be pushed to master soon so you can test it out. I don't think it works in the iOS Simulator, only real devices.
hey @christocracy alright cool my friend - thank you for this.
so should I wait for that or anything else I can do?
thanks for the tip - if I remove the URI if this will stop post attempts?
i'm new to mobile dev, been mainly a web fullstack dev for years - so will pick up debugging device specific logs.
so should I wait for that or anything else
When I merge to master, I'll let you know here and you can install the plugin from master to test.
if I remove the URI if this will stop post attempts?
Remove this. You're expected to provide an url to your own server.
// HTTP / SQLite config
url: 'http://yourserver.com/locations',
ok cool, have you merged yet?
still nothing??
This is merged to master in the "customers-only" private repo first.
This public version is mirrored only about every 3 months.
Have you not purchased a license?
3.10.0
has been released today.
yes we have a license. but you said you would notify me
so i just need to use startOnBoot: false?
it still seems to be logging nonstop after startup man.... @christocracy
yes we have a license.
What's your Order #?
but you said you would notify me
The best thing to do is watch the private repo for notifications. Then you'll see every commit / PR. You can't count on me to remember you as I'm often dealing with dozens of people simultaneously, spread across Flutter, React Native and Cordova.
#6473
sure! :)