Status Update
Comments
da...@google.com <da...@google.com> #2
I'm not sure how to edit the description. But forgot to add that this will work when the app is in the foreground. It just doesn't work when you lock your device. I test this by moving the app to the background and then locking my device and checking the logs in Android Studio.
Description
Version used: 2.7.1
Devices/Android versions reproduced on: Google bluejay(pixel 6a)/ Android 14
Exception java.lang.IllegalStateException: The file system on the device is in a bad state. WorkManager cannot access the app's internal data store.
at androidx.work.impl.utils.ForceStopRunnable.run (ForceStopRunnable.java:128)
at androidx.work.impl.utils.SerialExecutor$Task.run (SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:644)
at java.lang.Thread.run (Thread.java:1012)
Caused by android.database.sqlite.SQLiteDatabaseLockedException: database is locked (code 5 SQLITE_BUSY)
at android.database.sqlite.SQLiteConnection.nativeExecute
at android.database.sqlite.SQLiteConnection.execute (SQLiteConnection.java:740)
at android.database.sqlite.SQLiteSession.beginTransactionUnchecked (SQLiteSession.java:336)
at android.database.sqlite.SQLiteSession.beginTransaction (SQLiteSession.java:311)
at android.database.sqlite.SQLiteDatabase.beginTransaction (SQLiteDatabase.java:814)
at android.database.sqlite.SQLiteDatabase.beginTransaction (SQLiteDatabase.java:797)
at android.database.sqlite.SQLiteDatabase.beginTransaction (SQLiteDatabase.java:653)
at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.beginTransaction (FrameworkSQLiteDatabase.java:69)
at androidx.work.impl.WorkDatabase$2.onOpen (WorkDatabase.java:163)
at androidx.work.impl.WorkDatabase_Impl$1.onOpen (WorkDatabase_Impl.java:113)
at androidx.room.RoomOpenHelper.onOpen (RoomOpenHelper.java:136)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onOpen (FrameworkSQLiteOpenHelper.java:195)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:427)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:316)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase (FrameworkSQLiteOpenHelper.java:145)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase (FrameworkSQLiteOpenHelper.java:106)
at androidx.room.RoomDatabase.inTransaction (RoomDatabase.java:476)
at androidx.room.RoomDatabase.assertNotSuspendingTransaction (RoomDatabase.java:281)
at androidx.work.impl.model.SystemIdInfoDao_Impl.getWorkSpecIds (SystemIdInfoDao_Impl.java:120)
at androidx.work.impl.background.systemjob.SystemJobScheduler.reconcileJobs (SystemJobScheduler.java:298)
at androidx.work.impl.utils.ForceStopRunnable.cleanUp (ForceStopRunnable.java:249)
at androidx.work.impl.utils.ForceStopRunnable.forceStopRunnable (ForceStopRunnable.java:215)
at androidx.work.impl.utils.ForceStopRunnable.run (ForceStopRunnable.java:110)