-
Notifications
You must be signed in to change notification settings - Fork 497
Background update does not work, CWA 1.9.1 and “prioritized background activity” #933
Comments
I could confirm the issue. Honor 10 (COL-L29) no check 2020/07/24. |
Same issue on bq Aquaris X, Android 8.1.0. Automatic updates worked in Version 1.0.5. |
Same issue on a Samsung Galaxy S10e on Android 10. I reboot the phone every day. I've checked the entries under Settings --> Google --> COVID-19 Notifications. They don't get updated until I open the app again. |
Same issue on Xiaomi Mi9 Android 10 with the latest patches Same problem "I've checked the entries under Settings --> Google --> COVID-19 Notifications. They don't get updated until I open the app again." |
I also have the issue on a Xiaomi Mi 9 Lite. This is also reported in #756, but I think we can't expect the developers to take care of this. And to be honest: They are getting a hell of money from "us" and the "only" thing the app has to do is downloading keys of infected persons every roughly 24 hours and showing a notification if the user is infected. But the app is not able to reliable do this. |
Is there any way in the production version of CWA (currently Version 1.1.1) to see when the next risk evaluation is scheduled? I only know how to look via Settings > Google > COVID-19 exposure notifications > Exposure checks to see what requests have been previously made. |
@mbw83 We are taking this issue (and the others of course as well) seriously. We are continuously checking if we can reproduce the issue with the devices people have mentioned here. So please keep on posting the devices which still face the issues. We are taking them into account in further test efforts. @MikeMcC399 The latest update is also shown on the home screen of the app. The next automated evaluation is scheduled for 24 hours later. It depends on OS scheduling and other aspects when it will actually happen. Usually it's 24 hours plus a little bit more. Only if the next update happens later than 24+4 hours after the last update, the scheduling hasn't worked properly and we recommend opening the app manually once again. |
can you please double check in OS settings if the app is excluded from the phone's energy optimization/ akkuoptimierung |
Thank you for describing the expected interval of 24+4. Today my Samsung Galaxy A50 / Android 10 device did an automatic risk update at 19:35 following on from a previous automatic risk update the previous day at 7:25. This is an interval of 24:00+12:10. I have not opened CWA during this time, so the automatic risk update is delayed more than 8 hours (12:10 - 4:00) compared to what was expected. |
@MikeMcC399 |
Double check is done. Corona warn app is excluded from battery optimization Restart is done. I will report here after ~28 hours. |
No special conditions were occurring. I am checking against https://dontkillmyapp.com/. Although my model is not specifically referenced I think I can still infer what settings might help and I will try them out. |
I wasn't involved in Android development in recent years, so take this with a grain of salt, but someone mentioned that foreground services should be used instead of background services, because they are less likely to be killed. They received no response to that comment. Does corona-warn-app already use a foreground service for risk updates? Since foreground services must show a notification while they are active, and I haven't noticed any "update in progress" notifications from CWA, I assume it is a background service right now? If so, shouldn't the implementation be changed to use a foreground service instead? Also regarding the scheduled update time, I can't confirm that the next update will take place 24 hours after the previous update. It appears like my phone used to schedule automatic updates at 6pm, but I've since switched to manually opening the app at ~6am instead, and 7am or 8am on weekends. The app never scheduled an automatic update at ~6am on weekends, it was always triggered by my opening the app a few hours later. I guess automatic updates are still scheduled for 6pm, so that would be 36 hours after my last manually triggered update. |
@w-flo I would not recommend a foreground service as this causes the app to "run" all the time. More or less an endless loop. There are ways to mitigate, but using scheduled tasks As already reported in #637 there is a general android problem with background processing on several devices. https://issuetracker.google.com/issues/122098785 Another interesting thing appears in my Settings --> Google --> COVID-19 Notifications. It seems that the keys are checked multiple times with the same timestamp. Nokia 7 plus |
Very interesting link, but very frustrating to read... Comment no. 91 in that linked issue thread has a nice idea... |
I read about the following improvement in the ENF: |
@MikeMcC399 Thanks very much for that hint. Actually, I knew the release notes but overlooked it there! |
@MikeMcC399 thanks for pointing out this new feature. We are working day and night together with Google to improve the app. This new feature will be adopted soon by our app and should increase the stability of the background task. |
@daimpi very nice and useful research! |
As written earlier, my Samsung Galaxy s10e was NOT fixed by activating PBA. Result: #933 (comment) |
After reboot and waiting for ~28 hours still no improvement. More details can be provided on request |
I have also seen updates taking longer than 28 hours and I am beginning to suspect there are multiple root causes for the issue of risk update not running reliably without user interaction. I have been trying to check by using a USB cable and debugging with Android Debug Bridge (adb). I am though a complete newby at this! I have one Samsung Galaxy Android 8 device that updated yesterday at 06:32 and I am puzzled that Here is a relevant portion of the output of adb shell dumpsys jobscheduler: JOB #u0a172/0: 9365b07 de.rki.coronawarnapp/androidx.work.impl.background.systemjob.SystemJobService UpdateAt 10:39 today the Google ENF UI is showing that a risk update was carried out at 07:55 which is 3 minutes after I first opened the UI at 07:52 today. So currently the automatic risk update is working for me on this device. I guess that the jobscheduler output above was pulled a few minutes after the risk update took place. I didn't check the Google ENF UI again until 10:39. CWA > Settings > Prioritized Background Activity was already set to "On". This is confirmed by jobscheduler showing "Doze whitelisted: true" and (Android) Settings > Apps > Corona-Warn > Battery shows Optimise battery usage as "Not optimised" so I should have ruled out that CWA is killed by Samsung's battery saving. I will keep monitoring the risk updates and see if there is anything strange happens. |
It also does not work on my Mi 9 Lite. The battery saving settings are off since a few weeks (I switched them of the first time it was recommended by a developer). Yesterday morning I double checked it, rebooted my device, started the app (updated 6:53) and waited until now (so ~30 hours). The update takes place immediately when starting the app (12:42) and not on its own. |
The current date / time is Jul 30, 2020 15:00 and I am looking at another device (a Samsung Galaxy A50 running Android 10). Settings > Google > COVID-19 exposure notifications shows open CWA which causes manual risk update at 15:05 adb shell dumpsys jobscheduler shows the following, and the (planned) Run time was not affected by the manual update. JOB #u0a379/63: 406e72d de.rki.coronawarnapp/androidx.work.impl.background.systemjob.SystemJobService If CWA carried out a manual risk update due to it being opened by the user, wouldn't it make sense for the automated update time to get reset, so the next automated update took place 24 hours later? Also it would be helpful as an enhancement for the CWA UI to show when it next plans to carry out an automated risk update if there is no user interaction in the meantime. |
@SebastianWolf-SAP asked for affected devices. Mine ist the Honor View 20 with the latest patches Same problem "I've checked the entries under Settings --> Google --> COVID-19 Notifications. They don't get updated until I open the app again." Pleased let me know If I can support you. |
I have some news from my Samsung Galaxy S10e. What is also interesting about "Standby for unused Apps": the setting allows to declare apps as exceptions from the standby. However, the Corona-Warn-App is not listed there, meaning, I cannot add it as an exception. [Edit 02.08.20] My assumption was right. The "Adaptive Battery" setting does not have any negative influence on the app and thus can stay active. |
@heinosahling And I can tell about my partner's Honor View 20 on Android 10.1: The notifications get updated in the background since he has set the following: Battery --> App Start -->disable "Corona-Warn-App" --> new page: let all three entries active. |
For the moment 1.7.1 finally seems to work, as it always should have been. |
Dear @traut21 and community, thanks for the feedback. We monitor a few more days this issue, and if appropriate, we will finally close it. Best wishes, Corona-Warn-App Open Source Team |
I'm not sure to follow this issue or to create a new one. Please let me know if I'm doing wrong. My app stopped updating and the last update occurred more than 48 hours ago. Android10 on Samsung Galaxy A6 with app V1.7.1. It's complaning "Risiko-Ermittlung nicht möglich" but "Risiko-Ermittlung" is active. I didn't change any settings, but I can'T remember when the app was updated. |
Check for issues #1081 or #1304. Bluetooth is active? Battery optimization for this app is off? |
Bluetooth is active. Batterie optimization for the app is off. Today it looks different: It looks as usual means "Risiko-Ermittlung nicht möglich" is gone as well as "Risiko-Ermittlung einschalten". Only the hint "Aktualisiert: 30. Nov. 12:26" still indicates an issue. |
I just forced to stop the app again and after restarting it has updated. |
Dear @R-Sommer, Thanks for reporting. Are you able to reproduce this issue? Please, send some feedback over the next few days. Thanks. Best wishes, Corona-Warn-App Open Source Team |
After getting positive feedback from all channels I will consider this issue as resolved. If there are any follow up topics appearing, please create a new issue. |
I wasn't able to reproduce this issue. Everything fine since then. |
Hi @R-Sommer! Thanks for the feedback! Best regards, DS Corona-Warn-App Open Source Team |
Version 1.1.1 is installed since last week and “prioritized background activity” is set to on. Today I clicked on my risk status and saw that the last update was two days ago ("vorgestern").
Is this how it is supposed to be?
Some seconds later, the update was performed.
Device is a Huawei P30 lite running with Android 10.0.0
Internal Tracking ID: EXPOSUREAPP-1922
The text was updated successfully, but these errors were encountered: