Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Exposure logging is not possible / Exposure logging active due to Background Job being killed from Manufacturer Battery Optimisation #637

Closed
mueslo opened this issue Jun 18, 2020 · 102 comments
Assignees
Labels
bug Something isn't working community Tag issues created by community members documentation Improvements or additions to documentation in progress The issue is currently being resolved mirrored-to-jira This item is also tracked internally in JIRA UX Issue related to UX aspects

Comments

@mueslo
Copy link

mueslo commented Jun 18, 2020

Describe the bug

Status bar below the title bar tells me "EXPOSURE LOGGING ACTIVE". The main content of the app tells me

Exposure logging is not possible. Your exposure logging could not be updated for more than 24 hours. Updated: 16 Jun, 11:30.
ACTIVATE EXPOSURE LOGGING

Pressing on ACTIVATE EXPOSURE LOGGING brings me to a screen which tells me Exposure Logging is already active. (checkbox is set to 'Active', subtext says "Exposure logging has been active for 2 days. [...]". I also tried disabling and re-enabling it.

Going back to the main screen (or killing the app and reopening it) yields the same state.

When initially installing it on Tuesday, 16.06. it seemed to work fine (Unsure about version, possibly 1.0.0?) and on Wednesday gave me a status of "Low Risk", so it seemed to be working. Yesterday afternoon I also updated to 1.0.2 via Google Play Store. However, I cannot tell if it is really due to the updated version or some other cause.

Expected behaviour

Exposure logging works or consistently tells me it doesn't work and for what reason. I'm getting mixed signals here.

Steps to reproduce the issue

Screenshots are disabled in the app.

Technical details

  • App version: 1.0.2
  • Phone model: Xiaomi Mi 9T (Snapdragon 730)
  • Android MIUI 11.0.5.0 (Android 10)

Additional context

Bluetooth and location services are enabled. The phone supports BLE.


Internal Tracking ID: EXPOSUREAPP-1592

@mueslo mueslo added the bug Something isn't working label Jun 18, 2020
@mueslo
Copy link
Author

mueslo commented Jun 18, 2020

Update: seems to work again (after playing around intermittently with the app for 10-20 minutes). Backend server issues?

Leaving this open since backend server issues should be explicitly marked as such. Instead, it looks like something on my device was not working properly, which means it is at the very least a UX bug.

@marcmuschko marcmuschko self-assigned this Jun 18, 2020
@marcmuschko
Copy link
Contributor

Hi @mueslo,

thank you very much for reporting this! We are currently investigating this issue and will come back to you as soon as possible. If you can provide us with additional details, it might help a lot to identify the root cause for this behavior:
Did you change your phone date & time setting recently, disable background activity for the Corona-Warn-App or change the battery optimization settings for the Corona-Warn-App?

Thank you very much and best,
Marc

@mbw83
Copy link

mbw83 commented Jun 18, 2020

Same problem here with a Xiaomi Mi 9 Lite. Mine is showing "Risk calculation not possible", "Last updated on Monday", but the update should have happened yesterday see also #590

Edit: I didn't change anything on my phone settings since maybe January.

Edit 2: I restarted my phone and now it is again showing "Niedriges Risiko". Seems to work for the moment.

@marcmuschko
Copy link
Contributor

@mbw83 thanks for the reporting this and the follow-up, it's much appreciated and
I am glad to hear that it is now working for you!
Nevertheless we are currently monitoring this and can hopefully provide an update soon.

@gbrehmer
Copy link

Have the same issue with Huawei Mate 20 Pro (installed since tuesday, info widget that risk calculation is inactive, please activate, but on second screen is still active (since 2 days)). Probably caused by the battery settings for the app. I have reinstalled the app and deactivated auto settings. I will report tomorrow

@ramsesoriginal
Copy link

I have the exact same issue on a Samsung Galaxy S7, Stock Android 8.0.0.
App installed from Google Play.
Last night it was still snowing me "low risk".

Trying to activate or deactivate the power saving mode doesn't affect this issue.

@mueslo
Copy link
Author

mueslo commented Jun 18, 2020

Hi @mueslo,

thank you very much for reporting this! We are currently investigating this issue and will come back to you as soon as possible. If you can provide us with additional details, it might help a lot to identify the root cause for this behavior:
Did you change your phone date & time setting recently, disable background activity for the Corona-Warn-App or change the battery optimization settings for the Corona-Warn-App?

Thank you very much and best,
Marc

None of the above. However, I do know that MIUI has very strict battery saving behaviour by default (i.e. apps in the background will be killed/put to sleep after a while, e.g. if you want to use a GPS logging app you need to manually set exceptions so your GPS tracing doesn't suddenly stop after 5 minutes). I have currently not set any special behaviour for Corona-Warn. Can you tell me more about what you believe error means? Does the app need to stay on for logging to work? (I was under the impression BLE public key collection is handled in the background by the Android system exposure framework itself) Or does the error mean it could not get the newest list of public keys from the servers?

If you like I can keep my phone with my current settings and see if it reoccurs, and then manually disable "MIUI optimized battery saving" and see if it occurs again. I think I need to wait 24h every time for it to reoccur though. Please let me know if you require any other information.

Edit: These are the standard settings in MIUI: https://i.imgur.com/CDfOCZ4.png https://i.imgur.com/EksCjUY.png
For apps I don't want to be put to sleep (e.g. Strava, Osmand+... I have to manually set it to "No restrictions").

@marcmuschko marcmuschko added the in progress The issue is currently being resolved label Jun 18, 2020
@jaythie
Copy link

jaythie commented Jun 18, 2020

I have the same issue with a Samsung Galaxy S10,
Android 10. The recording stopped on the 16th at 9:25 am.

I have added the App to the list of apps, that shall not be put into standby. I have been in energy-saving-mode.

If you need any more info, im happy to provide it.

Best regards

--- edit
It works now that i have changed the settings mentioned above and updated to version 1.0.2

@marcmuschko
Copy link
Contributor

marcmuschko commented Jun 18, 2020

@ all
Thank you lots for the detailed reports, we highly value your contributions to find and fix existing errors!
We have identified this issue and are working on a fix that should be rolled out soon. I will keep you posted once this is resolved.

Thanks again to all of you!
Best,
Marc

@the-matzup
Copy link

I can also confirm.
Device: Huawei P smart+ with Android 9.1.0.297

My first guess would be that the strict battery manager stops the background functions. But I see you guys are already on the issue.

@tessarakt
Copy link

Same issue here on a Huawei Honor 20 Lite.

Installed Tuesday morning, on Wednesday morning it showed me "Low Risk", when I looked this evening, I noticed the problem.

I first thought it was due to the GoPro app yesterday fiddling around with Bluetooth settings.

But then I noticed "RISIKO-ERMITTLUNG AKTIV", "Risiko-Ermittlung nicht möglich" and a button "RISIKO-ERMITTLUNG AKTIVIEREN" on the same screen, which is contradicting itself and thus very bad UX.

Version is still 1.0.0, I will update now.

@avy216
Copy link

avy216 commented Jun 18, 2020

Same issue here with redmi note 7. I already tried the suggestions you mentioned but I still can't see my infection risk.

@TimAviator
Copy link

Same on Xiaomi Mi Note 10 Lite/Pro.

Reboot does not fix the issue.

@Startrek12
Copy link

Startrek12 commented Jun 18, 2020

Same here iPhone 7 Plus.

Reboot and changing Corona App "Risko-Ermittlung" off and on, doesnt solve the problem.
Background Update is for the Corona App kind of light green (but the same for all other apps) and is not changeable under settings.

@corneliusroemer
Copy link

corneliusroemer commented Jun 18, 2020

@ all
Thank you lots for the detailed reports, we highly value your contributions to find and fix existing errors!
We have identified this issue and are working on a fix that should be rolled out soon. I will keep you posted once this is resolved.

Thanks again to all of you!
Best,
Marc

Hi @marcmuschko, would it be possible to say what the problem is in a few words and reference the branch (if public) that you are working on? It's nice for the community to be in the loop and not just get notified once the fix is rolled out.

@mueslo
Copy link
Author

mueslo commented Jun 18, 2020

Hi @marcmuschko, would it be possible to say what the problem is in a few words and reference the branch (if public) that you are working on? It's nice for the community to be in the loop and not just get notified once the fix is rolled out.

It sounds to me like the background "infected" key lists are not retrieved if the app is put to sleep or killed (which many ROMs do).
Relevant branch: https://github.com/corona-warn-app/cwa-app-android/tree/feature/key-retrieval-on-resume

I really hope key broadcast and collection are still working though... But I believe that is handled by the Android exposure subsystem so hopefully it is fine.

So yeah, I too would appreciate a short outline of what the current working theory is.

@greynoO
Copy link

greynoO commented Jun 18, 2020

Same Problem with Xiaomi Mi 9 running Android 10.

@Filusi
Copy link

Filusi commented Jun 18, 2020

I have the same problem with a Xiaomi Redmi Note 8T running Androidversion 9PKQ1.190616.001.
MIUI-Version: MIUI Global 11.0.9 Stable 11.0.9.0 (PCXEUXM)

@Filusi
Copy link

Filusi commented Jun 18, 2020

Sry, i found my problem.

The App Version was 1.0.0.
I thought, the app will updateing automaticy, but the app wasn't.
Now i updatet the app manually by the Google play store to 1.0.2 and that solved the problem for me. :)

@EMMAOpenSource
Copy link

EMMAOpenSource commented Jun 19, 2020

The issue is also found here on a fully updated Huawei Mate 10 Pro (Android 10, EMUI 10.0.0, Play Services 20.18.17) with CWA V1.0.2. It is fully unclear whether the App is actually working or not. Nothing changed. Only thing I remember was acting as usual and turning off Bluetooth some hours ago (but immediately re-enabling it after CWA gave me a warning) and that CWA was (automatically) updated some time yesterday.

Maybe of interest:

  • The issue persisted after a re-boot
  • turning on/off tracing does not help either

EDIT: The issue appears to be resolved now although I have not altered a thing. Since this happens without interaction with the user (and without a visible warning), it is certainly critical to get that sorted out (also given the number of reported/confirmed cases).

@Kai-Krause
Copy link

Kai-Krause commented Jun 19, 2020

Same issue with Galaxy S10e (Android 10, One UI Version 2.1, SecurityPatch 1.6.2020)
Solution in 'https://basic-tutorials.de/corona-warn-app-ihre-risiko-ermittlung-konnte-seit-mehr-als-24-stunden-nicht-aktualisiert-werden/' does not work as this menu cannot be found on S10e.

Solution found for Samsung S10e:

  • Einstellungen
  • Gerätewartung
  • Akku
  • Energieverwaltung von Apps
  • Standby für nicht verwendete Apps: ausschalten

Alternative(in Test): Add 'Corona-Warn' to list 'Nicht in Standby versetzte Apps'

@holgzim
Copy link

holgzim commented Jun 19, 2020

Same problem with Huawei p20 pro.

The quick solution seems to be:

  1. Einstellungen öffnen
  2. Unterpunkt „Apps“ auswählen
    3)„App-Start“ öffnen
    4)Automatisch verwalten für die Corona-Warn-App deaktivieren, stattdessen alle Punkte manuell aktiv lassen
    5)Smartphone neustarten
    Einige Minuten später aktualisiert sich die App wieder.

Quelle: https://basic-tutorials.de/corona-warn-app-ihre-risiko-ermittlung-konnte-seit-mehr-als-24-stunden-nicht-aktualisiert-werden/

@Hechendorfer
Copy link

Same problem here with my Huawei P30 Pro.
Even the workaround https://basic-tutorials.de/corona-warn-app-ihre-risiko-ermittlung-konnte-seit-mehr-als-24-stunden-nicht-aktualisiert-werden/
didn't solve it.

@drillabit
Copy link

Similar problem on Samsung A3 2017 Android 9. No Risk-Update since 18.6.2020 7:48. Shows button to enable Risk-Assessment, but when clicked, shows the enable switch in on position.
Today i had the app open around update time, did not fix it. Have no power saving enabled, excempted CWA from data-volume or power limitations. I am almost always in a Wifi at update time.

@cschoenle
Copy link

I had the same problem on Samsung Galaxy S10+. However, found that an update was available in Google Play store (from 20 June, had apparently not updated automatically), and now the issue is gone and everything working again.

@janfreymann
Copy link

Related to https://www.coronawarn.app/en/faq/#no_risk_update

Afaik it is possible to show a dialog to the user to disable battery optimization: https://developer.android.com/reference/android/provider/Settings.html#ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS

However, the setting does not "help" with vendor-specific battery optimizers.

@gbhajda
Copy link

gbhajda commented Jun 22, 2020 via email

@m6100
Copy link

m6100 commented Jun 22, 2020

It exists an unresolved Android bug for this issue that is being ignored by Google for more than 1.5 Years now: https://issuetracker.google.com/issues/122098785
Please see also: https://dontkillmyapp.com/

@jheinitz
Copy link

Hi,

I'm facing the same issue. I'm using a Huawei P30 Pro. Please let me know if you need more details.

Kind regards
Jens

@drillabit
Copy link

cschoenle wrote:

I had the same problem on Samsung Galaxy S10+. However, found that an update was available in Google Play store (from 20 June, had apparently not updated automatically), and now the issue is gone and everything working again.

Found this update today, didn't install automatically on my phone, but did the trick after installing it manually!
Thanks to cschoenle!
Thanks to all the other people, but the app was already exempted from Standby! That did not help in my case, but may be its needed... who knows...

@casore735
Copy link

Samsung Galaxy A3 (2017) with android 8: I tried all the workarounds with the battery standby mode and disabling the optimization, update to version 1.0.2, none of this worked. I now manually updated the app to the latest version 1.0.4 (the app did not update automtically), and now it's working again.

@gbrehmer
Copy link

I now manually updated the app to the latest version 1.0.4 (the app did not update automatically), and now it's working again.

Probably because with 1.0.3+ the app is getting updates also on app start (#660). It's possible that the problem still exists, if the app is not opened manually. Does anyone know which downsides this approach has?

@Kimtinki
Copy link

In the meantime, the team identified a workaround that solved the problem at least for some users: https://www.coronawarn.app/de/faq/#no_risk_update. Would be great if you can let us know whether it worked for you as well.
Of course, the team is nevertheless still working on a proper solution for the issue.

to Change the battery Settings didn't work for me. Today I had the Chance to update the app to the newest Version, it was not possible before, now the app works again

@holgerman
Copy link

Same on Samsung Galaxy Note 9
Workaround not relevant for Note 9 Android 10, as settings have different names, tried to adapt the workflow as shown below, but this did not work either...bug remains
Öffne die Geräte-Einstellungen.
Wähle 'Apps' bzw. 'Apps & Benachrichtigungen'.
Wähle 'Corona-Warn'.
Wähle 'Akkuverbrauch optimieren'.
Wahle alle
Wähle 'Corona-Warn'. --> umstellen, dass optimieren NICHT mehr gewaehlt ist
Neustart

@jakobmoellerdev jakobmoellerdev changed the title Exposure logging is not possible / Exposure logging active Exposure logging is not possible / Exposure logging active due to Background Job being killed from Manufacturer Battery Optimisation Jun 27, 2020
@Jo-Achim
Copy link

[Info:] „Risiko-Ermittlung nicht möglich“ und „Risiko-Ermittlung einschalten“ bei „Risiko-Ermittlung Aktiv“…
"Android one - Nokia 7.1", Android 10 mit Sicherheitspatch vom 01. Mai 2020, CWA 1.0.4.

Scheinbar verhindert die eingeschaltete Option „Datensparer“ die korrekte Risiko-Ermittlung. Nach Ausschalten der Option „Datensparer“ und erneutem Aufruf der CWA funktioniert die Risikoermittlung wieder; d.h. das ermittelte Risiko wird angezeigt.


[Info:] "Risk determination not possible" and "Activate risk determination" when "Risk determination active" ...
"Android one - Nokia 7.1", Android 10 with security patch from May 1st 2020, CWA 1.0.4.

Apparently the activated option "Data saver" („Datensparer“) prevents the correct risk determination. After switching off the "Data saver" („Datensparer“) option and opening the CWA again, the risk determination works again; i.e. the determined risk is displayed.

@svengabr
Copy link
Member

svengabr commented Jul 8, 2020

Fix for iPhone users (I am using iPhone XS Max)

  1. Go to "Settings"
  2. Go to "General"
  3. Go to "Background App Refresh"
  4. Turn "Background App Refresh" on
  5. Find the Corona-Warn App in the list and enable Background App Refresh
  6. Restart Corona-Warn App
  7. It will work now

@FabianFalck
Copy link

FabianFalck commented Aug 15, 2020

I confirm that @svengabr 's comment fixes the issue for iPhone users. I had this issue since day one when the app was released; it rendered the app useless for me and it wasn't fixed until now (I have the latest version of the app). The average user would not attempt to find a solution for this issue here on Github. This requires an immediate fix with a warning message that redirects to the correct settings menu (as detailed above), if background app refresh is disabled. Currently, the warning message redirects to the general app settings, where background app refresh is enabled, but greyed out, since the global background app refresh was turned off. This is misleading.

@daimpi
Copy link

daimpi commented Aug 15, 2020

@FabianFalck agreed. I see quite a few users still experiencing this issue. It seems to get tracked here currently btw 🙂.

@yannicgraeser
Copy link

I have the same problem. I am not able to use the app. After deleting and reinstalling the app works for some time. I assume this has to do with disabling and enabling bluetooth/air plane mode.

@ghost
Copy link

ghost commented Sep 29, 2020

Hello community,

This issue has been fixed (Release 1.3) and will be closed now.

Thanks,
LMM

Corona-Warn-App Open Source Team

@ghost ghost closed this as completed Sep 29, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working community Tag issues created by community members documentation Improvements or additions to documentation in progress The issue is currently being resolved mirrored-to-jira This item is also tracked internally in JIRA UX Issue related to UX aspects
Projects
None yet
Development

No branches or pull requests