corona-warn-app / cwa-app-android

Native Android app using the Apple/Google exposure notification API. The CWA development ends on May 31, 2023. You still can warn other users until April 30, 2023. More information:
https://coronawarn.app/en/faq/#ramp_down
Apache License 2.0
2.44k stars 495 forks source link

Twitter Report: CWA shows an increased risk encounter, the ENF log does not show any matches #4548

Closed Ein-Tim closed 2 years ago

Ein-Tim commented 2 years ago

Avoid duplicates

Technical details

Describe the bug

The CWA shows an encounter with increased risk, however, the ENF log does not show any matches. Is this possible under Android?

CWA System log
 1 3 

Steps to reproduce the issue

  1. Get an encounter with increased risk
  2. Look at CWA
  3. Look at the system log
  4. Wonder what's wrong here

Expected behaviour

CWA should not show encounters if there are no matches shown in the system log.

Additional context

  1. The high risk encounter is not caused by a Check-In.
  2. On the day the encounter was first shown, there is a match in the log.

Internal Tracking ID: EXPOSUREAPP-11064

svengabr commented 2 years ago

Internal Tracking ID: EXPOSUREAPP-11064

svengabr commented 2 years ago

Thanks, @Ein-Tim, I have flagged this as a question in the first place.

The CWA shows an encounter with increased risk, however, the ENF log does not show any matches. Is this possible under Android?

However, I have created a ticket with all your information and assigned it accordingly.

mtwalli commented 2 years ago

@Ein-Tim Can you ask the user for logs ?

Ein-Tim commented 2 years ago

@mtwalli

CWA or ENF logs?

mtwalli commented 2 years ago

CWA logs ?

Ein-Tim commented 2 years ago

So activating error logging in CWA?

NKarolak commented 2 years ago

Hi, that was me. The status is already green, and there was no further issue. Would the log still help, at all?

mtwalli commented 2 years ago

Hi @NKarolak , I'm glad it is working for you again. I think recent logs won't reflect what you faced before. if you experience such issue again , please send us the error logs to be able to investigate the issue.

NKarolak commented 2 years ago

Okay, I will try.

vaubaehn commented 2 years ago

Hi @mtwalli , the issue that was reported by @NKarolak could be related to a changed behavior of ENS, that I was trying to explain here: https://github.com/corona-warn-app/cwa-app-android/issues/4732#issuecomment-1021095635 For me it looks like, that there's now a kind of GMS internal caching of matched DK packages to speed up matching (because of high incidence numbers around the globe). It could be, that already matched packages are not matched anymore to safe some time. A package hash could work as an identifier which package was already matched. In consequence, ENS only displays new number of hits that were actually matched by a recent ENS provision. Means, if you provide a package to ENS contains a match, it's displayed as a hit. If the next package does not contain a match, number of hits is counted as 0. However, ExposureWindows should also cache former results - so when there were hits in the past 14 days, they should be accordingly when requesting EWs from ENS. Could you cross-check that behavior? If that was true, with some logic CWA would only need to provide "fresh" packages to ENS which could speed up the process, causing less system load and preventing timeouts, as the validation of packages seems to cost much time (and currently CWA seems to provide all available packages).

MikeMcC399 commented 2 years ago

@vaubaehn

This seems also related to https://github.com/corona-warn-app/cwa-app-android/issues/4576. It looks like matched keys get knocked off the list and only match once in the Google UI.

vaubaehn commented 2 years ago

@MikeMcC399 Yes, I think it's like you say - they just show up once in GoogleUI anymore and then get knocked off. I had a similar observation for a single low risk contact by the end of last year. There was just one match for a specific risk matching on one day. The GoogleUI showed 0 matches all the days after, but CWA was continuing to show a low risk warning for one contact for a couple of days. This is why I assume that the matches, that are now displayed in the UI come from a 'fresh' hourly package and already checked packages are not taken into account anymore.

The observations of other users could be in line with that.

mtwalli commented 2 years ago

@Ein-Tim is this issue still relevant?

Ein-Tim commented 2 years ago

@mtwalli

Was this fixed or was the root cause found?

mtwalli commented 2 years ago

According to @MikeMcC399's comment above this issue is related to https://github.com/corona-warn-app/cwa-app-android/issues/4576 which is closed

Ein-Tim commented 2 years ago

@mtwalli

4576 was closed by @svengabr with the following note from a developer in his comment:

Setting to obsolete as the original question should be answered. If not: plz re-open.

What is the answer to the question?

Also, this is not a question but a bug report.

mtwalli commented 2 years ago

@Ein-Tim As far as I know there is no PR dedicated to this issue. Here is a comment on the listed steps form the developer who looked at this bug

How can it be reproduced, especially the sentence: "Get an encounter with increased risk" Was there an encounter or not? If you create one via test menu, then the app shows one, but ENF log does not because it is faked.

My question to you, is that bug still relevant ? or can you provide an error log if you can reproduce ?

Ein-Tim commented 2 years ago

@mtwalli

I understand that it is hard to reproduce this issue, but AFAIK every not faked red risk encounter will lead to this issue. I was red a few days ago, now I'm green again. When I have an increased risk encounter again, I will provide both screenshots and an error log, although I doubt that the CWA error log will help here.

I think most important is that the team clarifies with Google if the following statement from @MikeMcC399 (from https://github.com/corona-warn-app/cwa-app-android/issues/4548#issuecomment-1021433864) is correct:

It looks like matched keys get knocked off the list and only match once in the Google UI.

mtwalli commented 2 years ago

Aligned with @thomasaugsten regarding this issue and the conclusion is that this could happen because of ENS caching mechanism . i.e the explanation from @vaubaehn above is plausible.