contentful / vault

Easy persistence of Contentful data for Android over SQLite.
https://contentful.github.io/vault/
Apache License 2.0
85 stars 19 forks source link

Android 10 SQLiteDatabaseCorruptException from vault #159

Closed KubaPreg closed 3 years ago

KubaPreg commented 4 years ago

Hi, we started experiencing increased number of crashes connected with vault calling openOrCreateDatabase in SqliteHelper.

What we know:

any feedback will be appreciated.

Stacktrace

Caused by: android.database.sqlite.SQLiteDatabaseCorruptException: at android.database.sqlite.SQLiteConnection.nativePrepareStatement (Native Method) at android.database.sqlite.SQLiteConnection.acquirePreparedStatement (SQLiteConnection.java:1372) at android.database.sqlite.SQLiteConnection.executeForString (SQLiteConnection.java:960) at android.database.sqlite.SQLiteConnection.setJournalMode (SQLiteConnection.java:547) at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration (SQLiteConnection.java:483) at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:316) at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:218) at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked (SQLiteConnectionPool.java:737) at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:284) at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:251) at android.database.sqlite.SQLiteDatabase.openInner (SQLiteDatabase.java:1386) at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:1336) at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:994) at android.app.ContextImpl.openOrCreateDatabase (ContextImpl.java:854) at android.app.ContextImpl.openOrCreateDatabase (ContextImpl.java:839) at android.content.ContextWrapper.openOrCreateDatabase (ContextWrapper.java:316) at com.contentful.vault.SqliteHelper.isPendingCopy (SqliteHelper.java:218) at com.contentful.vault.SqliteHelper.copyDatabase (SqliteHelper.java:197) at com.contentful.vault.SqliteHelper.<init> (SqliteHelper.java:55) at com.contentful.vault.Vault.createSqliteHelper (Vault.java:162) at com.contentful.vault.Vault.getOrCreateSqliteHelper (Vault.java:187) at com.contentful.vault.Vault.with (Vault.java:83) at com.p.a.b.a.<init> (OurProvider.kt:53) at com.p.a.b.a$a$1.a (OurProvider.kt:194) at com.p.a.b.a$a$1.a (OurProvider.kt:194) at com.p.a.b.e.a (SingletonHolder.kt:18) at com.example.ourApp.onCreate (OurApplicatonClass.java:19) at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1190) at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6859)

rafalniski commented 3 years ago

This should be fixed in version 3.2.5

KubaPreg commented 3 years ago

Updating vault to 3.2.5 have not fixed the issue. We still get errors on google play console from vault, the same as described above. @rafalniski