cwa-app-ios
cwa-app-ios copied to clipboard
Background Refresh and Notifications not working
Avoid duplicates
- [x ] Bug is not mentioned in the FAQ
- [ x] Bug is specific for iOS 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: iPhone 13 Pro
- iOS version: 15.2
- App version: 2.15.1
Describe the bug
This iPhone was set up in September via OTA migration from an older iPhone. I open the CWA very irregular, but it is properly configured to refresh in the background. On two occasions (one in late December, one on 17. January) I opened the app and saw the „increased risk“ message related to an encounter. The encounters in those cases were 11 and 12 days ago (before manually opeing the app and refreshing). I did not get any notifications from the app. Therefore I conclude that this might be an issue worth investigating.
Steps to reproduce the issue
Not reproducible by user
Expected behaviour
not applicable
Possible Fix
maybe reinstallation? Did not try it. Should be avoided to not loos the encounter keys.
Additional context
Did you instantly see the "increased risk" encounters or was a check carried out in foreground?
Related issue: https://github.com/corona-warn-app/cwa-wishlist/issues/645
Did you instantly see the "increased risk" encounters or was a check carried out in foreground?
It had to first download and check for 10sec or so. Then it showed „increased risk“ (or however its called in English - I have my German as my OS language)
@p13rr37 Then the increase risk encounter was found in foreground, thus the app did not send you a notification. Everything is working as intended (but if you have large gaps between exposure checks, like more than 8 hours between two checks although you were connected to the internet via WLAN).
@Ein-Tim I turn off Wifi/cellular over night. So maybe it tried to refresh then. And when I turned it back on it did not refresh and notify me - only when I opened it. Maybe you can try to catch a change in the network to trigger the background refresh and notifications.
@p13rr37 For me, always after turning WLAN back on after it was switched off over night, a check is carried out.
Tomorrow, after switching WLAN back on, please do not open the app but wait and see if a check is carried out. You can see whether a check was carried out without opening the app in the iOS settings:
Einstellungen ➡️ Begegnungsmitteilungen ➡️ Status von Begegnungsaufzeichnungen ➡️ Begegnungsüberprüfungen
Let us know what the result of this "experiment" is (-:
@Ein-Tim @p13rr37 I also see different behaviour on my two devices with regard to "network events".
-
iPhone 8, iOS 14, no SIM card. So when I return home into my WLAN, the event is from "no internet" to "internet available". This device performs no checks during the day (for obvious reasons). But on the minute when I return home, it triggers the check from background.
-
iPhone 13, iOS 15, SIM card available. When I return home, the event is from "internet via mobile coverage" to "internet via WLAN". Also this device performs no checks during the day (I think the reason is because of the agreed "flatrate" for zero-cost cwa checks via mobile, it covers only a single risk check per day). And when I return home, this device gets no immediate trigger. So, either I am waiting till the next 4-hourly check is due, or I open cwa and then get the risk check.
@ndegendogo
I guess the 13 is your main device, or? Could be that the system gives CWA less background time because other tasks are running in foreground.
@p13rr37 For me, always after turning WLAN back on after it was switched off over night, a check is carried out.
Tomorrow, after switching WLAN back on, please do not open the app but wait and see if a check is carried out. You can see whether a check was carried out without opening the app in the iOS settings:
Einstellungen➡️Begegnungsmitteilungen➡️Status von Begegnungsaufzeichnungen➡️BegegnungsüberprüfungenLet us know what the result of this "experiment" is (-:
It immediately refreshed in background after turning the internet connection on. But still not sure if the notification would work in this case.
@p13rr37 It definitely should.
@Ein-Tim
I guess the 13 is your main device, or?
Yes!
Could be that the system gives CWA less background time because other tasks are running in foreground.
Maybe that is the reason. Or maybe, the strategy to trigger the background task differs between the iOS versions.
But my guess would be the following reason: the background task is configured to trigger cwa after two hours, but only if internet is available.
So, what happens?
- my iPhone 13 has a SIM card and has internet all the time. So the background task triggers cwa after every 2 hours. But no WLAN available, so cwa will not download new key files (except once per day).
- when I return home, iOS sees no change with regard to "internet availability", and the 2-hour-interval is not yet due => no immediate check
- on the other side, my iPhone 8 has no internet all day. So the background task just waits for internet
- as soon as I return home, iOS sees the internet and triggers cwa. And cwa sees the WLAN, and downloads the keys and performs the risk check
@p13rr37 Can you still reproduce this error on iOS 15.4.1 and CWA 2.20?
@dsarkar | @larswmh Please decide how to proceed with this issue.
@Ein-Tim Thanks for the ping. @p13rr37 Do you experience any further issues. Your feedback is appreciated, if no further problems, we would suggest to close this issue now, of course with the option to re-open this issue should you experience problems at some point. Thanks. Best wishes, DS
Corona-Warn-App Open Source Team
Hi @p13rr37, thanks again for reporting. Since this issue became stale, we are closing it. Should you still experience any problems, please open a new issue or write here you're feedback.
Best wishes, DS
Corona-Warn-App Open Source Team