cwa-app-ios icon indicating copy to clipboard operation
cwa-app-ios copied to clipboard

Risk state update issue when switching from WiFi to mobile internet

Open AnOtherMuenchner opened this issue 3 years ago • 6 comments

Since some time I observe the following issue when I switch from WiFi to mobile internet:

  • Usually the first update of risk state of a day is done via WiFi internet. This works since problems.
  • Also all following updates via WiFi this day working problemless.
  • When I am in the mobile internet then there is one update via mobile internet done this day. But it only downloads two more data sets than the preceeding updating via WiFi.
  • If a keep staying in mobile internet, there are no update via mobile internet this day. The next updates are only down via WiFi.

When the first update of a day is done via mobile internet, it also works without problems.

There is always only one update via mobile internet a day. Independently, when the update is done (Can be the first or some other).

Phone: iPhone SE 2020.

AnOtherMuenchner avatar Jan 23 '22 09:01 AnOtherMuenchner

Hi @AnOtherMuenchner,

see

  • DE https://www.coronawarn.app/de/faq/#risk_update_24
  • EN https://www.coronawarn.app/en/faq/#risk_update_24

Best wishes, DS


Corona-Warn-App Open Source Team

dsarkar avatar Jan 23 '22 10:01 dsarkar

@dsarkar

The problem is not that the risk state update is only done once a day via mobile internet.

The problem is that the downloaded data does not seem to be complete.

If the update via mobile internet is not the first update of the day, there are only two more data sets downloaded compared to the previous update (via WiFi). Here I would expect more data sets (1 additional data set per passed hour since last update).

AnOtherMuenchner avatar Jan 23 '22 10:01 AnOtherMuenchner

@AnOtherMuenchner I think on mobile data there are no hourly data sets downloaded. However, I will cross-check that, and come back to you. Stand by.

dsarkar avatar Jan 23 '22 11:01 dsarkar

I think on mobile data there are no hourly data sets downloaded.

@dsarkar

Really?? I have seen hourly files downloaded via mobile often. If this is true, then it was changed only recently.

However, I could imagine a timeout happening here. With mobile data connection usually slower than WiFi, and the downloaded files much larger now than they were in the past.

ndegendogo avatar Feb 01 '22 08:02 ndegendogo

@AnOtherMuenchner I think I understand now what you mean. And, actually, I have seen this pattern myself often. Only since I understand it better, I have stopped to worry.

The strategy for risk check is quite complex, because it has many constraints. This results sometimes in unexpected patterns.

  • a timer triggers the risk procedure every 2 hours
  • additionally that procedure is triggered when you open cwa
  • if internet / WLan is available, it downloads the newest key files from the server (daily and hourly files)
  • if internet is available via mobile network only, it downloads only once per day (not 100% sure about the details here, maybe it just skips download of the hourly files) The constraint here is the zero-cost-agreement with the mobile operators which covers 1 download per day.
  • if no internet available, then no download 🙃
  • then it performs the check, if at least 4 hours later since the last check. The constraint here is a rate limiting of the Google/Apple ENS/ENF library.

So sometimes the following happens:

  • 2 hours after the last check, you are still in WLAN, and it downloads another 2 houly files, but does not check them yet
  • later you open cwa without WLAN, last check was 4 hours before (or even more). So no download, but it finds the two files that were not yet checked. In such a case the number of processed files seems crippled / incomplete but no need to worry if you understand the reason.

ndegendogo avatar Feb 07 '22 11:02 ndegendogo

@AnOtherMuenchner Can you please try to reproduce this issue? There were major changes done to the whole process of how DKs are provided in version 2.19.1, so it could very well be that this was fixed.

Ein-Tim avatar Apr 13 '22 14:04 Ein-Tim

will set to obsolete as the effect is only until 31.4.2023

30mar avatar Apr 26 '23 11:04 30mar