Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cause 9002: file is not a database: , while compiling: select count(*) from sqlite_master; #642

Closed
raykov opened this issue Jun 18, 2020 · 180 comments · Fixed by #1433
Closed
Assignees
Labels
Add to FAQ An issue whose answer is also relevant for a broader audience bug Something isn't working help wanted Extra attention is needed hot topic 🔥 Hot Topics from the view point of the Community mirrored-to-jira This item is also tracked internally in JIRA

Comments

@raykov
Copy link

raykov commented Jun 18, 2020

Describe the bug

I'm installing the app. The next day it stops to work and starts crashing on start. Sometimes it's getting an error

Cause: 9002
Something went wrong.
file is not a database: , while compiling: select count(*) from sqlite_master;

This happened twice already. After first one I've removed and reinstalled app.

Expected behaviour

I expect the app to work longer then one day ;)

Steps to reproduce the issue

There are no any specific steps to reproduce. I'm just using the app.

Technical details

Huawei P20 Pro. (CLT-L29)
EMUI version 8.1.0
Android version 8.1.0

Additional context

Photo on 18 06 20 at 16 04


Internal Tracking Id: EXPOSUREAPP-1851

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

raykov commented Jun 18, 2020

Just found the same issue in closed with "won't fix" label. :(

#579

@raykov raykov closed this as completed Jun 18, 2020
@jakobmoellersap
Copy link
Contributor

jakobmoellersap commented Jun 18, 2020

Hi, Just noticed that you mentioned it runs twice. Can you elaborate?

@raykov
Copy link
Author

raykov commented Jun 18, 2020

Yeah, sure.

  1. I have installed it on Tuesday (June 16) morning.
  2. Next day (June 17) it stopped to work and started to crash without showing anything. (app was just closing at the start).
  3. I've tried again after few hours and the app opened
  4. But it looked like I was launching it for the first time. Taking me through the setup with explaining everything and on the step of "turn on exposure logging" it returned me this error with sqlite.
  5. I removed the app and reinstalled it again. It started to work... till today...
  6. Today I've tried to open it and got the same from the step 4

@jakobmoellersap
Copy link
Contributor

jakobmoellersap commented Jun 18, 2020

Do you have a rooted device or any special device setup that could be the issue?

@jakobmoellersap
Copy link
Contributor

jakobmoellersap commented Jun 18, 2020

Also could you give me a photo of the details screen?

@raykov
Copy link
Author

raykov commented Jun 18, 2020

Nope, I didn't root my device and I'm using manufactured setup.

@jakobmoellersap
Copy link
Contributor

jakobmoellersap commented Jun 18, 2020

can you give me the details input of the dialog? I want to see where if we can deduce the behavior from a specific call

@raykov
Copy link
Author

raykov commented Jun 18, 2020

Ah, sorry. Here they are

Photo on 18 06 20 at 20 42
Photo on 18 06 20 at 20 42 #2
Photo on 18 06 20 at 20 42 #3

@jakobmoellersap
Copy link
Contributor

jakobmoellersap commented Jun 18, 2020

Unfortunately this would still relate to encryption failure happening which is a state that should never happen. The only scenario that I can think of is that the SecureRandom Generation through the Conscrypt Provider fails at your device. For the accurate issue determination we would need more information though. I will add help needed in case we get any input from the community.

Concretely, this means that the database cannot be read due to a bad password. Is there any security software or anything else that could change the android master key or the encrypted shared preferences that contains the password for the database?

@jakobmoellersap jakobmoellersap added the help wanted Extra attention is needed label Jun 18, 2020
@brokkoli71
Copy link

brokkoli71 commented Jun 19, 2020

having similar issue with Huawei P8lite on Android 6.0:
IMG_20200619_191304
IMG_20200619_191910
IMG_20200619_191919
IMG_20200619_191926
IMG_20200619_191935

-- edit --
after reinstalling problem was solved

@jakobmoellersap
Copy link
Contributor

jakobmoellersap commented Jun 19, 2020

Taking a look at the (pretty limited) Crash Reports we have, this Issue comes up almost exclusively at Huawei and Honor Devices. Specifically, imported devices seem to be affected the most (showing up with Chinese manufacturing tags).

In this Case: Reinstalling might NOT solve the problem, but make it come up again after a day. I would thus suggest that the reinstall workaround is not working as well for this problem.

There could be different root causes for this. The first suspect is indeed an incompatible crypto provider under the hood of SecureRandom which corrupts the password generation. Another suspect (hopefully not applicable) would be that the devices actually try to look into the database files or the encrypted shared preferences and alter them somehow, making the read corrupt as well.

I would appreciate anyone with deep knowledge of huawei-specific behavior to provide us with more information while we are also trying to consistently replicate and reduce the issue to find the root cause.

@jakobmoellersap jakobmoellersap self-assigned this Jun 19, 2020
@jakobmoellersap
Copy link
Contributor

jakobmoellersap commented Jun 19, 2020

Additionally, I would ask everyone with this error to NOT post their Stack Trace in this issue (unless specifically asked for), as it will most likely be not helpful for solving the issue. Thanks, everyone!

@Martin-Luft
Copy link

Martin-Luft commented Jun 22, 2020

Same problem here with Honor 7 Premium 32 GB (Android 6). After the first installation this error occurs after 3 days I guess and I had to reinstall the whole app.

@pdeiml
Copy link

pdeiml commented Jun 22, 2020

Same error here with a Huawai ALE-L21 P8 phone and Android 6.0

The app had worked one day and had crashed in the same way after one day. I reinstalled it and then it worked for 3 days until a few minutes ago.
I did not do anything special I did not even restarted my phone.

If I delete the app I think that all information (shared keys) about other people (phones) I met are gone, aren't they?

@DerGnomi
Copy link

DerGnomi commented Jun 22, 2020

Well i have the same problem with a Huawei P8 Lite. (like pdeiml)
Worked for a few days.
Today i check the status and i had to start the init process again.
Then i got the reported error.

@tkowark
Copy link
Member

tkowark commented Jun 23, 2020

If I delete the app I think that all information (shared keys) about other people (phones) I met are gone, aren't they?

The detected RPIs are not stored by the app but the Exposure Notification Framework. Hence, deleting the app should leave the contacts untouched unless you delete them explicitly through the System settings) We‘ll add an FAQ note about the problem.

