Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device mysteriously stops uploading location #612

Closed
bengtan opened this issue Nov 14, 2018 · 8 comments
Closed

Device mysteriously stops uploading location #612

bengtan opened this issue Nov 14, 2018 · 8 comments

Comments

@bengtan
Copy link

bengtan commented Nov 14, 2018

Preamble

We use your library in our iOS app, with the intention of releasing an Android version early next year.

This is a problem that we've encountered from time to time. It happens only occasionally, and we don't yet understand it enough to be able to reproduce it on demand. Hence, please consider this as an information gathering exercise to start with.

Environment

  • Plugin version: 2.13.4
  • Platform: iOS
  • OS version: 12.0.1 TBC [1]
  • Device manufacturer / model: iPhone 6s Plus TBC [1]
  • React Native version: 0.55.4
  • Plugin config: See log

[1] I don't have this info handy at the moment, but I'll get it from our field tester in the next day or so.

Context

We're testing, evaluating, and fine-tuning the configuration and behaviour of your library. This involves a field tester driving around a few times a day, and then we examine the location data that is uploaded to our server.

In this particular case, the library has been uploading data (as expected) fine. Then, mysteriously, it stops uploading. After about 24 hours (of non-uploading), we opened the app (which results in a new burst of 5 or so data points) and retrieved the log.

Expected Behavior

We expect that location continues to be uploaded when the field tester drives around.

Actual Behavior

  1. The library stops uploading for about 24 hours. It uploads briefly when we open the app to retrieve the log. It's unknown whether it resumes the expected uploading of location data (since, as of writing, not enough time has elapsed yet).

  2. I have noticed that, just before the 24 hours of non-uploading commences, there were about 10-20 data points that were uploaded to our server but they do not appear in the log. I don't know whether this is related or coincidental.

  3. logMaxDays is 3, but the log shows 7 days of data. I don't know whether this is important or not.

Steps to Reproduce

Unknown. It's been working fine, and then stops working and we don't have any clues (yet) why.

Debug logs

I'd like to privately email you the log. It's about 25 Mb in size (1.5 Mb compressed).

I'd like to also send you a screenshot from our database. There, you can see the data points on our server which are missing from the log.

Discussion

Once you've received the email and the log, I can start pointing you to specific anomalies. That will make discussion much easier.

Also, if warranted, we may request for commercial support.

At this moment, I'm not necessarily saying there's a bug. Please consider this to be at an information gathering stage for now.

Thanks.

@christocracy
Copy link
Member

I await your logs.

@bengtan
Copy link
Author

bengtan commented Nov 14, 2018

I've emailed you logs and a database screenshot.

The logs are in Central Standard Time. The screenshot is UTC.

The data points which are in the database but are missing from the log are those from (but not including) 2ECB3100-B8DF-4CDD-8C85-60AADDE871DD to 1083093C-9AF6-45BA-A95C-B219DA210FFB.

The 24-ish hours of 'non-uploading' are from 2018-11-13 01:31:44 to 2018-11-14 00:32:37 (UTC).

There are lot of [TSDBLogger db_delete] maxAge: 604800 and [TSDBLogger db_save] Log committed messages during that time.

The obvious first thing to consider (or rule out) is ... is it because we've been using VERBOSE logging for too long, and there's some sort of database limit or log overflow?

@bengtan
Copy link
Author

bengtan commented Nov 15, 2018

Add:

OS version: 12.0.1
Device manufacturer / model: iPhone 6s Plus

@christocracy
Copy link
Member

It looks like you're failing to call #ready. You must call #ready every time your app boots..

And Note: your app can and will be launched in the background by the operating system.

@bengtan
Copy link
Author

bengtan commented Nov 16, 2018

Hi,

Thanks for this. I'm gonna check through our app logic regarding the ready() call.

I do have some questions in the meantime though ...

What parts of the log lead you to the conclusion that ready() wasn't always called?

If I know your logic, and learn how to interpret the log myself, I don't have to bother you as much.

@christocracy
Copy link
Member

christocracy commented Nov 16, 2018

When the app boots, the plugin first prints its state, followed by requesting location permission.

Once ready is called, the #start method is called, which requests location.

If #ready is not called, everything is silent after permissions requests. No location is requested.

@bengtan
Copy link
Author

bengtan commented Nov 20, 2018

Hi,

Thanks for the info. I've been able to reproduce this on demand now.

In order not to clutter your issues queue, I'm going to close this ticket and hopefully won't need to re-open it later.

Thanks.

@christocracy
Copy link
Member

The plugin has no idea when your react app is set up and ready to go. It relies upon you telling it “I’m ready”. Until you do so, the plugin is waiting and will not engage tracking. If it didn’t wait for you, it would start firing events in the milliseconds before the React Native app is rendered and booted.

@bengtan bengtan closed this as completed Nov 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants