I click on the app icon/select "open app" in exposure settings to open the app. Main activity is shortly visible, then app crashes. No error message displayed (This differs from other bug reports). After a few tries Android suggests to uninstall the App.
No crash expected. In case it happened the app could recover by re-initializing the missing/corrupt database.
Simply open the app. The app worked fine since it was released and got auto-updated each time new releases had been available. No specific action required to break it.
unclear. Will try re-installing the app
2020-10-07 11:47:35.801 2898-16555/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=de.rki.coronawarnapp/.ui.LauncherActivity bnds=[290,1500][540,1814]} from uid 10030
2020-10-07 11:47:35.824 2898-16555/? I/ZTEAppProfile: apk (de.rki.coronawarnapp) at top
2020-10-07 11:47:35.825 12616-12616/? I/i.coronawarnap: GetResourceLocales CollectLocales
2020-10-07 11:47:35.826 12616-12616/? I/chatty: uid=10239(de.rki.coronawarnapp) identical 1 line
2020-10-07 11:47:35.826 12616-12616/? I/i.coronawarnap: GetResourceLocales CollectLocales
2020-10-07 11:47:35.829 12616-12616/? I/i.coronawarnap: GetResourceLocales CollectLocales
2020-10-07 11:47:35.837 2898-3257/? I/AutoScreenEnhacementManagerService: onCreate : ComponentInfo{de.rki.coronawarnapp/de.rki.coronawarnapp.ui.LauncherActivity}
2020-10-07 11:47:35.841 2898-3257/? I/AutoScreenEnhacementManagerService: onStart : ComponentInfo{de.rki.coronawarnapp/de.rki.coronawarnapp.ui.LauncherActivity}
2020-10-07 11:47:35.844 2898-3257/? I/AutoScreenEnhacementManagerService: onResume : ComponentInfo{de.rki.coronawarnapp/de.rki.coronawarnapp.ui.LauncherActivity}
2020-10-07 11:47:35.863 2898-16555/? I/ActivityManager: START u0 {cmp=de.rki.coronawarnapp/.ui.main.MainActivity} from uid 10239
2020-10-07 11:47:35.879 2898-3257/? I/AutoScreenEnhacementManagerService: onPause : ComponentInfo{de.rki.coronawarnapp/de.rki.coronawarnapp.ui.LauncherActivity}
2020-10-07 11:47:35.882 2898-16555/? I/ZTEAppProfile: apk (de.rki.coronawarnapp) at top
2020-10-07 11:47:35.901 2898-3257/? I/AutoScreenEnhacementManagerService: onCreate : ComponentInfo{de.rki.coronawarnapp/de.rki.coronawarnapp.ui.main.MainActivity}
2020-10-07 11:47:35.911 2898-3257/? I/AutoScreenEnhacementManagerService: onStart : ComponentInfo{de.rki.coronawarnapp/de.rki.coronawarnapp.ui.main.MainActivity}
2020-10-07 11:47:35.962 2898-3257/? I/AutoScreenEnhacementManagerService: onResume : ComponentInfo{de.rki.coronawarnapp/de.rki.coronawarnapp.ui.main.MainActivity}
2020-10-07 11:47:36.023 2898-2926/? I/ActivityManager: Displayed de.rki.coronawarnapp/.ui.main.MainActivity: +142ms (total +205ms)
2020-10-07 11:47:36.038 2898-3257/? I/AutoScreenEnhacementManagerService: onStop : ComponentInfo{de.rki.coronawarnapp/de.rki.coronawarnapp.ui.LauncherActivity}
2020-10-07 11:47:36.038 2898-3257/? I/AutoScreenEnhacementManagerService: onDestroy : ComponentInfo{de.rki.coronawarnapp/de.rki.coronawarnapp.ui.LauncherActivity}
2020-10-07 11:47:36.183 720-1237/? W/SurfaceFlinger: Attempting to set client state on removed layer: Splash Screen de.rki.coronawarnapp#0
2020-10-07 11:47:36.183 720-1237/? W/SurfaceFlinger: Attempting to destroy on removed layer: Splash Screen de.rki.coronawarnapp#0
2020-10-07 11:47:36.343 12616-12616/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: de.rki.coronawarnapp, PID: 12616
net.sqlcipher.database.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master;
at net.sqlcipher.database.SQLiteCompiledSql.native_compile(Native Method)
at net.sqlcipher.database.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:3)
at net.sqlcipher.database.SQLiteCompiledSql.<init>(SQLiteCompiledSql.java:10)
at net.sqlcipher.database.SQLiteProgram.<init>(SQLiteProgram.java:17)
at net.sqlcipher.database.SQLiteQuery.<init>(SQLiteQuery.java:1)
at net.sqlcipher.database.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:9)
at net.sqlcipher.database.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:5)
at net.sqlcipher.database.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1)
at net.sqlcipher.database.SQLiteDatabase.keyDatabase(SQLiteDatabase.java:6)
at net.sqlcipher.database.SQLiteDatabase.openDatabaseInternal(SQLiteDatabase.java:4)
at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:10)
at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:8)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:14)
at net.sqlcipher.database.SupportHelper.getWritableDatabase(SupportHelper.java:1)
at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:1)
at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:1)
at androidx.room.SharedSQLiteStatement.createNewStatement(SharedSQLiteStatement.java:4)
at androidx.room.SharedSQLiteStatement.acquire(SharedSQLiteStatement.java:4)
at de.rki.coronawarnapp.storage.tracing.TracingIntervalDao_Impl$4.call(TracingIntervalDao_Impl.java:3)
at androidx.room.CoroutinesRoom$Companion$execute$2.invokeSuspend(CoroutinesRoom.kt:2)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:18)
at androidx.room.TransactionExecutor$1.run(TransactionExecutor.java:1)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
2020-10-07 11:47:36.345 2898-11086/? W/ActivityManager: Force finishing activity de.rki.coronawarnapp/.ui.main.MainActivity
2020-10-07 11:47:36.365 2898-3224/? W/InputDispatcher: channel '99af9b1 de.rki.coronawarnapp/de.rki.coronawarnapp.ui.main.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
2020-10-07 11:47:36.365 2898-3224/? E/InputDispatcher: channel '99af9b1 de.rki.coronawarnapp/de.rki.coronawarnapp.ui.main.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-10-07 11:47:36.369 2898-16555/? I/ActivityManager: Process de.rki.coronawarnapp (pid 12616) has died: vis +99TOP
2020-10-07 11:47:36.369 2898-16555/? I/ZTEPoint_AI_AUTOSTART_CONTROL: died processName: de.rki.coronawarnapp
2020-10-07 11:47:36.369 2898-11913/? I/WindowManager: WIN DEATH: Window{99af9b1 u0 de.rki.coronawarnapp/de.rki.coronawarnapp.ui.main.MainActivity}
2020-10-07 11:47:36.369 2898-11913/? W/InputDispatcher: Attempted to unregister already unregistered input channel '99af9b1 de.rki.coronawarnapp/de.rki.coronawarnapp.ui.main.MainActivity (server)'
2020-10-07 11:47:36.373 720-1489/? W/SurfaceFlinger: Attempting to set client state on removed layer: de.rki.coronawarnapp/de.rki.coronawarnapp.ui.main.MainActivity#0
2020-10-07 11:47:36.373 720-1489/? W/SurfaceFlinger: Attempting to destroy on removed layer: de.rki.coronawarnapp/de.rki.coronawarnapp.ui.main.MainActivity#0
2020-10-07 11:47:36.374 720-1489/? W/SurfaceFlinger: Attempting to destroy on removed layer: AppWindowToken{188a128 token=Token{936f34b ActivityRecord{bae7c1a u0 de.rki.coronawarnapp/.ui.main.MainActivity t11011}}}#0
edit: 7.10., made clear that battery saving options are turned off
@stephankn
This seems related to https://github.com/corona-warn-app/cwa-app-android/issues/642 , however you wrote:
No error message displayed (This differs from other bug reports).
Call stack here and on #642 is different. Also the other one allowed the app to print an error message, which was not the case for me. I had to read logcat via adb.
It could be that a corrupted SQLite file leads to both symptoms. In another report it was mentioned that the used SQL Encryption library is quite buggy.
Might be related to https://github.com/corona-warn-app/cwa-app-android/issues/1121 not sure though, stacktrace looks different only symptoms seem to match.
@stephankn don't uninstall your CWA this will delete all your collected and sent keys. Try those instructions instead.
@daimpi thanks for mentioning. Too late for me, as I had to quickly re-enable the app. So it seems that I lost the history on the Google API as well. The first comments on #642 indicated that Google stores this data, not the app, so I thought it will be safe. As I have only 14 exposure checks listed in the google settings, all dating today after re-installing I fear history is lost. A later comment in the previous mentioned issue seems to confirm that Google API deletes data on uninstall; https://github.com/corona-warn-app/cwa-app-android/issues/642#issuecomment-688267231
So for others affected, please follow the instructions mentioned by daimpi.
fore reference: In a meanwhile closed ticket showing similar symptoms, a comment indicated that the used library is buggy and showed such DB corruptions for 1.5% of users: https://github.com/corona-warn-app/cwa-app-android/issues/579#issuecomment-656284863
@stephankn ah pity… yes the Exposure Notification Framework (ENF) data will be deleted upon uninstalling the last ENF app, it's only preserved if you have another one (e.g. SwissCovid) installed when deleting CWA.
It seems like a fix for OP might be coming with PR https://github.com/corona-warn-app/cwa-app-android/pull/1235 at the end of the month though 🙂.
I have the same problem, after registering a SARS-CoV-2 test earlier today, until then it worked fine. I really don't want to delete data as mentioned in #1053, because it was stated in a comment that I can't re-register my test.
Phone: Pixel 2, Android 11
App version: 1.3.1
Hi @KommX ,
I understand it as follows:
CWA worked fine before until today.
You registered a QR code successfully. You closed CWA.
After you opened CWA the next time, the error (app crash and/or error "file is not a database") occured? Or did it occur immediately after the QR code registration (without closing CWA)? It's not unimportant to have that detailed information, because it might help fixing the bug later.
@vaubaehn
Almost.
I registered the QR code successfully, there was something like "no results yet for your test".
Next time I opened the app, it was like a newly installed app with all the information on how to use the app (activate bluetooth, active location services, ...) and stuff that is shown after first start of the app. This was already weird, but during this setup the app crashed.
And now it crashes every time directly after starting it.
I don't see any error message.
@KommX
Thanks for your response.
Do you remember how you closed the app after registering the QR code? Did you maybe "swipe off" CWA to close it? Or did you press the closing Button "O"? What would you say, how much time was spent between closing CWA and then opening again (and seeing the setup process like newly installed) - was it less than 5 minutes, or maybe more than 10 minutes or even hours?
Beside this, sadly, I think your QR code registration is gone, and nothing can bring it back :( You would need to call your doc or laboratory then.
Only thing you can do now is to reset the app data (don't uninstall!).
The assumptions what happened to the data are a little bit outdated in #1053 , but the process to recover is still the same.
To make it short: All the data of CWA are stored encrypted. CWA uses an androidx.security module to make use of the encryption. That module uses another open source module (tink), to handle encryption keys in conjunction with the Android built-in KeyStore. Unfortunately, that KeyStore behaves unreliably, and tink didn't cover that unreliability good, so that in the end CWAs data was falsely overwritten and hence unrecoverable lost. This happens in rare cases only, and the CWA devs are already working flat out to find proper solutions to that problem.
Not only CWA is affected, also other Corona tracing apps, that use a similar approach for data privacy. And also other Apps in general have run into that problem. The identification of the problem is quite young, as it was hard to find.
Nevertheless, could be good if you tried to answer my last above questions, as the answers could help to develop a solution.
Thank you, good luck and stay healthy!
If I remember correctly I locked my phone via power button and closed the app later (after picking up the phone again) via "home button", but I'm not entirely sure.
After that, the app was closed for more than an hour and then the introduction stuff began to happen.
It's too bad, that I'll have to reset the app. Hopefully, the test result will be negative anyways, so that no possibility to warn other people will be lost.
@KommX
It's too bad, that I'll have to reset the app. Hopefully, the test result will be negative anyways, so that no possibility to warn other people will be lost.
Even if you reset the CWA data in the app, as long as you don't uninstall/reinstall it, your keys will still be saved in the Google Exposure Notification Framework (ENF). So if your result turns out positive, you can still request a Tele-tan from the hotline and share your keys to warn others.
@daimpi
I didn't know that. Thank your for the hint!
After having used it for months without an issue, CWA failed on me again. This time in version 1.5.0, which includes PR #1235. It fails in the newly added code. So the root cause here and freshly in #1469 might be related.
@stephankn Does the error still occur in the latest update (version 1.5.1) for you?
Corona-Warn-App Open Source Team
@heinezen Thanks for coming back on this issue. After a closer examination of the timeline it turned out that it failed actually with 1.3.0, but then app updated on same day to 1.5.0 and I got a different error for probably the same issue in #1469. I deleted CWA data. Now at 1.5.1 and it has not crashed since. As it did run for months previously without an issue nothing of statistical significance.
As the fix for the supposed root cause is in and with 1.5.1 the remaining implementation issue is fixed as well, I will close this issue also.