covid-be-app / cwa-app-android

Native Android app using the Apple/Google exposure notification API.
https://coronalert.be
Apache License 2.0
53 stars 10 forks source link

CAUSE 9002: file is not a database: , #103

Closed gcp closed 3 years ago

gcp commented 3 years ago

Google Pixel 2 XL, Android 11. Had been running for ~10 days (since release), but stopped running today.

Screenshot_20201012-115713 Screenshot_20201012-115701

gcp commented 3 years ago

The app now always crashes on startup.

gcp commented 3 years ago

Problem seems to be known in the original German app as well: https://github.com/corona-warn-app/cwa-app-android/issues/642

tommeke commented 3 years ago

I have the exact same issue that I wanted to report. This on a Huawei P8 Lite (first generation), Android 6.0. Installed the App about 6 days ago (official website I think), use bluetooth intermittently (only when going out so contact tracing is enabled). The only thing I can think of is I did an automatic weekly "Clean" of the phone, maybe it threw away the local sqllite database file?

tommeke commented 3 years ago

I looked up the German reports and indeed seems to be prevalent on "lower-end" phones like Huawei P8 lite and others. App is using an encryption library/service on the phone which apparently can't handle too much concurrency so gives back a "busy" signal which in turn is interpreted as an event where keys need to be re-generated which overwrites the old keys so database can't be accessed anymore because wrong keys.

ir-fuel commented 3 years ago

Thanks for reporting this issue. Indeed this is something that's already happening in the original, German, codebase. They seem to have found a workaround (I say "seem" because since it's impossible to reproduce we can't be 100% sure) and we are looking into incorporating their fix in our codebase.

What they implemented has not been released to the public yet so it remains to be seen if that actually resolves the issue for all affected users (it's scheduled in 1.4.0, but their latest version is 1.3.1).