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

Ursache 9002 "file ist not a database, sqlite" #579

Closed
helmutweick opened this issue Jun 17, 2020 · 31 comments
Closed

Ursache 9002 "file ist not a database, sqlite" #579

helmutweick opened this issue Jun 17, 2020 · 31 comments
Assignees
Labels
bug Something isn't working not reproducible Given the information provided, we were not able to recreate the issue wontfix This will not be worked on

Comments

@helmutweick
Copy link

Next day after installation, data base seems corupted, over night without
direct user inteference.
App started new with setting activation and permissions. Then error message:
"Ursache 9002
file ist not a database", while compiling select count(*) from sqlite_master"
Sorry, no detailed error due to lack of screenshot.

Result: cannot run app, crashes.
Can reinstall and run app but then contact data are also lost.
Huawei H60 with Android 6.0, Google Play Services 6.04, not rooted
Never had problems with file corruption.

Unbenannt

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

Issue was also mentioned for beta 11, but closed.

@tomjschwanke
Copy link
Contributor

Contact details are not lost, they're stored by Google's API.

@jakobmoellerdev
Copy link
Contributor

Thanks for your issue! Could you give us a detailed explanation of what you did in the App and when you installed the App. Also it would be interesting to know if you have any security software running on your device that could potentially trigger a reinstatiation of the Android Master Key. Did you maybe do a device reset or anything in that direction that could trigger that?

@jakobmoellerdev jakobmoellerdev self-assigned this Jun 17, 2020
@jakobmoellerdev jakobmoellerdev added the in progress The issue is currently being resolved label Jun 17, 2020
@helmutweick
Copy link
Author

Installed official version yesterday afternoon (16.06.), checked a few times to see how it behaves after cleaning cache. Next morning the issue,
No reboot in this time, I do run Avast Virus scanner.

@jakobmoellerdev
Copy link
Contributor

Okay, thanks for the explanation. From our side, we cannot reproduce, unfortunately. We would kindly ask you to reinstall the application and see if the issue persists the day after installation (so that you can show that the issue persists).

@Ritzelprimpf
Copy link

Same Problem here:

DSC_0525
DSC_0526
DSC_0527
DSC_0528

@jakobmoellerdev
Copy link
Contributor

@Ritzelprimpf can you give context information regarding device, root (if applicable), installation context, installation duration and process of installation?

@jakobmoellerdev
Copy link
Contributor

Also, could both of you try the following:

  1. Reinstall the App
  2. Toggle the Exposure Notification switch a few times (as this triggers a database write)
  3. Let the device run for a day
  4. Check on the status again

@Ritzelprimpf
Copy link

Device: Honor 10
Android Version: 8.1.0
Installation was through PlayStore and took maybe a minute or so

Reinstalling the App does seem to fix the problem. It it fails again I will let you know.

@vvye
Copy link

vvye commented Jun 17, 2020

Just reporting that I've been having the exact same problem (Huawei P8, Android 6.0). What I did was install the app, open it, and activate exposure logging - worked fine on the first run, when I opened it again a couple of hours later it started back at the welcome screen and eventually ran into the error.

Reopening the app did not fix it, but it looks like reinstalling did.

@jakobmoellerdev
Copy link
Contributor

Maybe for some Context: The only way this error occurs and that we have seen it occur, is if the read of the encrypted database failed. I am concerned that your devices alter the database file or had problems initializing the password during the first installation. If this is the case, we will have to gather more information about the context of installation as we cannot reproduce otherwise.

@helmutweick
Copy link
Author

So far so good. After reinstallaton yesterday, today first status.
Inbetween I switched off and on the "Risiko-Emittlung" and the "Mitteilungen" a few times.
Switched on and off the phone and ran an Avast scan.

@jakobmoellerdev
Copy link
Contributor

jakobmoellerdev commented Jun 18, 2020

Hi again,

After investigating more deeply into the issue, we cannot deduce a reliable error source and thus cannot reproduce. Unless we have more information regarding resolution of this issue, I will have to close this with the remark that a reinstall will fix the issue as a workaround.

I am sorry for the inconvenience, but since we have no dedicated crash reporting and can only rely on user feedback and device setups, this will have to be stalled until we have more information.

Edit: As a matter of fact, reinstalling will NOT definitively solve the problem. I incentivise to look into #642 for further updates on the issue. We are still investigating on this topic.

@jakobmoellerdev jakobmoellerdev added wontfix This will not be worked on not reproducible Given the information provided, we were not able to recreate the issue and removed in progress The issue is currently being resolved labels Jun 18, 2020
@corneliusroemer
Copy link

corneliusroemer commented Jun 18, 2020

@jakobmoellersap Maybe you should not close this as won't fix and just wait whether people can reproduce it with more information.

If you say you cannot reproduce, this may be because you're not using the same phone with the same OS version?

Also, the problems seem to have appeared only after some time - did you also wait for that long?

Closing issues and adding "wontfix" discourages the community from trying to reproduce the problem and provide better information as evidenced in this comment #642 (comment)

Dear maintainers, this may be another example of non-helpful premature closure of issues. Maybe it's time for an issue-closure-policy. I will add the hashtag #IssueClosurePolicy for now so that I can find these issues again later in case I file an issue where they could serve as examples.
@SebastianWolf-SAP @tkowark @tklingbeil @mynchau

@corneliusroemer
Copy link

Isn't it pointless that this issue gets closed just to be reopened somewhere else because someone else encounters the same error?
#IssueClosurePolicy

@helmutweick
Copy link
Author

Yes, it needs a few more days without error, before one can say that a new installaton is a satisfying solution. At least it seems to happen many times.

@jakobmoellerdev
Copy link
Contributor

You are correct. Please refer to my edited comment above.

@hannesa2
Copy link
Contributor

hannesa2 commented Jul 9, 2020

This android-database-sqlcipher is crap, I observed it one year ago
sqlcipher/android-database-sqlcipher#429
https://github.com/commonsguy/cwac-saferoom/issues/41
We used this in a app with installation > 5 millions and approximately 1.5 % of all users run into this error. We gave up and removed it

@vaubaehn
Copy link
Contributor

Hi @helmutweick , @Ritzelprimpf , @vvye , it's quite a while since you reported this bug:
"Ursache 9002 - File is not a database: ,while compiling: select count (*) from sqlite_master;"

As far as I know, the root source for this exception is not known yet.
I came across the information, that the problem often occurs with Huawai and Honor devices.
One similar feauture of many of these devices is the PrivateSpace feature (Huawai/Honor specific privacy app & data storage container; see here, here, here, or here).

Did you ever use or ever enable PrivateSpace for your phone, or might it have been preconfigured to be active when you bought it?

Are you still using CWA, with the newest version 1.2.0? If yes, is the error still persisting for you? Or is it gone?

A reply to these questions may help to get an idea, if PrivateSpace might be related to the issue you experienced.

Thanks very much in advance, kind regards,
V.

@vvye
Copy link

vvye commented Aug 13, 2020

Did you ever use or ever enable PrivateSpace for your phone, or might it have been preconfigured to be active when you bought it?

I hadn't heard of it before, and I can't find any mention of it on my device. If it's active by default, I don't know how to tell.

Are you still using CWA, with the newest version 1.2.0? If yes, is the error still persisting for you? Or is it gone?

My current experience is this:

  • CWA initially started working after some update in July.
  • Since then, every couple of days the app stops working and seems to reset: when I open it, I get back to the welcome screen, and when I try to activate exposure logging again, I get the "file is not a database" error in question.
  • Reinstalling the app makes it work again, at least for a few days until it happens again.
  • This happened just a few minutes ago. The last time it happened before that was Saturday.

Because I had to reinstall it just now (see above), I do have version 1.2.0.

By "the app is working", I mean it displays my protection status and tells me how long it has been active. I haven't gotten any warnings or any indication that things were being logged yet.

Thanks for investigating this!

@vaubaehn
Copy link
Contributor

Hi @vvye , thanks for replying!
Sad to hear, that it still didn't work out for you. Some users in another issue thread reported, that updating to Android 9.1 or 10 solved the problem for them - but I guess, your P8 is out of support here?

