Fatal Exception: net.sqlcipher.database.SQLiteException file is not a database: , while compiling: select count(*) from sqlite_master;
IrfanMalikAndroid opened this issue · 5 comments
Fatal Exception: net.sqlcipher.database.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master;
at net.sqlcipher.database.SQLiteCompiledSql.native_compile()
at net.sqlcipher.database.SQLiteCompiledSql.compile(:15)
at net.sqlcipher.database.SQLiteCompiledSql.(:30)
at net.sqlcipher.database.SQLiteProgram.(:103)
at net.sqlcipher.database.SQLiteQuery.()
at net.sqlcipher.database.SQLiteDirectCursorDriver.query(:7)
at net.sqlcipher.database.SQLiteDatabase.rawQueryWithFactory(:33)
at net.sqlcipher.database.SQLiteDatabase.rawQuery(:1)
at net.sqlcipher.database.SQLiteDatabase.keyDatabase(:30)
at net.sqlcipher.database.SQLiteDatabase.openDatabaseInternal(:14)
at net.sqlcipher.database.SQLiteDatabase.openDatabase(:14)
at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(:7)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(:85)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(:9)
This indicates that an incorrect key is being used to open the database file. It is not a defect. Check that the key material matches the key used to create the database. If you have other questions open a thread on the SQLCipher discussion forum: https://discuss.zetetic.net/c/sqlcipher/5
I think key using same and cannot get the actual point of crashing, if its version issue then i am using this version
implementation "net.zetetic:android-database-sqlcipher:4.5.1"
Did you previously upgrade from an earlier version of SQLCipher?
from simple sql to cipher i have updated
@IrfanMalikAndroid In that case, you will need to convert the plaintext database using the procedure described here: