android-app
android-app copied to clipboard
Google Play Issue : android.database.sqlite.SQLiteCantOpenDatabaseException
java.lang.ExceptionInInitializerError:
at fr.gaulupeau.apps.Poche.data.DbConnection.getSession (DbConnection.java:31)
at fr.gaulupeau.apps.Poche.ui.IconUnreadWidget.updateAppWidget (IconUnreadWidget.java:30)
at fr.gaulupeau.apps.Poche.ui.IconUnreadWidget.onUpdate (IconUnreadWidget.java:67)
at android.appwidget.AppWidgetProvider.onReceive (AppWidgetProvider.java:66)
at android.app.ActivityThread.handleReceiver (ActivityThread.java:3177)
at android.app.ActivityThread.-wrap18 (ActivityThread.java)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1653)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:156)
at android.app.ActivityThread.main (ActivityThread.java:6523)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:832)
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException:
at android.database.sqlite.SQLiteConnection.nativeOpen (Native Method)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:219)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:203)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked (SQLiteConnectionPool.java:511)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:194)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:183)
at android.database.sqlite.SQLiteDatabase.openInner (SQLiteDatabase.java:880)
at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:864)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:767)
at android.app.ContextImpl.openOrCreateDatabase (ContextImpl.java:739)
at android.content.ContextWrapper.openOrCreateDatabase (ContextWrapper.java:289)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:235)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:175)
at org.greenrobot.greendao.database.DatabaseOpenHelper.getWritableDb (DatabaseOpenHelper.java:59)
at fr.gaulupeau.apps.Poche.data.DbConnection.getSession (DbConnection.java:45)
at fr.gaulupeau.apps.Poche.data.DbConnection$Holder.<clinit> (DbConnection.java:69)
On Huawei P9 (HWEVA), Android 7.0
, version 210
Version 227. Google Pixel 5 (redfin), 7680MB RAM, Android 11:
android.database.sqlite.SQLiteCantOpenDatabaseException:
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:252)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:205)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked (SQLiteConnectionPool.java:505)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:206)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:198)
at android.database.sqlite.SQLiteDatabase.openInner (SQLiteDatabase.java:918)
at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:898)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:762)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:751)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:373)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:316)
at org.greenrobot.greendao.database.DatabaseOpenHelper.getWritableDb (DatabaseOpenHelper.java:73)
at fr.gaulupeau.apps.Poche.data.DbConnection.getSession (DbConnection.java:34)
at fr.gaulupeau.apps.Poche.data.DbConnection$Holder.<clinit> (DbConnection.java:54)
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException:
at android.database.sqlite.SQLiteConnection.nativeOpen (Native Method)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:224)
Version 226. OnePlus OnePlus Nord (Nord), 7680MB RAM, Android 10
android.database.sqlite.SQLiteCantOpenDatabaseException:
at android.database.sqlite.SQLiteConnection.nativeOpen (Native Method)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:215)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:197)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked (SQLiteConnectionPool.java:505)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:206)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:198)
at android.database.sqlite.SQLiteDatabase.openInner (SQLiteDatabase.java:930)
at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:910)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:774)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:763)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:374)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:317)
at org.greenrobot.greendao.database.DatabaseOpenHelper.getWritableDb (DatabaseOpenHelper.java:73)
at fr.gaulupeau.apps.Poche.data.DbConnection.getSession (DbConnection.java:34)
at fr.gaulupeau.apps.Poche.data.DbConnection$Holder.<clinit> (DbConnection.java:54)
Samsung Galaxy Tab A 8.0 (gtasliteltevzw), 2048MB RAM, Android 10:
android.database.sqlite.SQLiteCantOpenDatabaseException:
at android.database.sqlite.SQLiteConnection.nativeOpen (Native Method)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:300)
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:1331)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:967)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:955)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:448)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:391)
at org.greenrobot.greendao.database.DatabaseOpenHelper.getWritableDb (DatabaseOpenHelper.java:73)
at fr.gaulupeau.apps.Poche.data.DbConnection.getSession (DbConnection.java:34)
at fr.gaulupeau.apps.Poche.data.DbConnection$Holder.<clinit> (DbConnection.java:54)
Seems to still happen to some users. And I still have no idea why (partially because Google Console hides the exception message).
If the DB file gets corrupted, it would make sense to automatically remove the DB and start anew. Not sure whether it can happen for other reasons.