Thanks to your feedback and of others, initial hints actually don't point to the feature PrivateSpace.

If the problems are solved with Android 9.1 or 10, my guess is, that upto Android 8 there was a special Java-implementation of security/OpenSSL from Huawei / Honor related Android, that was not complient to the standards.
If more reports point into that direction, one could ask to dev, if it is worth to have a deeper look at that, if show stopping differences may be found between implementations, and if it is possible to find a work around for that.

But let's wait some time for more feedback.

Kind regards, V.

@vaubaehn
Copy link
Contributor

Hi @vvye , can you check if CWA is a 'geschützte App' for your device, like described here: #642 (comment)
If not, please enable it as 'geschützt' and report, if it changed anything for you.
Thank you very much in advance!

@vaubaehn
Copy link
Contributor

vaubaehn commented Aug 15, 2020

Hi @jakobmoellersap ,
can you try to trigger / reproduce the error by intentionally altering any random byte of the database file with a file monitor or simple editor?
If this produces the same stack trace, could it be in the scope of possibility, that the Huawei / Honor OS prior to Android 9.1 kill the task that handles the database, while it is open or even written to, for energy saving policies, and leave the database file corrupted on disk?

Edit: that would also explain why the error is popping up intermittently

@vvye
Copy link

vvye commented Aug 15, 2020

Hi @vvye , can you check if CWA is a 'geschützte App' for your device, like described here: #642 (comment)
If not, please enable it as 'geschützt' and report, if it changed anything for you.
Thank you very much in advance!

Just checked, and yes, it already is.

I have a tendency of completely closing apps by swiping them away on the list of open apps (if that makes sense), so maybe that's the problem? It doesn't seem likely since it wouldn't explain why the error comes up only every few days, but just to be sure I'll be keeping the app fully open now.

Thanks for being on it!

@vaubaehn
Copy link
Contributor

Hi @vvye , I think it's definitively worth a try to leave it open and not swipe it away.
I'm suspecting that the database file may be corrupted by being killed by energy saving mechanisms of your device.
Maybe it can help as a first counter measure

@jnhmn
Copy link

jnhmn commented Aug 19, 2020

I have the same issue on a Sony Xperia XZ2
Android 10 (Patch level 2020-07-01)
It just stopped working I'm not aware of any updates been installed.

I switched to airplane mode several times, don't know if this is relevant.

@vaubaehn
Copy link
Contributor

Hi @jnhmn

I have the same issue on a Sony Xperia XZ2
I switched to airplane mode several times, don't know if this is relevant.

if your phone follows a restrictive energy saving policy when switching to airplane mode, then I'd say, yes, there may be a chance that it caused it. But just a guess, though.

I'd recommend to delete CWA's data and cache. If you don't have a pending COVID-test, you'd should not loose anything important by deleting these, just time of exposure logging being active is not accurate anymore. App should open properly after deleting cache and data.
Maybe you are able to reproduce the problem by switching to airplane mode and back again?

@vaubaehn
Copy link
Contributor

Hi @jnhmn , one additional question: have you also been affected by issue #597 more or less shortly before error '9002: file is not a database' appeared on your device? Your response may help to locate the source of the problem '9002: file is not... ' more precisely. Thanks in advance for your reply. Kind regards!

@hannesa2
Copy link
Contributor

https://github.com/android/architecture-components-samples/pull/218#issuecomment-474610653

https://github.com/commonsguy/cwac-saferoom uses the same https://github.com/sqlcipher/android-database-sqlcipher like you do
implementation 'net.zetetic:android-database-sqlcipher:4.4.0'
and I observed the same errors with 4.4.0 as well.

@jnhmn
Copy link

jnhmn commented Oct 27, 2020

@vaubaehn No, I wasn't affected by the bug mentioned in issue 597

Reinstalling the app solved my problem and since then it didn't occur a second time

@vaubaehn
Copy link
Contributor

@vaubaehn No, I wasn't affected by the bug mentioned in issue 597

Reinstalling the app solved my problem and since then it didn't occur a second time

@jnhmn thanks for your feedback!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working not reproducible Given the information provided, we were not able to recreate the issue wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

9 participants