Closed doniyor2109 closed 6 years ago
Have you tried this in the iOS simulator? Are you overerving logs.
Yes, it does work. Youβre doing something wrong.
+1
Logs
I have tested it on Iphone 6 device also. I realized that I did not turned on Background permission to Always in Iphone settings. But when I did that it started to track but it does not track all location that phone is moved. I have attached track image in our app. It tracks correctly but you can see from image, the location between 16:14 and 16:23 is not tracked.
Your battery is below 50%. Your OS may have engaged power management, disabling some services.
Check your power management settings:
But as you can see from attached images battery percentages 6700% means(67%) and 6800% means (68%)
Battery: 44%
There's really little to speculate about with images alone. You need to provide corresponding logs.
The image shows the history of location of another phone from my application. How can I get logs for you?
See the Wiki Debugging
I have used emailLog method and this is the mailed log
I used emailLog method and this is the mailed log
What particular time are interested in from that log?
This log is taken from android device. My phone. Today 08.11.2017, is not tracked yet.
I am interested for Today
Is there a problem which occurred within that log?
I could not understand logs and could not find the problem
What time in the logs corresponds to the time period where you experienced a tracking problem?
From 13:00 until 22:00
Why are you still configuring this:
"params": {
"auth_token": "maybe_your_server_authenticates_via_token_YES?"
},
"headers": {
"X-FOO": "bar"
},
Those are just supposed to be example data. You not actually supposed to use that.
Yes, the application is not fully on production that is why I have not refactored yet
You have 3 days worth of logs here. 13:00-22:00
on which day?
For 08.11.2017
11-08 13:41:05.362 INFO [HttpService createRequest]
π΅ HTTP POST batch (2)
11-08 13:40:43.373 WARN [HttpService$a onFailure]
β οΈ Response: 0, Hostname kasper.uz not verified:
certificate: sha256/rmLuC7tdCPlarTlIURLZKijzNi0dVp4UcylyWqmwRLs=
DN: CN=*.wiut.uz,OU=Domain Control Validated
subjectAltNames: [*.wiut.uz, wiut.uz]
.
.
.
11-08 13:43:01.501 WARN [HttpService$a onFailure]
β οΈ Response: 0, failed to connect to kasper.uz/83.69.138.253 (port 443) after 10000ms: isConnected failed: ETIMEDOUT (Connection timed out)
.
.
.
11-08 13:43:50.925 WARN [SingleLocationRequest finish]
β οΈ timeout: 1002
11-08 13:43:51.038 WARN [TSLocationManager onLocationTimeout]
β οΈ TSLocationManager received location timeout
11-08 13:43:51.106 WARN [BackgroundGeolocation _onLocationError]
β οΈ Location error: 408
.
.
.
11-08 13:45:22.975 WARN [SingleLocationRequest finish]
β οΈ timeout: 1003
11-08 13:45:23.054 WARN [TSLocationManager onLocationTimeout]
β οΈ TSLocationManager received location timeout
11-08 13:45:23.184 WARN [BackgroundGeolocation _onLocationError]
β οΈ Location error: 408
.
.
.
11-08 13:51:00.925 WARN [HttpService$a onFailure]
β οΈ Response: 0, Unable to resolve host "kasper.uz": No address associated with hostname
Yes, I went to study and connected to their wifi. Their proxy did not allow to access our domain.
And mysteriously, it looks like the OS decided to terminate the background-service:
11-08 14:10:04.667 WARN [LocationService onHandleIntent]
β οΈ LocationService found nobody to talk to. Stopping...
What do you think, why it could happen?
Memory pressure from other apps.
I have used only one application during that time. It was for chatting only. I have 2 GB RAM in my phone. It takes 300 MB of memory. There was 400 MB memory free.
What do you advice in this situation. App should track all movement of phone otherwise our clients do not use this app
I suggest you build the SampleApp onto this device and attempt to reproduce the problem with my code on your device.
I did not understand: why my code on your device?
Just go here and build my sample app onto your device and attempt to reproduce the problem.
I have built demo application as you told and tested today from home to work. I have installed it yesterday at night. I left home about 11:00 and arrived about 11:56 to work. As you can see through my history it did not track location between my home and work. It started tracking when I turned on internet and opened your demo application. I have posted link for my phone's bg-console. http://bg-console.herokuapp.com/1d69e670?device=ReactNative-392d2acea5650bfb&end=2017-11-9&start=2017-11-9%202%3A30
send me the corresponding logs from SampleApp.
How can I get logs from demo app?
See settings screen. There's an [Email Log] button along with text input for email address.
I just got my logs from demo app. Here are they background-geolocation (1).log.gz
Try installing on another device. I think your issues are device-specific.
Hello We have tested your library on other phones recently. It works on IOS devices but it does not track sometimes however it does not work on android devices. We have installed our application to 3 android phones. They are Huawei CUN-U29, Samsung Galaxy J3 and Samsung GT 9192. their configuration were same as mentioned above. When devices are moved for longer distance, no request is coming to our server. I think the issues is not device specific.
Is there any difference with private and public library. We have used public library with licence key.
The private version is merely latest updates.
Yes all phones had "High Accuracy" mode. Here are their logs: Samsung-I9192-background-geolocation.log.gz Samsung-Galaxy-J3-background-geolocation.log.gz Xiomi-background-geolocation.log.gz Huawei-background-geolocation.log.gz
Your logs show the plugin isn't even enabled. Of course that one didn't record locations
ββββββββββββββββββββββββββββββββββββββββββββββ
β DEVICE SENSORS
β βββββββββββββββββββββββββββββββββββββββββββββ
ββ β
ACCELEROMETER: {Sensor name="BMA254 Acceleration Sensor", vendor="Bosch Sensortec", version=1, type=1, maxRange=39.2266, resolution=0.019153614, power=0.13, minDelay=10000}
ββ β οΈ GYROSCOPE: none. Motion-detection system performance will be degraded
ββ β οΈ MAGNETOMETER: none. Motion-detection system performance will be degraded
ββ β οΈ SIGNIFICANT_MOTION: none. Motion-detection system performance will be degraded
ββββββββββββββββββββββββββββββββββββββββββββββ
It does finally detect the device is in motion at:
11-20 19:24:20.637 DEBUG [BackgroundGeolocationService onActivityRecognitionResult] on_foot (94%)
11-20 19:24:26.186 DEBUG [BackgroundGeolocation isMainActivityActive] NO
11-20 19:24:26.202 INFO [BackgroundGeolocationService a]
π΅ setPace: false β true
But when it does, HTTP Failures:
- HTTP Response failuers
11-20 19:24:27.598 WARN [HttpService$a onFailure] β οΈ Response: 0, Unable to resolve host "kasper.uz": No address associated with hostname
### Xiomi
- Better sensors on this device:
ββββββββββββββββββββββββββββββββββββββββββββββ β DEVICE SENSORS β βββββββββββββββββββββββββββββββββββββββββββββ ββ β ACCELEROMETER: {Sensor name="LSM6DS3 Accelerometer", vendor="STMicroelectronics", version=1, type=1, maxRange=39.22661, resolution=0.0023956299, power=0.9, minDelay=5000} ββ β GYROSCOPE: {Sensor name="LSM6DS3 Gyroscope", vendor="STMicroelectronics", version=1, type=4, maxRange=34.906586, resolution=0.0012207031, power=0.9, minDelay=5000} ββ β MAGNETOMETER: {Sensor name="YAS537 Magnetometer", vendor="Yamaha", version=35193090, type=2, maxRange=2000.0, resolution=0.30059814, power=0.28, minDelay=10000} ββ β SIGNIFICANT_MOTION: {Sensor name="Significant Motion Detector", vendor="QTI", version=2, type=17, maxRange=1.0, resolution=1.0, power=0.8999939, minDelay=-1} ββββββββββββββββββββββββββββββββββββββββββββββ
- However, this device isn't detected to be moving *at all* though out the entire log, eg:
11-19 22:18:54.605 DEBUG [BackgroundGeolocationService onActivityRecognitionResult] still (90%)
### Huawei
- Cheap device. Missing *Gyroscope* and *Significant Motion* sensors:
ββββββββββββββββββββββββββββββββββββββββββββββ β DEVICE SENSORS β βββββββββββββββββββββββββββββββββββββββββββββ ββ β ACCELEROMETER: {Sensor name="ACCELEROMETER", vendor="MTK", version=3, type=1, maxRange=32.0, resolution=0.00390625, power=0.13, minDelay=10000} ββ β οΈ GYROSCOPE: none. Motion-detection system performance will be degraded ββ β MAGNETOMETER: {Sensor name="MAGNETOMETER", vendor="MTK", version=3, type=2, maxRange=600.0, resolution=0.0016667, power=0.25, minDelay=100000} ββ β οΈ SIGNIFICANT_MOTION: none. Motion-detection system performance will be degraded ββββββββββββββββββββββββββββββββββββββββββββββ
- This device isn't moving either:
11-20 17:29:59.531 DEBUG [BackgroundGeolocationService onActivityRecognitionResult] still (100%)
You know the plugin doesn't record locations until the device is detected to be *moving*, right?
Right Here is log which I have moved my device background-geolocation.log.gz
You have 3 days of logs in that file. What particular time interval are you interested in?
I have walked for 3 days. You can choose any of them
I see plenty of happy tracking there.
Let me know what time interval you're interested in.
Let's test today, from 9am untill now
Our server received only 4 requests between 23:00 and 23:50. It sent locations only when I opened application
Your Environment
react-native -v
): 0.44.2Expected Behavior
After closing app and removing it from recently tasks, app should send location information after moving 100 meters.
Actual Behavior
Phone does not send any location information after moving 100 meters.
Steps to Reproduce
Context
Debug logs