Hi, i’m experiencing mysterious problem - sometimes [SQLiteException: not an error ] is thrown from the SqlitopenHelper. getWritableDatabase()
I googled quite a lot and it seems that people see this error just sometimes. It’s not something that appears constantly. And it disappears if user reinstalls the application. In my case exception is thrown in 100% runs when application goes to prod server. Important thing is that password for crypting db is recieved from there.
I already did quite a lot of things trying to figure out what’s going on:
- added the code for cleaning up icudt46l.dat before loadLibs()
- renewed sqlcipher to the last version
- dug through the code from the repository - just to understand who returns “not an error” message
- tried to use simple key for encryption (simple as “test123”) without using the one from server
- checked if app has anough rights to write to db path(sick idea, but still had to be check)
- tried to call Sqlitedatabase.openOrCreateDatabase(…) instead of getWritableDatabase()
- and a lot more stuff… .
I’m quite sure that all necessary things(putting icudt46l.dat to assets, calling loadLibs()) are done correctly. Well, just because it works fine with dev server and the only difference is password.
What I want to understand is under what circumstances native call SQLiteDatabase.dbopen(…) throws this exception? Is it registerLoggingFunc() or sqlite3_open_v2f() or maybe sqlite3_soft_heap_limit().
To be more specific: what call from the dbopen method fails and produces “not an error” message?
I believe that if I knew that i could understand the root of my problem.
The stack trace is
net.sqlcipher.database.SQLiteException: not an error
at net.sqlcipher.database.SQLiteDatabase.dbopen(Native Method)
Any hints will be appreciated!