e-mission / e-mission-docs

Repository for docs and issues. If you need help, please file an issue here. Public conversations are better for open source projects than private email.
https://e-mission.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
15 stars 34 forks source link

Redmi phones are not uploading data to the server #412

Open deepalics0044 opened 5 years ago

deepalics0044 commented 5 years ago

I pulled the recent mode and purpose changes from master and build a new version of Logtrip( our application). The test works fine in my phone (OnePlus 6) I see the trips as well as mode and purpose in timeseries but one of the intern's trip in Cistup don't show up in the timeseries.

FYI he uses Xiaomi Redmi Note 5 Pro, Operating System | Android Nougat 7.1.2

Now he updated to Android 9.

shankari commented 5 years ago

Can he try the workarounds listed here: http://nine-faq.9folders.com/articles/8771-how-to-turn-off-background-restriction-on-the-xiaomi-devices and here: https://www.quora.com/How-do-I-keep-an-app-running-in-the-background-in-MIUI

shankari commented 5 years ago

Unfortunately, the Xiaomi has not been historically available in the US and I am not sure it is available now, so I have not tested with it. https://www.gsmarena.com/xiaomi_redmi_note_5a_prime_certified_in_the_us-news-27522.php

shankari commented 5 years ago

@deepalics0044 any updates on this? once I get confirmation from you, I will create a page in the docs repository.

deepalics0044 commented 5 years ago

I can't see cleaned trips from Redmi users that's for sure. 10-15 people whose cleaned trips I can't see have REDMI phone. I am still testing 2 redmi phones by setting battery to no restrictions. Hopefully by tomorrow I'll let you know.

On Wed, Jun 12, 2019 at 10:07 PM shankari notifications@github.com wrote:

@deepalics0044 https://github.com/deepalics0044 any updates on this? once I get confirmation from you, I will create a page in the docs repository.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/e-mission/e-mission-docs/issues/412?email_source=notifications&email_token=AJYF4HJ7JBYBNJFRPSW5L4DP2EQ4JA5CNFSM4HWKTU62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXRBKKI#issuecomment-501355817, or mute the thread https://github.com/notifications/unsubscribe-auth/AJYF4HK2ZKOIYFUQMFUNLGTP2EQ4JANCNFSM4HWKTU6Q .

deepalics0044 commented 5 years ago

Screenshot_2019-06-18-15-53-06-577_com miui powerkeeper Even after setting the battery usage to no restrictions and tracking. I can't see trips in timeseries.

deepalics0044 commented 5 years ago

Running the pipeline for that particular user -

deepali@deepali-HP-Pro-3090-Microtower-PC:~/e-mission-server$ ./e-mission-py.bash bin/debug/intake_single_user.py -e rgiitkgp100@gmail.com
storage not configured, falling back to sample, default configuration
Connecting to database URL localhost
nominatim not configured either, place decoding must happen on the client
2019-06-18T15:59:33.358892+05:30**********UUID d2dd2eb0-849f-4857-95f3-a94264848f4a: moving to long term**********
2019-06-18T15:59:33.581907+05:30**********UUID d2dd2eb0-849f-4857-95f3-a94264848f4a: filter accuracy if needed**********
2019-06-18T15:59:33.600074+05:30**********UUID d2dd2eb0-849f-4857-95f3-a94264848f4a: segmenting into trips**********
2019-06-18T15:59:33.653590+05:30**********UUID d2dd2eb0-849f-4857-95f3-a94264848f4a: segmenting into sections**********
2019-06-18T15:59:33.676816+05:30**********UUID d2dd2eb0-849f-4857-95f3-a94264848f4a: smoothing sections**********
2019-06-18T15:59:33.699993+05:30**********UUID d2dd2eb0-849f-4857-95f3-a94264848f4a: cleaning and resampling timeline**********
2019-06-18T15:59:33.730930+05:30**********UUID d2dd2eb0-849f-4857-95f3-a94264848f4a: inferring transportation mode**********
2019-06-18T15:59:33.760476+05:30**********UUID d2dd2eb0-849f-4857-95f3-a94264848f4a: checking active mode trips to autocheck habits**********
2019-06-18T15:59:33.764629+05:30**********UUID d2dd2eb0-849f-4857-95f3-a94264848f4a: storing views to cache**********
deepali@deepali-HP-Pro-3090-Microtower-PC:~/e-mission-server$ 
shankari commented 5 years ago

@deepalics0044 the pipeline console logs don't provide sufficient information; you need to look at the pipeline logs.

Can you follow the troubleshooting steps here? https://github.com/e-mission/e-mission-docs/blob/master/docs/e-mission-server/troubleshooting_tips_FAQ.md#trips-on-the-phone-stay-in-draft-green-background-forever

and here https://github.com/e-mission/e-mission-docs/blob/master/docs/e-mission-phone/troubleshooting_tips_faq.md#reading-the-log-on-your-computer

And put the results in the bug? If those appear to be inconclusive, you can also email me the logs separately, please do not put them in the issue due to privacy concerns.

shankari commented 5 years ago

@deepalics0044 thanks for the emailed logs from Anurag. Unfortunately, they cover a span of ~ 8 seconds corresponding to the installation of the app. This doesn't really provide any information on why uploads were or were not successful. Can you please provide logs from the time period where battery usage was set to "no restrictions and tracking" and the trips were still not uploaded?

Thanks!

0,1561824608.9120002,2019-06-29T21:40:08.912000+05:30,BuiltinUserCache : Added value for key stats/client_nav_event at time 1.561824608889E9
...
84,1561824616.7779999,2019-06-29T21:40:16.778000+05:30,TripDiaryStateMachineService : newState saved in prefManager is local.state.waiting_for_trip_start
shankari commented 5 years ago

@deepalics0044 thanks for sending out more emailed logs. However, they still only cover ~ 11 seconds , again appearing to correspond only to the installation of the app. Again, I need logs from the time period where battery usage was set to "no restrictions and tracking" and the trips were still not uploaded. I thought you had tested this on multiple test phones?

0,1561972620.3439999,2019-07-01T14:47:00.344000+05:30,BuiltinUserCache : Added value for key stats/client_nav_event at time 1.561972620326E9
...
84,1561972631.985,2019-07-01T14:47:11.985000+05:30,TripDiaryStateMachineService : newState saved in prefManager is local.state.waiting_for_trip_start
85,1561972631.986,2019-07-01T14:47:11.986000+05:30,"TripDiaryStateMachineService : after decrement, ongoingOperations = 0"
shankari commented 5 years ago

@deepalics0044 the logs don't tell me anything special - a trip ended at

1434,1562082754.669,2019-07-02T21:22:34.669000+05:30,TripDiaryStateMachineService : newState after handling action is local.state.waiting_for_trip_start
1435,1562082754.681,2019-07-02T21:22:34.681000+05:30,TripDiaryStateMachineService : newState saved in prefManager is local.state.waiting_for_trip_start
1436,1562082754.6820002,2019-07-02T21:22:34.682000+05:30,"TripDiaryStateMachineService : after decrement, ongoingOperations = 0"
1437,1562082754.6820002,2019-07-02T21:22:34.682000+05:30,TripDiaryStateMachineService : About to stop service after handling [local.transition.stopped_moving]
1438,1562082754.685,2019-07-02T21:22:34.685000+05:30,"TripDiaryStateMachineForegroundService : onDestroy called, removing notification"
1439,1562082754.687,2019-07-02T21:22:34.687000+05:30,TripDiaryStateMachineService : About to disconnect the api client
1440,1562082754.689,2019-07-02T21:22:34.689000+05:30,"TripDiaryStateMachineService : Service destroyed. So long, suckers!"
1441,1562082754.69,2019-07-02T21:22:34.690000+05:30,"TripDiaryStateMachineForegroundService : onDestroy called, removing notification"

and the next logs are from few hours later when the app was launched manually.

1442,1562093962.7089999,2019-07-03T00:29:22.709000+05:30,BuiltinUserCache : Added value for key stats/client_nav_event at time 1.562093962703E9
1443,1562093962.711,2019-07-03T00:29:22.711000+05:30,TripDiaryStateMachineRcvr : Comparing installed version 62 with new version 62
1444,1562093962.7120001,2019-07-03T00:29:22.712000+05:30,"TripDiaryStateMachineRcvr : Setup complete, skipping initialize"
shankari commented 5 years ago

next troubleshooting steps:

shankari commented 5 years ago

Anybody else who has a redmi phone and would like to test this (e.g. @hariv's friends 😃 ) can you please use the standard e-mission app instead of logtrip so that I can check the data on the server as well. Please follow the instructions here: https://e-mission.eecs.berkeley.edu/#/client_setup?new_client=interscity&clear_usercache=true&clear_local_storage=true

Once you have installed the app and switched to the channel, please:

I might ask you to perform other steps (e.g. Force Sync) depending on the results.

Once we have resolved this, I am happy to delete your data from the server if that is what you prefer.

Thanks so much for your contributions - if we can resolve the issues with Redmi phones, then IISc will be able to get more data on travel patterns to Electronic City and can hopefully help with better travel planning there.

hariv commented 5 years ago

@ishianka tried running the app, but said that she couldn't see an option to set permission when turning off background restrictions. I've attached a screenshot from her. She only saw what was in the screenshot under background restrictions: e-mission-screenshot

shankari commented 5 years ago

@ishianka thank you so much for this feedback! I checked the server and I have data from you until around Sep 10 IST. Can you confirm that:

  1. you uninstalled the app around Sep 10
  2. you didn't do anything special before then wrt pushing the data (e.g. use Force Sync)

Also, can you let me know which version of Redmi you have? I wonder if this is a setting on a more recent version...

hariv commented 5 years ago

I checked with @ishianka. She had installed the app on September 7th, but has not uninstalled it yet. She did not do anything such as Force Sync to push the data. Version is Redmi Mi A2