cwa-app-android
cwa-app-android copied to clipboard
Background Update 'risk status' not working anymore on Android
Avoid duplicates
- [X] Bug is not mentioned in the FAQ
- [X] Bug is specific for Android only, for general issues / questions that apply to iOS and Android please raise them in the documentation repository
- [X] Bug is not already reported in another issue
Technical details
- Device name: Motorola Moto
- Android version: 8.1.0
- App version: 2.15.1
Describe the bug
Background App Refresh has not been working for over a week. The app does not update the risk status anymore. "Prioritized Background Activity" is enabled in settings. App has been closed and reopened several times.
Steps to reproduce the issue
I tried to reproduce this behavior with two different Motorola smartphones, but failed to do so.
Expected behaviour
The app should automatically update the risk status after 24h.
Possible Fix
- On app startup check if the risk status is older than 24h. If yes, update the risk status.
- When the user swipes to the bottom on the status panel, update the risk status as long as the last update was at least a few minutes/hours ago.
- Create a button to manually initiated an update of the risk status. UX: The button should only be visible if the last update is older than 24h.
You mean the app is also not updating if it's in foreground?
@lukas-wresch Thanks for the report. Could send a screenshot from the status tab of the app, please? Thanks, DS
Corona-Warn-App Open Source Team
I didn't understand:
I tried to reproduce this behavior with two different Motorola smartphones, but failed to do so.
Same error on two Motorola phones?
Regardless: Has the smartphone been restarted to test this error?
Same here. CWA version 2.16.2 last update of risk status was on 18.1. (today 30.1.) App does not update even when in foreground. All energy and background settings checked. Device rebooted, nothing helps.
Incidence Information is up to date.
Same here. CWA version 2.16.2 last update of risk status was on 18.1. (today 30.1.) App does not update even when in foreground. All energy and background settings checked. Device rebooted, nothing helps.
Incidence Information is up to date.
@grussy
It seems like you are experiencing #4472.
The reason for the "stuck" background update is most likely a mixture of these factors:
- extraordinary high numbers of infections across Europe, hence many people uploading their DiagnosisKeys, hence huge packages
- old device that needs some time to process downloading of DiagnosisKeys for matching, getting DiagnosisKeys files copied to Google Play Services, validation of DK packages' signatures and the matching itself
which will lead to timeouts in different steps of the processes. When the OS kills the CWA thread before another attempt can be started, then the whole process begins from start the next time the watchdog wakes up CWA.
What could be checked is, whether the logic of the download/ENF provision process could be changed to reduce the amount of DK packages that are processed, like suggested here: https://github.com/corona-warn-app/cwa-app-android/issues/4732#issuecomment-1021095635 (if possible, download and submit only the last hourly DK package to ENS. Log which packages have been downloaded and submitted already. Don't rely on available packages in cache directory as they can be purged when OS needs space, and they have already been matched)
@dsarkar The FAQ could be extended about the possibility that the current number of warnings may lead to timeouts on old phones making matching impossible for some time. The Google Play Store support team still adivises measures like checking for prioritized background activity, which doesn't help in this case or is not enough respectively. Optimally, a second sentence could be added: "The developers are investigating and are working on a fix with high effort"...
@thomasaugsten in a different issue you offered to have a look to the timeouts. While the timeout for the download task may be adapted, I'm not sure whether this is possible for the timeout of GMS - I understood it's fixed to 120s by Google... If it's somehow possible to circumvent it, would be good. But I think, reducing the number of provided packages will have the best effect (if this is possible).
I just noticed that I ran into the same issue. I opened CWA, I saw a spinning circle and a message stating that the risk status was being updated. After a few seconds the circle and the message disappeared, but the last update date was 2022-01-10 (3 weeks ago!).
I rebooted the phone as I read on the internet that this could help. CWA still showed 2022-01-10. I went to "Einstellungen > Google > COVID-19 Benachrichtigungen > Drei-Punkte Symbol > Überprüfung" but "Überprüfung" was greyed out. I searched the internet, found this bug report, looked at my phone again and now it's no longer greyed out. I can see that 3,3 Mio. IDs have been downloaded a few minutes ago.
Whatever the reason was:
CWA should display a warning if the last update date is older than X days or if download failed more than Y times.
I didn't notice the old date for more than 3 weeks!
We assume that "delta keys change"
did fix this issue.
PR https://github.com/corona-warn-app/cwa-app-android/pull/4929