You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SQLiteDatabaseCorruptException: file is encrypted or is not a database (code 26) #41
In certain cases I get reports of the following error, however, I am unable to reproduce it reliably right now. I am not sure if it has to do directly with this library, but I am using it in my project. I do not have file encryption.
Does this happen for someone else as well, by any chance. Do you have a clue, of it is caused by the library, or if it is an error of SQLLite or the android file system.
2018-11-19 10:48:30.751 12786-12859/? E/AndroidRuntime: FATAL EXCEPTION: Thread-13
Process: com.myapp.example, PID: 12786
android.database.sqlite.SQLiteDatabaseCorruptException: file is encrypted or is not a database (code 26)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:599)
at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)
at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)
at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:842)
at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:830)
at android.database.sqlite.SQLiteDatabase.getVersion(SQLiteDatabase.java:940)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:311)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:262)
at com.colintmiller.simplenosql.db.SimpleNoSQLDBHelper.getEntities(SimpleNoSQLDBHelper.java:116)
at com.colintmiller.simplenosql.db.SimpleNoSQLDBHelper.getEntities(SimpleNoSQLDBHelper.java:107)
at com.colintmiller.simplenosql.threading.DataDispatcher.retrieve(DataDispatcher.java:121)
at com.colintmiller.simplenosql.threading.DataDispatcher.run(DataDispatcher.java:83)
I've not seen that. Is it on a device or emulator? Does it happen in the wild or are you just locally testing? The system should automatically create a DB file when first running.
This was on a real device. Nexus 5X with Android 8.1.0 afaik. This report happened during testing in our team. We are not yet sure, if it happens in the wild.
When you say "the system", you mean Android itself should create the DB, right? Could it have something to do with file system permissions and FileProviders? Although, I believe, this shouldn't be the case.
Activity
Jearil commentedon Nov 26, 2018
I've not seen that. Is it on a device or emulator? Does it happen in the wild or are you just locally testing? The system should automatically create a DB file when first running.
peshkira commentedon Nov 28, 2018
This was on a real device. Nexus 5X with Android 8.1.0 afaik. This report happened during testing in our team. We are not yet sure, if it happens in the wild.
When you say "the system", you mean Android itself should create the DB, right? Could it have something to do with file system permissions and FileProviders? Although, I believe, this shouldn't be the case.