@tkowark tkowark added the Add to FAQ An issue whose answer is also relevant for a broader audience label Jun 23, 2020
@deimeke
Copy link

deimeke commented Jun 23, 2020

Same problem here, Huawei P20.

@JoTheHannes
Copy link

JoTheHannes commented Jun 24, 2020

If I delete the app I think that all information (shared keys) about other people (phones) I met are gone, aren't they?

The detected RPIs are not stored by the app but the Exposure Notification Framework. Hence, deleting the app should leave the contacts untouched unless you delete them explicitly through the System settings) We‘ll add an FAQ note about the problem.

So tracing would still be possible through the app, within the 14 day window even if the app was reinstalled after let's say 2 days? Or would the app only have access to the data from the Exposure Notification framework of those 2 days?

@tkowark
Copy link
Member

tkowark commented Jun 24, 2020

If I delete the app I think that all information (shared keys) about other people (phones) I met are gone, aren't they?

The detected RPIs are not stored by the app but the Exposure Notification Framework. Hence, deleting the app should leave the contacts untouched unless you delete them explicitly through the System settings) We‘ll add an FAQ note about the problem.

So tracing would still be possible through the app, within the 14 day window even if the app was reinstalled after let's say 2 days? Or would the app only have access to the data from the Exposure Notification framework of those 2 days?

Yes, the matching is also done by the framework, not the app and hence is performed against the entire set of collected RPIs.

If you have further questions about that, please open another question issue so we can keep this issue focused on the DB problems.

@helmutweick
Copy link

helmutweick commented Jun 25, 2020

I had the same on my Huwaei H60, Android 6.0 (see closed thread #579)
Reinstallation helped, I get status updates.
Now after few days every morning "Ursache 3, Fehler bei Kommunikation mit Google API(10)",
"unable to validate key file signature: Pipe is closed" as described in threads #737, #747
But it recovers after few minutes and a few tries and gives status.
Seems the errors are related.

@jakobmoellersap
Copy link
Contributor

jakobmoellersap commented Jun 25, 2020

Thanks for this hint. We are in contact with Google to more closely identify the issue and will update here once we have updates regarding this specific error.

@kbobrowski
Copy link
Contributor

kbobrowski commented Oct 30, 2020

We double check with Google and they are not plan to store the keys after the last Covid19 App is deleted.
Because is not aware after deleting he has to remove data in the Android settings.
This mean a save way to reset the app is:
Android > Settings > Apps > CWA > Storage > delete data/cache

We discuss how we can help to user to restore the app when the DB is failing

@thomasaugsten I checked on my device, and using this method deletes all RPIs. This will not happen only if there is another app (from another country) installed on the device

@daimpi
Copy link

daimpi commented Oct 30, 2020

@thomasaugsten @vaubaehn just for context, this question came up in #1084 b/c multiple people reported loosing their encounters in CWA after resetting their data this way (Android > Settings > Apps > CWA > Storage > delete data/cache).

@Annie-G re-reading this thread here you stated above:

Hmmm that would surprise me because last time I had the App crash and did the mentioned procedure, I still had 1 low risk encounter afterwards.

Did you have another ENF app (e.g. Italian Immuni) installed in parallel by chance?

@Annie-G
Copy link

Annie-G commented Oct 30, 2020

@thomasaugsten @vaubaehn just for context, this question came up in #1084 b/c multiple people reported loosing their encounters in CWA after resetting their data this way (Android > Settings > Apps > CWA > Storage > delete data/cache).

@Annie-G re-reading this thread here you stated above:

Hmmm that would surprise me because last time I had the App crash and did the mentioned procedure, I still had 1 low risk encounter afterwards.

Did you have another ENF app (e.g. Italian Immuni) installed in parallel by chance?

No, I had no other ENF installed.

@daimpi
Copy link

daimpi commented Oct 30, 2020

@Annie-G

No, I had no other ENF installed.

Huh, very curious… you used this procedure:

Android > Settings > Apps > CWA > Storage > delete data/cache

right?

Maybe Google has changed the ENF behavior since then? 🤷

@Annie-G
Copy link

Annie-G commented Oct 30, 2020

@Annie-G

No, I had no other ENF installed.

Huh, very curious… you used this procedure:

Android > Settings > Apps > CWA > Storage > delete data/cache

right?

Maybe Google has changed the ENF behavior since then? 🤷

Yes. Because I thought this way I would not delete the keys?
It's a while ago now and I am not 100% sure if I remember correctly?
I also checked in the settings how many encounters had been counted and they were less than before the procedure, but not zero.

@daimpi
Copy link

daimpi commented Oct 30, 2020

@Annie-G thanks for the info 🙂.
Do you still have your EN logs from back then and if so, could you share them here?

I also checked in the settings how many encounters had been counted and they were less than before the procedure, but not zero.

By "I also checked in the settings" do you mean you checked your EN log? Did your EN log not fully get reset after this procedure? I just tried this today on a secondary device and every time I did this (Android > Settings > Apps > CWA > Storage > delete data/cache) all EN log entries from before were deleted and only the one from right after CWA re-initialization was present.

@Annie-G
Copy link

Annie-G commented Oct 30, 2020

@Annie-G thanks for the info 🙂.
Do you still have your EN logs from back then and if so, could you share them here?

I also checked in the settings how many encounters had been counted and they were less than before the procedure, but not zero.

By "I also checked in the settings" do you mean you checked your EN log? Did your EN log not fully get reset after this procedure? I just tried this today on a secondary device and every time I did this (Android > Settings > Apps > CWA > Storage > delete data/cache) all EN log entries from before were deleted and only the one from right after CWA re-initialization was present.

I checked here:
Screenshot_20201030-184852

and before the reset, there were like 140 encounters, afterwards there were still 28. I was at home and for sure there were no 28 people around.

@daimpi
Copy link

daimpi commented Oct 30, 2020

@Annie-G Ahh ok that explains some of it. The number you see there is just the number of checks performed in the last 14 or so days. It has nothing to do with how many contacts you had. You can click on this number, then you see the list of actual checks that have been performed and you can even export this list there 🙂. Given that this number went down for you it seems like the EN log was indeed deleted in your case as expected… only thing which is curious is that seemingly your 1 green encounter in CWA persisted…

@thomasaugsten
Copy link
Member

thomasaugsten commented Oct 30, 2020

@daimpi I doubled check and it looks Google is now registering the data deleting and turns off the exposure notification framework the leads to a key wiping. We will update our FAQ

@svengabr
Copy link
Member

svengabr commented Nov 20, 2020

This error should be fixed with the latest version of the Android app. There was quite some time since we got the last feedback here.

Could you please update to the latest version and report back if the problems are resolved for you?

Thank you very much for your input!

Best regards,
SG

Corona-Warn-App Open Source Team

@svengabr svengabr moved this from Mirrored to Jira to Waiting for Input in [CM] cwa-app-android Nov 20, 2020
@alois31
Copy link

alois31 commented Nov 20, 2020

This issue is indeed fixed for me since a month or so. In fact, my "reproduction procedure" does not work any more (I can't be "quick enough" any more), and I've never seen this message again after the fix by @d4rken was implemented and I reset the app once more (I guess the old version corrupted the db one last time).

@Lotte85
Copy link

Lotte85 commented Nov 25, 2020

Worked for me!
It hasn't happend since, even when the Phone died because of low battery, no problems occured (before the Update I had to follow your Instruction 3 Times, twice definitely after a low battery Situation)
Thanks for your good work!!

Lotte
(Sony Xperia XZ2 compact)

This error should be fixed with the latest version of the Android app. There was quite some time since we got the last feedback here.

Could you please update to the latest version and report back if the problems are resolved for you?

Thank you very much for your input!

Best regards,
SG

Corona-Warn-App Open Source Team

@cwa-bot cwa-bot bot moved this from Waiting for Input to ToDo in [CM] cwa-app-android Nov 25, 2020
@dsarkar
Copy link
Member

dsarkar commented Nov 26, 2020

Dear @Lotte85, @alois31, Thanks for the feedback. I will close this issue now. Thanks to everybody for contributing!

On a side note, regarding the update to CWA 1.7: Please note that it is a staged rollout. Over the next two days, 100% of the users should have received the update.

Best wishes,
DS


Corona-Warn-App Open Source Team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add to FAQ An issue whose answer is also relevant for a broader audience bug Something isn't working help wanted Extra attention is needed hot topic 🔥 Hot Topics from the view point of the Community mirrored-to-jira This item is also tracked internally in JIRA