Random SQLiteDatabaseLockedException

126 views Asked by At

I am receiving this crash in firebase:

Fatal Exception: android.database.sqlite.SQLiteDatabaseLockedException: database is locked (Sqlite code 5), (OS error - 11:Try again) at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java) at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:591) at android.database.sqlite.SQLiteSession.beginTransactionUnchecked(SQLiteSession.java:332) at android.database.sqlite.SQLiteSession.beginTransaction(SQLiteSession.java:311) at android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:532) at android.database.sqlite.SQLiteDatabase.beginTransactionNonExclusive(SQLiteDatabase.java:467) at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.beginTransactionNonExclusive(FrameworkSQLiteDatabase.java:78) at androidx.room.RoomDatabase.internalBeginTransaction(RoomDatabase.java:570) at androidx.room.RoomDatabase.beginTransaction(RoomDatabase.java:555) at androidx.work.impl.utils.StopWorkRunnable.run(StopWorkRunnable.java:56) at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:776)

I am never catch it during the development process, but I am receiving it from Firebase Crashlytics, looks like it kind of random. For database I am using room. Is there any chance that I can fix it by myself?

Seems like the only thing that I am able to do - to update room version, but it does not help. Maybe I need to add some flag to the database.

0

There are 0 answers