-
Notifications
You must be signed in to change notification settings - Fork 19
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
updating to sqlcipher-android from android-database-sqlcipher file is not a database (code 26) #34
Comments
sqlcipher-android4.5.6 version android-database-sqlcipher 4.5.4 version
|
Hi @xuhongchang, What happens when you retrieve your existing database file off the Android device and attempt to access it within DB Browser for SQLite 1? Footnotes |
how to upgrade android-database-sqlcipher 4.5.4 to sqlcipher-android4.5.6 ? Android system. If it is a new installation, it is not a problem, only the overlay installation is a problem here is log: |
Hi @xuhongchang, What happens when you pull the existing database off the Android device and access it with the password using DB Browser for SQLite 1? Footnotes |
我结合Room数据库使用时,也遇到了同样的问题,你最后是怎么解决的了? |
@andzhangs 后来我没升级库了 从 android-database-sqlcipher 4.5.4 到sqlcipher-android4.5.6 |
Hi I am also facing same issue. I tried opening with DB browser, I am able to open though. I tried migrating from net.zetetic:android-database-sqlcipher:4.5.4 to net.zetetic:sqlcipher-android:4.5.4. Here is a sample repo, I have created |
Hi @EpariNigam, Your demo application does not call |
Hey @developernotes I created 2 branches the main branch uses the old library, the new branch sql_cipher_migration uses the new library. I request you to run the app from main branch, do click insert and fetch. See, entries got created. Now from the sql_cipher_migration just click fetch, you will be able to reproduce the issue. |
Hi @developernotes hope with the mentioned provided steps, you are able to reproduce this issue. |
Hi @EpariNigam, In your branch If you change the
Footnotes |
Thanks @developernotes I will give it a try and let you know. |
Thanks @developernotes, it worked. I though toString() will just give the output of String. But, forgot that it is an array and will give hashcode 🤦♂️. |
Hi @EpariNigam, No problem at all, glad the issue is resolved for you! |
from android-database-sqlcipher 4.5.4 to sqlcipher-android4.5.6
receive some error
If it is a new installation, it is not a problem, only the overlay installation is a problem
here is log:
Failed to open database
android.database.sqlite.SQLiteException: file is not a database (code 26): , while compiling: SELECT COUNT(*) FROM sqlite_schema;
at net.zetetic.database.sqlcipher.SQLiteConnection.nativePrepareStatement(Native Method)
at net.zetetic.database.sqlcipher.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:973)
at net.zetetic.database.sqlcipher.SQLiteConnection.executeForLong(SQLiteConnection.java:628)
at net.zetetic.database.sqlcipher.SQLiteConnection.open(SQLiteConnection.java:240)
at net.zetetic.database.sqlcipher.SQLiteConnection.open(SQLiteConnection.java:202)
at net.zetetic.database.sqlcipher.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:475)
at net.zetetic.database.sqlcipher.SQLiteConnectionPool.open(SQLiteConnectionPool.java:189)
at net.zetetic.database.sqlcipher.SQLiteConnectionPool.open(SQLiteConnectionPool.java:181)
at net.zetetic.database.sqlcipher.SQLiteDatabase.openInner(SQLiteDatabase.java:1028)
at net.zetetic.database.sqlcipher.SQLiteDatabase.open(SQLiteDatabase.java:1013)
at net.zetetic.database.sqlcipher.SQLiteDatabase.openDatabase(SQLiteDatabase.java:840)
at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:359)
at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:278)
The text was updated successfully, but these errors were encountered: