-
Notifications
You must be signed in to change notification settings - Fork 496
App closing immediately on start #1053
Comments
This may be related to Error Reason: 2001; App does not work anymore #968 The mobile device Huawei P8 Android 6.0 is specifically mentioned in #968 (comment) |
@helmutweick also described a similar issue in #642 (comment) for Huawei H60-40 Android 6.0. |
Yes, and I think @helmutweick 's amazing logcat stacktraces are pointing to one Huawei specific issue that might be associated with this problem: @FriederikeHanssen , there is a very little chance for the moment to work around this. Unfortunately, I don't have any Huawei device, so I can give just some general hints: I guess, when you started your phone for the very first time, you were asked to opt-in (or to opt-out) that Huawei is allowed to collect data to 'enhance the experience with your phone'. There is only a good chance, that it might mitigate that crash, when the whole service of collecting data ( Steps for trying to mitigate our crash here:
Any feedback how you succeeded is highly welcome! Good luck! EDIT: I forgot, that re-starting your phone might be necessary -> see above |
Thank you for the quick feedback! The only thing close to any of the mentioned Huawei data collection option I found is: which I turned off and restarted the phone. This didn't solve anything Deleting the cache & storage did solve it. However, it looks like all the contacts from the last 14 days are gone now. I only see contacts with a time stamp from a few minutes ago. Additionally, it now says 'Unbekanntes Risiko' even though I have been using the app since it came out. Additionally, this may or may not be related (and I completely forgot about it till now), the app re-setup itself without me doing anything a few days ago. Either way, my immediate issue is solved. But it would be a shame if all the contacts are really lost for good now. Can you confirm whether deleting the cache & storage does this? |
I think, you exactly spotted it! Great!
I should have mentioned in my comment before, to take the steps in exactly that order...
Where exactly do you see the contacts? Inside the app? Or via Android > settings > apps > google > Covid-19-Benachrichtigungen?
Could you try to explain, what it means, 'the app re-setup' by itself?
Yes indeed, it would be a shame. Until now, I think, it was common sense here in the user community, that deleting data and cache of CWA doesn't harm the collected contacts, because they are stored in different places of the device (please correct me anyone, if I'm wrong). Only uninstalling all (or the only) official contact tracing apps (like CWA) should trigger the collected contacts to be erased from the device, |
With re-setup I mean that the app behaved exactly the way it did when I first installed it. Similar to today actually. So asking me whether I want to turn on Risikoermittlung and so on. I guess, if the collected contacts have not been deleted it is not an issue. |
I understand. So, what you then saw some days ago, might indeed be a reset of CWA's data, because they might have become corrupted by a crash before. (The fallback routine seems to be in cwa-app-android/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/storage/AppDatabase.kt)
If you found the contact list there, and it was empty, except the freshly fetched data for the last 14 days all with the same time stamp, then it's indeed a big concern, as it indicates, that the Exposure Summary might have been erased by the ENF. For me this is a new behaviour (or I must have missed something). This could (but not must) indicate, that the collected contacts (RPIs) also might have been erased. But in the end, there are just few options at the moment, to make CWA work again after a corrupted database:
|
Hi @FriederikeHanssen and everyone, |
Hi @FriederikeHanssen , could you provide an update on how things were going for you in the last 10 days? Did any crash on app start ocuur again? (Other issues like API 39508 or no automatic background update don't count here in this context ;) ) |
Hi @vaubaehn ! Everything works fine and as expected now 🎉 . No crashes, no API errors either 😄 |
Hi @FriederikeHanssen , that's great! Thanks for your feedback! Please report back here, if any problem occurs again. Thank you very much for your support! EDIT: Could you also maybe provide your EMUI version number? |
Hi @vaubaehn! EMUI version number: 4.0.3 Yes, when installing the app,
|
Hi @FriederikeHanssen , thanks a lot for your well structured feedback! Personally, I find your information very useful. 👍 @svengabr : do you think, the stakeholders might consider it to be useful to extend the FAQ, especially for HUAWEI devices according to information/device setup presented here (points 1 to 3 provided in the afore comment by @FriederikeHanssen ) for increased stability? I would volunteer to create a PR for the FAQ (like I did before here -> corona-warn-app/cwa-website#308) , if it is welcomed. Details could be discussed in Slack before creating PR. @FriederikeHanssen
It's not quite clear yet, whether the collected contacts (RPIs of exposures) have actually been deleted, or 'only' the history of the past checks. Unfortunately, this subject has been stale for more than two weeks now, after @thomasaugsten suggested to clarify with Google. Maybe @svengabr can push that subject to the developers again, because if deleting CWA data proves to reliably bring back CWA to work, without deleting collected RPIs/own TEKs, then this method should be immediately made public to support a big crowd of users who frequently run into the problem of app crashes! @svengabr : short summary, to avoid misunderstandings: it's not about deleting CWA data from inside the app (settings > delete), but from OS level (Android > Settings > Apps > CWA > Storage > delete data/cache). We know that the Google documentation states, that only uninstalling CWA erases RPIs/TEKs, but it looks like there might have been a change to ENF in the latest versions, and/or the documentation is not correct. PS.: possible deletion of RPIs/TEKs might be related to the google API token, which is newly generated, after deletion of data and before CWA calls ProvideDiagnosisKeys. Thanks again! |
I have turned the "Priorisierte Hintergrundaktivität" now. Will report back, if it crashes or leads to unexpected behaviour. But even without it, it has been running stable for now. Sure, happy to help 😃 |
Regarding the first issue (PR), thanks a lot for your consideration. I'll try to finish it within the next days. If you don't hear anything from me until Thurdsday night, feel free to ping me. Regarding the second issue (deletion of CWA data), there was a reply by @thomasaugsten ( #642 (comment) ) , as soon as after my comment. Let's track that issue over there :) Thanks again! |
Erste Hilfe: „App schließt sich sofort nach dem Öffnen“Die nachfolgenden Informationen wurden dank der Unterstützung vieler Nutzerinnen und Nutzer, sowie Entwickler aus verschiedenen Beiträgen im GitHub-Issue #642 zusammengestellt (z. B. #642 (comment) , #642 (comment) , #642 (comment) , #642 (comment) ). Allerdings kann ich keine Gewährleistung für Vollständigkeit und Richtigkeit geben. Anwendung auf eigene Gefahr. Wenn die Corona-Warn-App durch einen Fehler im Betriebssystem oder durch aggressive Energiesparmaßnahmen des Telefons unerwartet beendet wird, kann es vorkommen, dass bei einem erneuten Start die Corona-Warn-App nicht mehr auf ihre verschlüsselten Datenbanken zugreifen kann. In diesem Fall schließt sie sich sofort wieder. Die Corona-Warn-App kann wieder zum Laufen gebracht werden, indem die Daten und der Cache der App über die Android-Einstellungen gelöscht werden. Achtung: Wenn Sie die Daten der Corona-Warn-App löschen, gehen folgende Daten/Einstellungen verloren:
Zum Löschen der Daten der Corona-Warn-App gehen Sie wie folgt vor:(die angegebenen Pfade zum Erreichen der jeweiligen Einstellungen können je nach Telefon und Android-Version leicht abweichen):
Achtung:Um die Zuverlässigkeit der Hintergrundaktualisierung zu optimieren, und unerwarteten Abstürzen der Corona-Warn-App beim Öffnen vorzubeugen, befolgen Sie bitte diese Anleitung in den FAQ -> hier . Falls Sie ein Huawei oder Honor Smartphone besitzen, sollten Sie zusätzliche diese Punkte beachten -> hier Falls Sie ein Smartphone eines anderen Herstellers besitzen, können Sie hier überprüfen, ob Sie noch zusätzliche Einstellungen zur Verbesserung der Zuverlässigkeit vornehmen können: https://dontkillmyapp.com/ (englisch) oder https://slack.com/intl/de-de/help/articles/360001562747-Bekannte-Probleme-mit-Android%E2%80%91Benachrichtigungen |
Zusätzliche Einstellungen für ältere Huawei- oder Honor-SmartphonesEs ist bekannt, dass Huawei-Geräte ein besonders aggressives Verhalten zur Optimierung der Akkulaufzeit zeigen. So werden Hintergrundprozesse der Corona-Warn-App sehr schnell beendet, wenn die App nicht anhand besonderer Einstellungen von der Akku-Optimierung ausgenommen wird. Das ‚Killen‘ dieser Hintergrundprozesse kann dazu führen, dass die Corona-Warn-App entweder die Hintergrundaktualisierung zur Risiko-Ermittlung nicht durchführt, oder im schlimmsten Fall die Datenbanken der App beschädigt werden könnten. Es wird daher empfohlen, die ‚Priorisierte Hintergrundaktivität‘ zu aktivieren, wie in der FAQ angegeben. Für ältere Geräte mit EMUI 4 (z. B. Huawei P8 lite) sollte neben dieser allgemeinen Empfehlung noch eine zusätzliche Einstellung vorgenommen werden: Stellen Sie die Corona-Warn-App wie folgt als ‚Geschützte App‘ ein:
Um die Stabilität der Corona-Warn-App zu erhöhen, ist noch eine weitere Einstellung möglich – das Entziehen der Erlaubnis auf den Zugriff der Nutzungsdaten für die Huawei Mobile Services. Ob es tatsächlich etwas bringt, oder eher nicht, ist Gegenstand der Diskussion und noch nicht abschließend geklärt (#642 (comment) #642 (comment) #642 (comment) ). Aber einen Versuch ist es vielleicht wert:
Um die Stabilität weiter zu verbessern, sollten Sie überprüfen, ob noch mindestens 2GB freier Speicher für den internen Speicher zu Verfügung stehen. Ist nämlich der Speicher zu voll (weniger als 1 GB freier Speicher), wird das Telefon immer langsamer, wodurch timeout-Probleme auftreten können. Sie erhalten dann z. B. Meldungen wie „App XYZ reagiert nicht mehr“. Geben Sie in diesem Fall Speicher frei, z. B.:
System-UpdateFür neuere Huawei / Honor Smartphones liegt möglicherweise ein System-Update vor, dass die Corona-Warn-App auf eine Huawei-interne White-List setzt, und vom besonders aggressiven Energiesparen ausschließt. Überprüfen Sie hier, ob Sie vielleicht ein System-Update erhalten können. Link: https://www.huaweiblog.de/news/huawei-geraete-bekommen-877kb-grosses-systemparameter-update/ Ansonsten können Sie prüfen, ob Sie für Ihr Telefon noch weitere Einstellungen vornehmen können, z. B. hier https://dontkillmyapp.com/huawei (englisch), oder hier https://www.huaweiblog.de/news/benachrichtigungen-push-problem-loesung-anleitung/ . |
First Aid: Reactivate Corona-Warn-App when "App closes immediately after opening"Thanks to the support of many users and developers, the following information was compiled from various contributions in GitHub issue #642 (e.g., #642 (comment) , #642 (comment) , #642 (comment) , #642 (comment) ). However, I cannot guarantee completeness and correctness. Use at your own risk. If the Corona-Warn-App is unexpectedly terminated due to an error in the operating system or aggressive energy-saving measures taken by the phone, it may happen that the Corona-Warn-App can no longer access its encrypted databases when it is restarted. In this case, it closes again immediately. The Corona-Warn-App can be made to work again by deleting the data and the cache of the app via the Android settings. Attention: If you delete the data of the Corona-Warn-App, the following data / settings will be lost:
To delete the data from the Corona-Warn-App, proceed as follows:(the paths specified to reach the respective settings may differ slightly depending on the phone and Android version):
Attention:To optimize the reliability of the background update and to prevent unexpected crashes of the Corona-Warn-App when opening, please follow these instructions in the FAQ -> here https://www.coronawarn.app/en/faq/#no_risk_update. If you have a Huawei or Honor smartphone, you should also note these points -> here. If you have a phone from another manufacturer, you can check here whether you can make additional settings to improve reliability: https://dontkillmyapp.com/ or https://slack.com/intl/en-de/help/articles/360001562747 (you may adjust output to your language on button of that page). |
Additional settings for older Huawei or Honor smartphonesIt is a known fact that Huawei/Honor phones show a particularly aggressive behavior to optimize battery life. Background processes of the Corona-Warn-App are terminated very quickly if the app is not excluded from battery optimization based on special settings. The 'killing' of these background processes can mean that the Corona-Warn-App either does not carry out the background update for risk determination or, in the worst case, the app's databases could be damaged. It is therefore recommended to activate the 'Prioritized Background Activity' as stated in the FAQ https://www.coronawarn.app/de/faq/#no_risk_update. For older devices with EMUI 4 (e.g. Huawei P8 lite), in addition to this general recommendation, an additional setting should be made: Set the Corona-Warn-App as 'Protected App' as follows:
In order to increase the stability of the Corona-Warn-App, another setting is possible - withdrawing the permission to access usage data for the Huawei Mobile Services. Whether it actually has a positive effect or not is the subject of discussion and has not yet been finally clarified (#642 (comment) #642 (comment) #642 (comment) ). But it might be worth a try:
To further improve stability, you should check whether at least 2GB of free space is still available for the internal memory. If the memory is too full (less than 1 GB free memory), the phone becomes slower and slower, which can lead to timeout problems. You will then receive messages like "App XYZ is not responding". In this case, free up some memory, e.g.
System-UpdateFor newer Huawei / Honor smartphones there may be a system update that puts the Corona-Warn-App on a Huawei internal white list and excludes it from particularly aggressive energy saving. Check here to see if you might be able to get a system update. Link (German): https://www.huaweiblog.de/news/huawei-geraete-bekommen-877kb-grosses-systemparameter-update/ Additionally you can check whether you can make further settings for your phone, e.g. here https://dontkillmyapp.com/huawei, or here (German) https://www.huaweiblog.de/news/benachrichtigungen-push-problem-loesung-anleitung/. |
@mtb77 @svengabr @thomasaugsten @mtb77 : Tomorrow I will send you a draft for changes to the FAQ. If they are in line with your needs, I will create a PR respectively. FAQ changes will be short and link to above comments. |
Thank you very much for the effort @vaubaehn! Your texts are looking very good to me. I would like to discuss this as a topic in our daily meeting today so maybe a developer can have a look at it before publishing it to the FAQ website. I will keep you updated. |
Hi @svengabr , thanks for your feedback. I also think, it's a good idea when dev department has a look on it. I guess the GitHub rights management allows you to edit my comments at any time - so, please feel free to adjust anything according to your needs! At any time! Edit: I incorporated small changes, mainly formatting, typos and small details. |
Hi @sandoxy , I'm a common user like you, but familiar with that issue, I will try to support you a little.
I'm not sure what went wrong here for you in particular - all steps you told us seem to be right, and for other users this procedure was succeeding. ... in the moment I'm writing here, above @daimpi already answered (and again: ... one thought 😆 )
like @daimpi wrote already, contacts should not be lost, only the entries in the log are gone.
like @daimpi wrote, contacts are retained, but due to a problem in a bug fix, CWA's data could not be reset automatically during the upgrade to 1.5. |
Hi @FriederikeHanssen ,
Did I understand you right:
Did I understand everything correct? Having your feedback would be very helpful indeed. And as @daimpi already wrote, only the history of checks should be cleared, but not the collected contacts. We had a verification for that in a different issue yesterday, that a risk encounter was showing up again after solely deleting storage, following the procedure above in this thread. Thank you! |
When I go to Settings-> Google->Covid-19. CWA shows, that it runs for 12 days. I did not reinstall the app. |
let's hope this helps fixing it then 😃 .
Let me know, if you need more info. @daimpi Great to hear the contacts are not lost 👍 . I assumed they would be, because when I navigate to Google > Covid Benachrichtigungen it only shows a few (10ish or fewer) and only from the date of when I reseted storage &cache. |
Hi @FriederikeHanssen , thanks again for your support! Please excuse my following pedantic questions... As we have 50 Shades of Crashes with CWA, I just want to be double sure, we're having only one source of crash here.
Were all of these crashes of the same type? I'm asking, because you wrote in the third step, that clearing cache and data didn't help anymore, what would point to a different root cause.
Same here: app closing or some different error message?
That last one actually looks like the "old" app closes immediatly on start. Thanks again... |
Hey everyone, according to our developer's meeting, the issue is most likely related to #642 which should have been initially resolved for 1.5. Unfortunately, a small code fragment needed to be added which will be part in an upcoming hotfix release 1.5.1. The related pull request is #1433 In the mean time you could try the workaround of @vaubaehn Thank you very much for your understanding! Best regards, Corona-Warn-App Open Source Team |
Hi svengabr, gibt es denn schon eine Vorstellung von dem ungefähren Termin, an dem das Hotfix kommt? |
Hi at all, Still Huawei P8 Lite |
If your sister's app is still crashing then the options are:
I have no information about when 1.6 will be released, but I would expect it will be soon. Edit: Version 1.6 was released on Nov 11, 2020. The current version is now 1.7.1 and the issue #642 has been closed as fixed. |
Thanks again! My sister now tried the workaraound incl. changing of time settings, and today is already the 2. day CWA working! So thanks to all who answer and answered here! But one point of criticism is still left: I am a complete unsuspecting layman in app-building, but it is more than hard for me to understand why a workaround is necessary for not too less people just to make CWA working. Especially when this bug is known for months. Why has it during months not been possible to fix this bug? It is the Telekom and SAP writing the app, and as far as I know these are two very big players (recieving some money for that) and not only my cousin or brother-in-law scribbling around in their leisure time. |
This was addressed in CWA 1.5 and 1.6. The issue should be fixed now. Please comment here if it is still re-occuring for you. Corona-Warn-App Open Source Team |
Avoid duplicates
Describe the bug
Since a couple of days the app closes immediately after opening it.
Expected behaviour
App opening.
Steps to reproduce the issue
Open the app.
Technical details
Possible Fix
Additional context
Until now, it has worked as expected.
Restarted the phone multiple times and checked that the App is part of the protected background apps.
App version: 1.2.1
Internal Tracking ID: EXPOSUREAPP-2249, EXPOSUREAPP-1851
The text was updated successfully, but these errors were encountered: