cds-snc/covid-alert-app

Large time gaps between exposure checks

csavard-sudo opened this issue · 17 comments

Summary | Résumé

App did not check for exposures for a whole week on two separate occasions between Dec 11-18 and Dec 2-9. My phone is on 99.9% of the time, with internet access and Bluetooth has consistently been on. Exposure logs attached.
all-exposure-checks.json.txt

Steps to reproduce | Étapes à reproduire

I did not open the app on a regular basis because I did not expect to be required to do so - as the documentation assured that it would not be necessary.

Environment | Environnement logiciel

Google Pixel 3a, COVID Alert 1.1.3, Android 11.

Unresolved questions / Out of scope | Questions non résolues ou hors sujet

Are there any related issues you consider out of scope for this issue that could be addressed in the future?

It would be useful to know if your device has recorded any keys.... how am I to know that my device was recording anything during those time gaps.

UI should be made to expose the time since last log check or at least flag that the log is stale after a missed cycle (12 hours?) Not everyone is always online.

Hi @csavard-sudo

It's possible your app has ended up in the RARE bucket https://developer.android.com/topic/performance/appstandby#rare-bucket

We pushed out an update today should correct what your seeing.

Screen Shot 2020-12-18 at 3 41 11 PM

UI should be made to expose the time since last log check or at least flag that the log is stale after a missed cycle (12 hours?) Not everyone is always online.

I've noticed that it checks whenever you open the app and have internet access (provided it hasn't already checked recently).

Hi @csavard-sudo

It's possible your app has ended up in the RARE bucket https://developer.android.com/topic/performance/appstandby#rare-bucket

We pushed out an update today should correct what your seeing.

Perhaps, but it still says on https://developer.android.com/topic/performance/power/power-details that jobs are "deferred up to 24 hours" which would be completely reasonable in this case. That doesn't appear to be happening - at least with the previous version. I have since updated.

Happy to help out with testing anyway I can.

Thanks for updating please let me know if this corrects the issue your seeing.

UI should be made to expose the time since last log check or at least flag that the log is stale after a missed cycle (12 hours?) Not everyone is always online.

I've noticed that it checks whenever you open the app and have internet access (provided it hasn't already checked recently).

But how does the app show the user when it has checked? As far as I can see the user has no way of knowing if the check ran recently, or ever.

@csavard-sudo

It would be useful to know if your device has recorded any keys.... how am I to know that my device was recording anything during those time gaps.

Key Management is handled by the device at the OS / Exposure Notification framework level. Seeing gaps doesn't mean your app isn't exchanging keys with other devices. When checks resume it's very possible you will see multiple checks for the same time period which is the apps way of reaching back to check the keys from precious tine periods.

Details from Google

https://developers.google.com/android/exposure-notifications/exposure-notifications-api

The complete list of the parts of the system that Google Play services handles is as follows:

Management of daily random keys:

Generates daily random Temporary Exposure Keys and Rotating Proximity Identifiers (RPIs) based on them.

@LeadSongDog

But how does the app show the user when it has checked? As far as I can see the user has no way of knowing if the check ran recently, or ever.

The app used to show a last checked timestamp but it was removed as it was causing confusion given the way the app used to check every time the app was opened.

The way the app checks has since been altered as you mentioned i.e: provided it hasn't already checked recently

It's quite likely we'll bring back some sort of timestamp i.e. Last Checked into the app - it's been discussed but has fallen behind other app priorities i.e. bringing the app to 12.5 on iOS.

But how does the app show the user when it has checked? As far as I can see the user has no way of knowing if the check ran recently, or ever.

There's nothing visually in the app at the moment - the only way at the moment is checking the logs under settings.

Thanks for updating please let me know if this corrects the issue your seeing.

Still hasn't checked for exposures since Dec 18. I've gone ahead and relaunched the app and of course it did upon launch. I had even previously gone into "Battery optimization" and selected "don't optimize" for COVID Alert allowing the app to use background battery with no restrictions.

@timarney On iOS there doesn’t seem to be a way of even seeing the logs, neither in the system settings entry for the app
5E469671-74D6-451E-A936-AAF3E50004E4
nor within the app’s settings
2CC66F48-5F80-4711-8FD3-5DF4B38636DD
09B4E5A7-409D-4ED9-B3B7-13F3642905F4

@timarney On iOS there doesn’t seem to be a way of even seeing the logs, neither in the system settings entry for the app

@LeadSongDog this appears to be a separate issue not directly related to this.

I don't have an iPhone, that said, it looks like you need to go to Settings > Privacy > Health > COVID-19 Exposure Logging > Exposure checks see image for reference

@timarney Wow, thanks, I never would have found that. It’s obscure in more ways than one! A separate system settings entry just for Exposure Notifications, distinct from the system settings for the COVID Alert app. Application help which is located on a external flat web page instead of in the app and which is pertinent to all platform versions, rather than tailored just to the relevant one for the user.

No checks happened since Dec 24. Opened the app, then it did 8 exposure checks. I'm running the latest version of the app.

Thanks for the update @csavard-sudo

@jeberhardt at the device level any suggestions for settings or phone optimizations to look at.

I know we had a case reported that the app was found under Sleeping apps

I also followed up with the support team and there are a few other tickets around this issue.

@csavard-sudo for tracking purposes can you please confirm

  1. "latest version" - you're currently running 1.1.5 correct?

  2. After the (8 checks when you opened the app) you're still not seeing regular checks (multiple checks per day)?

  3. If you possibly have Developer Options turned on what do you see you under Standby apps for Covid Alert?

@timarney

  1. yes
  2. It had not checked since December 24, so I opened the app yesterday and now Google shows 8 exposure checks on Dec 30.
  3. I exempted the app from App Standby Bucket-based restrictions.

As of Dec 30 it now appears to be checking multiple times daily. Looks like this is resolved for now. Will monitor.