transistorsoft / flutter_background_geolocation

Sophisticated, battery-conscious background-geolocation & geofencing with motion-detection
https://www.transistorsoft.com/shop/products/flutter-background-geolocation
Other
652 stars 240 forks source link

Cannot update config URL using RPC #1325

Closed bertrandgelinas closed 4 months ago

bertrandgelinas commented 4 months ago

I want to update the URL used by the plugin to send the location data using the RPC. However, when i send a response using RPC, it does not update the user's config.

Your Environment

//this is the answer of my server res.status(200).json({ responseText: { "background_geolocation": [ ["setConfig", { "url": https://someOtherUrl/app/v2/add-location/${req.params.userId} }], ["stop"], ["start"],

      ]
    }, success: true
  });

## Expected Behavior
It should update the URL and, in fact, stop sending to that particular URL.

## Actual Behavior
It does nothing.

## Steps to Reproduce
<!--- reproduce this issue; include code to reproduce, if relevant -->
1. get data from mobile
2. send response to change URL on config
3.
4.

## Context
<!--- What were you trying to do? -->
some user are sending data to the wrong URL and they don't update their mobile app... So i'm trying to update the config URL in order to let them send the data to the correct one.

## Debug logs
<!-- include iOS / Android logs
- ios XCode logs,
- use #getLog #emailLog methods (@see docs)
- Android: $ adb logcat -s TSLocationManager
-->
<details>
    <summary>Logs</summary>

``` <!-- syntax-highligting:  DO NOT REMOVE -->
PASTE_YOUR_LOGS_HERE

christocracy commented 4 months ago

some user are sending data to the wrong URL and they don't update their mobile app

Have you not tested this yourself before deploying it to your productions users?

there are verbose logs emitted when RPC commands are executed.

christocracy commented 4 months ago

You will see the ⚡️emoji in logs when RPC commands are executed.

bertrandgelinas commented 4 months ago

Thanks for the response. So i had already made the test but i was not expecting to see it in log. So i made the test again but did'nt see anything with ⚡️emoji.

also i can confirm that i receive the response from http, running the command adb logcat *:S TSLocationManager:V flutter:V and the url in response is the right one.

image

Here is the log i get from the emailLogfunction that does not contain the ⚡️emoji and with the wrong URL.

Logs ```╔═════════════════════════════════════════════ ║ TSLocationManager version: 3.5.4 (433) ╠═════════════════════════════════════════════ ╟─ HMD Global Nokia 5.3 @ 12 (flutter) { "activityRecognitionInterval": 10000, "allowIdenticalLocations": false, "authorization": {}, "autoSync": true, "autoSyncThreshold": 15, "backgroundPermissionRationale": { "title": "Autorisation de localisation requise", "message": "some_message", "positiveAction": "Changer pour Autoriser en tout temps", "negativeAction": "Annuler" }, "batchSync": true, "configUrl": "", "debug": false, "deferTime": 20000, "desiredAccuracy": -2, "desiredOdometerAccuracy": 100, "disableAutoSyncOnCellular": false, "disableElasticity": false, "disableLocationAuthorizationAlert": false, "disableMotionActivityUpdates": false, "disableProviderChangeRecord": false, "disableStopDetection": true, "distanceFilter": 15, "elasticityMultiplier": 1, "enableHeadless": true, "enableTimestampMeta": false, "extras": { "usualTransportMode": "run", "challenges": [], "manualTracking": true, "isAndroid": 1, "userId": "MBstYzZIkLat4GEIPp2xTxYcd0O2" }, "fastestLocationUpdateInterval": 9000, "foregroundService": true, "geofenceInitialTriggerEntry": true, "geofenceModeHighAccuracy": false, "geofenceProximityRadius": 1000, "geofenceTemplate": "", "headers": {}, "headlessJobService": "com.transistorsoft.flutter.backgroundgeolocation.HeadlessTask", "heartbeatInterval": -1, "httpRootProperty": "location", "httpTimeout": 60000, "isMoving": false, "locationAuthorizationRequest": "Always", "locationTemplate": "", "locationTimeout": 60, "locationUpdateInterval": 1000, "locationsOrderDirection": "ASC", "logLevel": 5, "logMaxDays": 3, "maxBatchSize": -1, "maxDaysToPersist": 1, "maxMonitoredGeofences": 97, "maxRecordsToPersist": -1, "method": "POST", "minimumActivityRecognitionConfidence": 50, "motionTriggerDelay": 2000, "notification": { "layout": "", "title": "some_title", "text": "Collecte de déplacements en cours", "color": "", "channelName": "some_channel", "channelId": "", "smallIcon": "mipmap-hdpi\/ic_launcher", "largeIcon": "mipmap-xxxhdpi\/ic_launcher", "priority": 2, "sticky": false, "strings": {}, "actions": [] }, "params": {}, "persist": true, "persistMode": 2, "schedule": [], "scheduleUseAlarmManager": false, "speedJumpFilter": 40, "startOnBoot": true, "stationaryRadius": 25, "stopAfterElapsedMinutes": 0, "stopOnStationary": false, "stopOnTerminate": false, "stopTimeout": 7, "triggerActivities": "in_vehicle, on_bicycle, on_foot, running, walking", "url": "WRONG URL", "useSignificantChangesOnly": false, "enabled": false, "schedulerEnabled": false, "trackingMode": 1, "odometer": 28.91657257080078, "isFirstBoot": false, "didLaunchInBackground": false, "didDeviceReboot": false } 07-12 14:04:55.616 INFO [LoggerFacade$a a] ╔═════════════════════════════════════════════ ║ DEVICE SENSORS ╠═════════════════════════════════════════════ ╟─ ✅ ACCELEROMETER: {Sensor name="bst_bma2x2 Accelerometer Non-wakeup", vendor="Bosch", version=16843346, type=1, maxRange=769.7734, resolution=0.0023928226, power=0.13, minDelay=5000} ╟─ ⚠️ GYROSCOPE: none. Motion-detection system performance will be degraded ╟─ ✅ MAGNETOMETER: {Sensor name="qmc6308 Magnetometer Non-wakeup", vendor="QST", version=258, type=2, maxRange=4912.0, resolution=0.1, power=1.1, minDelay=10000} ╟─ ✅ SIGNIFICANT_MOTION: {Sensor name="sns_smd Wakeup", vendor="qualcomm", version=1, type=17, maxRange=1.0, resolution=1.0, power=0.025, minDelay=-1} ╚═════════════════════════════════════════════ 07-12 14:04:55.648 DEBUG [TSSQLiteAppender$c run] ℹ️ Cleared logs older than 72 hours 07-12 14:04:56.049 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/location 07-12 14:04:56.050 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/motionchange 07-12 14:04:56.051 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/activitychange 07-12 14:04:56.053 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/geofenceschange 07-12 14:04:56.054 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/geofence 07-12 14:04:56.055 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/heartbeat 07-12 14:04:56.056 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/http 07-12 14:04:56.057 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/schedule 07-12 14:04:56.058 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/connectivitychange 07-12 14:04:56.059 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/enabledchange 07-12 14:04:56.060 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/providerchange 07-12 14:04:56.061 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/powersavechange 07-12 14:04:56.062 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/notificationaction 07-12 14:04:56.064 DEBUG [StreamHandler register] com.transistorsoft/flutter_background_geolocation/events/authorization 07-12 14:04:56.129 INFO [BackgroundGeolocation ] ✅ Google Play Services: connected (version code:12451000) 07-12 14:04:56.272 INFO [TSProviderManager startMonitoring] 🎾 Start monitoring location-provider changes 07-12 14:04:56.286 DEBUG [BackgroundGeolocation a] 🔴 Cleared callbacks 07-12 14:04:56.315 DEBUG [SQLiteLocationDAO prune] ℹ️ PRUNE -1 days 07-12 14:04:56.947 DEBUG [LifecycleManager onCreate] ☯️ onCreate 07-12 14:04:56.948 DEBUG [LifecycleManager onStart] ☯️ onStart 07-12 14:04:56.949 DEBUG [LifecycleManager onResume] ☯️ onResume 07-12 14:04:56.964 INFO [BootReceiver b] ╔═════════════════════════════════════════════ ║ BootReceiver: com.greenplay.dsa ╠═════════════════════════════════════════════ ╟─ android.intent.action.MY_PACKAGE_REPLACED 07-12 14:04:56.967 DEBUG [TSGeofenceManager d] ℹ️ Persist monitored geofences: [] 07-12 14:05:14.705 DEBUG [TSLocationManager a] ℹ️ Clear last odometer location 07-12 14:05:14.731 DEBUG [TSGeofenceManager c] 🔴 Stop monitoring geofences 07-12 14:05:14.744 INFO [ActivityRecognitionService stop] 🔴 Stop motion-activity updates 07-12 14:05:14.751 INFO [HeartbeatService stop] 🔴 Stop heartbeat 07-12 14:05:14.754 DEBUG [HttpService stopMonitoringConnectivityChanges] 🔴 Stop monitoring connectivity changes 07-12 14:05:16.188 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [autoSyncThreshold, backgroundPermissionRationale, backgroundPermissionRationale.title, backgroundPermissionRationale.message, backgroundPermissionRationale.positiveAction, backgroundPermissionRationale.negativeAction, batchSync, deferTime, desiredAccuracy, distanceFilter, enableHeadless, extras, fastestLocationUpdateInterval, headlessJobService, isMoving, logLevel, minimumActivityRecognitionConfidence, motionTriggerDelay, notification, notification.title, notification.text, notification.smallIcon, notification.largeIcon, notification.priority, notification.channelName, speedJumpFilter, startOnBoot, stopOnTerminate, stopTimeout, url] 07-12 14:05:16.214 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 1) ╠═════════════════════════════════════════════ 07-12 14:05:16.427 WARN [BackgroundGeolocationModule ready] ⚠️ #ready already called. Redirecting to #setConfig 07-12 14:05:16.431 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [extras] 07-12 14:05:16.448 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 1) ╠═════════════════════════════════════════════ 07-12 14:05:16.882 DEBUG [LocationAuthorization withBackgroundPermission] ℹ️ LocationAuthorization: Permission granted 07-12 14:05:16.900 INFO [TSGeofenceManager start] 🎾 Start monitoring geofences 07-12 14:05:16.906 DEBUG [HttpService startMonitoringConnectivityChanges] 🎾 Start monitoring connectivity changes 07-12 14:05:16.928 DEBUG [DeviceSettings startMonitoringPowerSaveChanges] 🎾 Start monitoring powersave changes 07-12 14:05:16.933 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 07-12 14:05:16.941 DEBUG [HttpService a] ╔═════════════════════════════════════════════ ║ 📶 Connectivity change: connected? true ╠═════════════════════════════════════════════ 07-12 14:05:16.945 INFO [HeartbeatService stop] 🔴 Stop heartbeat 07-12 14:05:16.964 INFO [TrackingService changePace] 🔵 setPace: true → true 07-12 14:05:16.964 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:17.000 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:17.004 DEBUG [AbstractService a] 🎾 motionchange [TrackingService startId: 1, eventCount: 1] 07-12 14:05:17.007 INFO [TrackingService k] ╔═════════════════════════════════════════════ ║ TrackingService motionchange: true ╠═════════════════════════════════════════════ 07-12 14:05:17.008 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 1, eventCount: 0, sticky: true] 07-12 14:05:17.080 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 1 (127375ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46.806224,-71.243866 hAcc=100.0 et=+5d2h10m12s405ms alt=11.904144287109375 vAcc=100.0 {Bundle[{battery_level=1.0, is_charging=true, odometer=28.916573}]}], time: 1720807389695 07-12 14:05:17.082 DEBUG [TSLocationManager a] Median accuracy: 100.0 07-12 14:05:17.097 DEBUG [LocationAuthorization withPermission] ℹ️ LocationAuthorization: Permission granted 07-12 14:05:17.140 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:17.154 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:17.164 DEBUG [AbstractService a] 🎾 start [LocationRequestService startId: 1, eventCount: 1] 07-12 14:05:17.172 INFO [SingleLocationRequest startUpdatingLocation] 🔵 [SingleLocationRequest start, action: 1, requestId: 1] 07-12 14:05:17.185 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 1, eventCount: 0, sticky: true] 07-12 14:05:17.224 INFO [HeartbeatService stop] 🔴 Stop heartbeat 07-12 14:05:17.249 INFO [TrackingService changePace] 🔵 setPace: true → true 07-12 14:05:17.440 DEBUG [TSLocationManagerActivity a] locationsettings 07-12 14:05:17.441 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 07-12 14:05:17.644 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:17.652 DEBUG [AbstractService a] 🎾 motionchange [TrackingService startId: 2, eventCount: 1] 07-12 14:05:17.653 INFO [TrackingService k] ╔═════════════════════════════════════════════ ║ TrackingService motionchange: true ╠═════════════════════════════════════════════ 07-12 14:05:17.654 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 2, eventCount: 0, sticky: true] 07-12 14:05:17.676 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 2 (127977ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46.806224,-71.243866 hAcc=100.0 et=+5d2h10m12s405ms alt=11.904144287109375 vAcc=100.0 {Bundle[{}]}], time: 1720807389695 07-12 14:05:17.679 DEBUG [TSLocationManager a] Median accuracy: 100.0 07-12 14:05:17.694 DEBUG [LocationAuthorization withPermission] ℹ️ LocationAuthorization: Permission granted 07-12 14:05:17.710 DEBUG [TSLocationManagerActivity c] eventCount: 0 07-12 14:05:17.761 DEBUG [StreamHandler onListen] location 07-12 14:05:17.765 DEBUG [StreamHandler onListen] geofence 07-12 14:05:17.766 DEBUG [StreamHandler onListen] motionchange 07-12 14:05:17.768 DEBUG [StreamHandler onListen] activitychange 07-12 14:05:17.769 DEBUG [StreamHandler onListen] providerchange 07-12 14:05:17.773 DEBUG [StreamHandler onListen] connectivitychange 07-12 14:05:17.776 DEBUG [StreamHandler onListen] http 07-12 14:05:17.786 INFO [HeartbeatService stop] 🔴 Stop heartbeat 07-12 14:05:17.794 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:17.801 DEBUG [AbstractService b] 🎾 STOP [LocationRequestService startId: 2, eventCount: 1] 07-12 14:05:17.803 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 2, eventCount: 0, sticky: false] 07-12 14:05:17.808 INFO [TrackingService changePace] 🔵 setPace: true → true 07-12 14:05:17.877 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:17.882 DEBUG [AbstractService a] 🎾 motionchange [TrackingService startId: 3, eventCount: 1] 07-12 14:05:17.884 INFO [TrackingService k] ╔═════════════════════════════════════════════ ║ TrackingService motionchange: true ╠═════════════════════════════════════════════ 07-12 14:05:17.885 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 3, eventCount: 0, sticky: true] 07-12 14:05:17.919 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:17.927 DEBUG [AbstractService a] 🎾 start [LocationRequestService startId: 3, eventCount: 1] 07-12 14:05:17.930 WARN [LocationRequestService d] ⚠️ Failed to find SingleLocationRequest in START action; requestId: 2. This is likely from a timed-out location request; Intent { act=start cmp=com.greenplay.dsa/com.transistorsoft.locationmanager.service.LocationRequestService (has extras) } 07-12 14:05:17.935 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 3, eventCount: 0, sticky: false] 07-12 14:05:17.937 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 3 (128238ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46.806224,-71.243866 hAcc=100.0 et=+5d2h10m12s405ms alt=11.904144287109375 vAcc=100.0 {Bundle[{}]}], time: 1720807389695 07-12 14:05:17.941 DEBUG [TSLocationManager a] Median accuracy: 100.0 07-12 14:05:17.965 DEBUG [LocationAuthorization withPermission] ℹ️ LocationAuthorization: Permission granted 07-12 14:05:18.008 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:18.012 DEBUG [AbstractService b] 🎾 STOP [LocationRequestService startId: 4, eventCount: 1] 07-12 14:05:18.013 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 4, eventCount: 0, sticky: false] 07-12 14:05:18.034 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 1) ╠═════════════════════════════════════════════ 07-12 14:05:18.076 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:18.080 DEBUG [AbstractService a] 🎾 start [LocationRequestService startId: 5, eventCount: 1] 07-12 14:05:18.083 INFO [SingleLocationRequest startUpdatingLocation] 🔵 [SingleLocationRequest start, action: 1, requestId: 3] 07-12 14:05:18.091 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 5, eventCount: 0, sticky: true] 07-12 14:05:18.111 DEBUG [TSLocationManagerActivity onDestroy] 07-12 14:05:18.217 DEBUG [AbstractService f] ⚙️︎ LocationRequestService.stopSelfResult(5): true 07-12 14:05:18.218 DEBUG [AbstractService onDestroy] 🔴 LocationRequestService stopped 07-12 14:05:19.664 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:19.675 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:19.679 DEBUG [AbstractService a] 🎾 start [ActivityRecognitionService startId: 1, eventCount: 1] 07-12 14:05:19.687 DEBUG [ActivityRecognitionService a] 🚘 ️DetectedActivity [type=STILL, confidence=97] 07-12 14:05:19.695 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:19.699 DEBUG [AbstractService a] 🎾 STOP_TIMEOUT [TrackingService startId: 4, eventCount: 1] 07-12 14:05:19.700 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 4, eventCount: 0, sticky: true] 07-12 14:05:19.706 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false] 07-12 14:05:19.748 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:19.752 DEBUG [AbstractService a] 🎾 start [ActivityRecognitionService startId: 2, eventCount: 1] 07-12 14:05:19.755 DEBUG [ActivityRecognitionService a] *** wasMoving: true, nowMoving: false, startedMoving: false, justStopped; true 07-12 14:05:19.758 DEBUG [TrackingService changePace] ⚠️ Waiting for existing motionchange request #3 to complete 07-12 14:05:19.759 INFO [ActivityRecognitionService a] ╔═════════════════════════════════════════════ ║ Motion Transition Result ╠═════════════════════════════════════════════ ╟─ 🎾 ENTER: still ╚═════════════════════════════════════════════ 07-12 14:05:19.760 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false] 07-12 14:05:19.963 DEBUG [AbstractService f] ⚙️︎ ActivityRecognitionService.stopSelfResult(2): true 07-12 14:05:19.964 DEBUG [AbstractService onDestroy] 🔴 ActivityRecognitionService stopped 07-12 14:05:22.190 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:22.206 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:22.209 DEBUG [AbstractService a] 🎾 1:3 [LocationRequestService startId: 1, eventCount: 1] 07-12 14:05:22.212 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 3 (139ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46.806227,-71.243891 hAcc=16.823 et=+5d2h12m24s781ms alt=-7.700000286102295 vAcc=1.0461361 vel=0.04487838 sAcc=0.38013154 {Bundle[{}]}], time: 1720807522071 07-12 14:05:22.216 INFO [TSLocationManager onSingleLocationResult] 🔵 Acquired motionchange position, isMoving: true 07-12 14:05:22.217 DEBUG [TSLocationManager a] Median accuracy: 100.0 07-12 14:05:22.225 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:22.228 DEBUG [AbstractService b] 🎾 STOP [LocationRequestService startId: 2, eventCount: 2] 07-12 14:05:22.228 INFO [TSLocationManager requestLocationUpdates] 🎾 Location-services: ON 07-12 14:05:22.229 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 2, eventCount: 1, sticky: false] 07-12 14:05:22.229 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 07-12 14:05:22.232 DEBUG [AbstractService a] ⚙️︎ FINISH [LocationRequestService startId: 1, eventCount: 0, sticky: false] 07-12 14:05:22.234 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 07-12 14:05:22.238 INFO [SQLiteLocationDAO persist] ✅ INSERT: ba97b42a-4f73-4eb8-a853-fe6a7af16d44 07-12 14:05:22.242 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 2) ╠═════════════════════════════════════════════ 07-12 14:05:22.257 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:22.261 DEBUG [AbstractService a] 🎾 start [TrackingService startId: 5, eventCount: 1] 07-12 14:05:22.265 DEBUG [TrackingService c] ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46.806227,-71.243891 hAcc=16.823 et=+5d2h12m24s781ms alt=-7.700000286102295 vAcc=1.0461361 vel=0.04487838 sAcc=0.38013154 {Bundle[{}]}] ╟─ Age: 192ms, time: 1720807522071 07-12 14:05:22.267 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 5, eventCount: 0, sticky: true] 07-12 14:05:22.268 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 07-12 14:05:22.271 DEBUG [TSLocationManager onLocationResult] ℹ️ IGNORED: same as last location 07-12 14:05:22.385 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 1 07-12 14:05:22.392 DEBUG [SQLiteLocationDAO allWithLocking] ✅ Locked 2 records 07-12 14:05:22.393 INFO [HttpService a] 🔵 HTTP POST batch (2) 07-12 14:05:22.436 DEBUG [AbstractService f] ⚙️︎ LocationRequestService.stopSelfResult(2): true 07-12 14:05:22.438 DEBUG [AbstractService onDestroy] 🔴 LocationRequestService stopped 07-12 14:05:22.767 INFO [HttpService$f onResponse] 🔵 Response: 200 07-12 14:05:22.769 DEBUG [SQLiteLocationDAO destroyAll] ✅ DELETED: (2) 07-12 14:05:22.775 DEBUG [SQLiteLocationDAO allWithLocking] ✅ Locked 0 records 07-12 14:05:22.776 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 1 07-12 14:05:24.796 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:24.811 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:24.816 DEBUG [AbstractService a] 🎾 start [ActivityRecognitionService startId: 1, eventCount: 1] 07-12 14:05:24.818 DEBUG [ActivityRecognitionService a] 🚘 ️DetectedActivity [type=STILL, confidence=98] 07-12 14:05:24.826 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false] 07-12 14:05:24.854 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:24.857 DEBUG [AbstractService a] 🎾 start [ActivityRecognitionService startId: 2, eventCount: 1] 07-12 14:05:24.859 DEBUG [ActivityRecognitionService a] *** wasMoving: true, nowMoving: false, startedMoving: false, justStopped; true 07-12 14:05:24.862 INFO [ActivityRecognitionService a] ╔═════════════════════════════════════════════ ║ Motion Transition Result ╠═════════════════════════════════════════════ ╟─ 🎾 ENTER: still ╚═════════════════════════════════════════════ 07-12 14:05:24.864 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false] 07-12 14:05:24.868 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:05:24.871 DEBUG [AbstractService a] 🎾 STOP_TIMEOUT [TrackingService startId: 6, eventCount: 1] 07-12 14:05:24.873 INFO [TSScheduleManager oneShot] ⏰ Scheduled OneShot: STOP_TIMEOUT in 420000ms (jobID: 2059034116) 07-12 14:05:24.878 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 6, eventCount: 0, sticky: true] 07-12 14:05:25.068 DEBUG [AbstractService f] ⚙️︎ ActivityRecognitionService.stopSelfResult(2): true 07-12 14:05:25.069 DEBUG [AbstractService onDestroy] 🔴 ActivityRecognitionService stopped 07-12 14:05:28.919 DEBUG [LifecycleManager onPause] ☯️ onPause 07-12 14:05:31.898 DEBUG [LifecycleManager onStop] ☯️ onStop 07-12 14:05:31.926 INFO [TSScheduleManager oneShot] ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588) 07-12 14:05:35.458 DEBUG [LifecycleManager onStart] ☯️ onStart 07-12 14:05:35.464 INFO [TSScheduleManager cancelOneShot] ⏰ Cancel OneShot: TERMINATE_EVENT 07-12 14:05:35.490 DEBUG [LifecycleManager onResume] ☯️ onResume 07-12 14:07:24.467 DEBUG [LifecycleManager onPause] ☯️ onPause 07-12 14:07:26.851 DEBUG [LifecycleManager onStop] ☯️ onStop 07-12 14:07:26.869 INFO [TSScheduleManager oneShot] ⏰ Scheduled OneShot: TERMINATE_EVENT in 10000ms (jobID: -1708771588) 07-12 14:07:36.892 INFO [ScheduleEvent a] ╔═════════════════════════════════════════════ ║ ⏰ OneShot event fired: TERMINATE_EVENT ╠═════════════════════════════════════════════ 07-12 14:07:36.894 DEBUG [TerminateEvent$a onChange] ℹ️ TERMINATE_EVENT ignored (MainActivity is still active). 07-12 14:07:40.220 DEBUG [LifecycleManager onStart] ☯️ onStart 07-12 14:07:40.247 DEBUG [LifecycleManager onResume] ☯️ onResume 07-12 14:09:45.031 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [desiredAccuracy, disableStopDetection, extras, notification, notification.title, notification.text, notification.priority] 07-12 14:09:45.043 INFO [TSLocationManager d] 🔴 Location-services: OFF 07-12 14:09:45.046 INFO [TSLocationManager requestLocationUpdates] 🎾 Location-services: ON 07-12 14:09:45.047 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -2 07-12 14:09:45.109 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:09:45.147 INFO [TSScheduleManager cancelOneShot] ⏰ Cancel OneShot: STOP_TIMEOUT 07-12 14:09:45.163 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 0) ╠═════════════════════════════════════════════ 07-12 14:09:45.167 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [isMoving] 07-12 14:09:45.194 INFO [TSLocationManager d] 🔴 Location-services: OFF 07-12 14:09:45.196 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [extras] 07-12 14:09:45.197 DEBUG [TSLocationManager a] ℹ️ Clear last odometer location 07-12 14:09:45.202 DEBUG [TSGeofenceManager c] 🔴 Stop monitoring geofences 07-12 14:09:45.202 INFO [ActivityRecognitionService stop] 🔴 Stop motion-activity updates 07-12 14:09:45.206 INFO [HeartbeatService stop] 🔴 Stop heartbeat 07-12 14:09:45.210 DEBUG [HttpService stopMonitoringConnectivityChanges] 🔴 Stop monitoring connectivity changes 07-12 14:09:45.215 DEBUG [DeviceSettings stopMonitoringPowerSaveChanges] 🔴 Stop monitoring powersave changes 07-12 14:09:45.235 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 0) ╠═════════════════════════════════════════════ 07-12 14:09:45.253 DEBUG [TSLocationManager a] ℹ️ Clear last odometer location 07-12 14:09:45.255 DEBUG [TSGeofenceManager c] 🔴 Stop monitoring geofences 07-12 14:09:45.255 INFO [ActivityRecognitionService stop] 🔴 Stop motion-activity updates 07-12 14:09:45.262 INFO [HeartbeatService stop] 🔴 Stop heartbeat 07-12 14:09:45.263 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:09:45.265 DEBUG [HttpService stopMonitoringConnectivityChanges] 🔴 Stop monitoring connectivity changes 07-12 14:09:45.267 DEBUG [AbstractService b] 🎾 STOP [TrackingService startId: 7, eventCount: 1] 07-12 14:09:45.268 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 7, eventCount: 0, sticky: false] 07-12 14:09:45.305 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:09:45.308 WARN [AbstractService a] ⚠️ Refusing to start TrackingService, enabled: false 07-12 14:09:45.309 DEBUG [AbstractService b] 🎾 STOP [TrackingService startId: 8, eventCount: 1] 07-12 14:09:45.309 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 8, eventCount: 0, sticky: false] 07-12 14:09:45.316 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:09:45.319 DEBUG [AbstractService b] 🎾 STOP [TrackingService startId: 9, eventCount: 1] 07-12 14:09:45.320 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 9, eventCount: 0, sticky: false] 07-12 14:09:45.529 DEBUG [AbstractService f] ⚙️︎ TrackingService.stopSelfResult(9): true 07-12 14:09:45.530 DEBUG [AbstractService onDestroy] 🔴 TrackingService stopped 07-12 14:09:58.715 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [desiredAccuracy, extras, foregroundService, notification, notification.text, notification.priority] 07-12 14:09:58.749 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 0) ╠═════════════════════════════════════════════ 07-12 14:09:58.781 WARN [BackgroundGeolocationModule ready] ⚠️ #ready already called. Redirecting to #setConfig 07-12 14:09:58.784 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [extras] 07-12 14:09:58.799 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 0) ╠═════════════════════════════════════════════ 07-12 14:09:58.805 DEBUG [LocationAuthorization withBackgroundPermission] ℹ️ LocationAuthorization: Permission granted 07-12 14:09:58.819 INFO [TSGeofenceManager start] 🎾 Start monitoring geofences 07-12 14:09:58.821 DEBUG [HttpService startMonitoringConnectivityChanges] 🎾 Start monitoring connectivity changes 07-12 14:09:58.835 DEBUG [DeviceSettings startMonitoringPowerSaveChanges] 🎾 Start monitoring powersave changes 07-12 14:09:58.838 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 07-12 14:09:58.846 INFO [HeartbeatService stop] 🔴 Stop heartbeat 07-12 14:09:58.849 INFO [TrackingService changePace] 🔵 setPace: false → false 07-12 14:09:58.852 DEBUG [HttpService a] ╔═════════════════════════════════════════════ ║ 📶 Connectivity change: connected? true ╠═════════════════════════════════════════════ 07-12 14:09:58.857 DEBUG [TSConfig e] ℹ️ Persist config, dirty: [isMoving] 07-12 14:09:58.873 INFO [HeartbeatService stop] 🔴 Stop heartbeat 07-12 14:09:58.882 INFO [TrackingService changePace] 🔵 setPace: false → true 07-12 14:09:58.884 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:09:58.893 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:09:58.897 DEBUG [AbstractService a] 🎾 motionchange [TrackingService startId: 1, eventCount: 1] 07-12 14:09:58.899 INFO [TrackingService k] ╔═════════════════════════════════════════════ ║ TrackingService motionchange: true ╠═════════════════════════════════════════════ 07-12 14:09:58.900 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 1, eventCount: 0, sticky: true] 07-12 14:09:58.927 WARN [TSLocationManager onSingleLocationResult] ℹ️ Failed to find SingleLocationRequest. Request ignored. 07-12 14:09:58.962 INFO [TSLocationManager a] ╔═════════════════════════════════════════════ ║ motionchange LocationResult: 5 (13860ms old) ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46.806209,-71.243903 hAcc=10.379 et=+5d2h16m47s780ms alt=-4.1246337890625 vAcc=5.382745 vel=0.010372565 sAcc=0.17204651 {Bundle[{}]}], time: 1720807785070 07-12 14:09:58.968 INFO [TSLocationManager onSingleLocationResult] 🔵 Acquired motionchange position, isMoving: true 07-12 14:09:58.969 DEBUG [TSLocationManager a] Median accuracy: 100.0 07-12 14:09:59.001 INFO [TSLocationManager requestLocationUpdates] 🎾 Location-services: ON 07-12 14:09:59.002 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 07-12 14:09:59.008 INFO [ActivityRecognitionService start] 🎾 Start motion-activity updates 07-12 14:09:59.009 INFO [SQLiteLocationDAO persist] ✅ INSERT: 44465552-5237-41b2-9c9e-de3c0c333d57 07-12 14:09:59.013 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 1) ╠═════════════════════════════════════════════ 07-12 14:09:59.176 DEBUG [TSLocationManagerActivity a] locationsettings 07-12 14:09:59.177 DEBUG [TSConfig translateDesiredAccuracy] translateDesiredAccuracy (true): -1 07-12 14:09:59.272 DEBUG [TSLocationManagerActivity c] eventCount: 0 07-12 14:09:59.323 INFO [BackgroundTaskManager$Task start] ⏳ startBackgroundTask: 2 07-12 14:09:59.369 DEBUG [SQLiteLocationDAO allWithLocking] ✅ Locked 1 records 07-12 14:09:59.370 INFO [HttpService a] 🔵 HTTP POST batch (1) 07-12 14:09:59.424 DEBUG [TSLocationManagerActivity onDestroy] 07-12 14:09:59.561 INFO [HttpService$f onResponse] 🔵 Response: 200 07-12 14:09:59.563 DEBUG [SQLiteLocationDAO destroyAll] ✅ DELETED: (1) 07-12 14:09:59.567 DEBUG [SQLiteLocationDAO allWithLocking] ✅ Locked 0 records 07-12 14:09:59.568 INFO [BackgroundTaskManager$Task stop] ⏳ stopBackgroundTask: 2 07-12 14:09:59.864 INFO [HttpService flush] ╔═════════════════════════════════════════════ ║ HTTP Service (count: 0) ╠═════════════════════════════════════════════ 07-12 14:10:04.119 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:10:04.137 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:10:04.145 DEBUG [AbstractService a] 🎾 start [ActivityRecognitionService startId: 1, eventCount: 1] 07-12 14:10:04.147 DEBUG [ActivityRecognitionService a] 🚘 ️DetectedActivity [type=STILL, confidence=99] 07-12 14:10:04.155 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 1, eventCount: 0, sticky: false] 07-12 14:10:04.211 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:10:04.214 DEBUG [AbstractService a] 🎾 start [ActivityRecognitionService startId: 2, eventCount: 1] 07-12 14:10:04.216 DEBUG [ActivityRecognitionService a] *** wasMoving: true, nowMoving: false, startedMoving: false, justStopped; true 07-12 14:10:04.217 INFO [ActivityRecognitionService a] ╔═════════════════════════════════════════════ ║ Motion Transition Result ╠═════════════════════════════════════════════ ╟─ 🎾 ENTER: still ╚═════════════════════════════════════════════ 07-12 14:10:04.218 DEBUG [AbstractService a] ⚙️︎ FINISH [ActivityRecognitionService startId: 2, eventCount: 0, sticky: false] 07-12 14:10:04.421 DEBUG [AbstractService f] ⚙️︎ ActivityRecognitionService.stopSelfResult(2): true 07-12 14:10:04.423 DEBUG [AbstractService onDestroy] 🔴 ActivityRecognitionService stopped 07-12 14:10:23.156 WARN [ForegroundNotification b] Failed to find notificationLargeIcon: mipmap-xxxhdpi/ic_launcher 07-12 14:10:23.164 DEBUG [AbstractService a] 🎾 start [TrackingService startId: 2, eventCount: 1] 07-12 14:10:23.171 DEBUG [TrackingService c] ╔═════════════════════════════════════════════ ║ TrackingService: LocationResult ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 46.806209,-71.243902 hAcc=13.175 et=+5d2h17m3s779ms alt=-4.1053466796875 vAcc=10.791319 vel=0.0 sAcc=0.20615529 {Bundle[{}]}] ╟─ Age: 22098ms, time: 1720807801070 07-12 14:10:23.174 DEBUG [TSLocationManager onLocationResult] ╔═════════════════════════════════════════════ ║ Process LocationResult ╠═════════════════════════════════════════════ 07-12 14:10:23.174 DEBUG [AbstractService a] ⚙️︎ FINISH [TrackingService startId: 2, eventCount: 0, sticky: true] 07-12 14:10:23.177 DEBUG [TSLocationManager a] Median accuracy: 58.4115 07-12 14:10:23.201 INFO [SQLiteLocationDAO persist] ✅ INSERT: 4861b4df-5df5-4054-857c-ad2e9c7eb9c6 ```
christocracy commented 4 months ago

The plug-in is certainly receiving responses from your server but the received payload must not be what you expect. I suggest you closely check your server code is returning the required response.

07-12 14:05:22.767 INFO [HttpService$f onResponse] 🔵 Response: 200

bertrandgelinas commented 4 months ago

got it.. I used .json instead of send. Thanks