'What is the possible source of android.database.sqlite.SQLiteCantOpenDatabaseException for an app not using SQLite

An app occasionally has crashes caused by android.database.sqlite.SQLiteCantOpenDatabaseException. It is very rare, so it is not a significant problem, but I am curious about the possible cause of this exception. The app does not use SQLite. I wonder if a library uses it.

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 androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase (FrameworkSQLiteOpenHelper.java:92)
  at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase (FrameworkSQLiteOpenHelper.java:53)
  at androidx.room.RoomDatabase.beginTransaction (RoomDatabase.java:328)
  at androidx.work.impl.utils.ForceStopRunnable.cleanUp (ForceStopRunnable.java:135)
  at androidx.work.impl.utils.ForceStopRunnable.run (ForceStopRunnable.java:79)
  at androidx.work.impl.utils.SerialExecutor$Task.run (SerialExecutor.java:75)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:923)
Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: 
  at android.database.sqlite.SQLiteConnection.nativeOpen (SQLiteConnection.java)
  at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:224)
  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 androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase (FrameworkSQLiteOpenHelper.java:92)
  at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase (FrameworkSQLiteOpenHelper.java:53)
  at androidx.room.RoomDatabase.beginTransaction (RoomDatabase.java:328)
  at androidx.work.impl.utils.ForceStopRunnable.cleanUp (ForceStopRunnable.java:135)
  at androidx.work.impl.utils.ForceStopRunnable.run (ForceStopRunnable.java:79)
  at androidx.work.impl.utils.SerialExecutor$Task.run (SerialExecutor.java:75)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:923)

Update 2022-04-22

Here is another similar crash that happens occasionally:

Type java.lang.IllegalStateException
java.lang.IllegalStateException: 
  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:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:919)
Caused by: 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:915)
  at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:895)
  at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:759)
  at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:748)
  at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:374)
  at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:317)
  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)
  at androidx.work.impl.utils.SerialExecutor$Task.run (SerialExecutor.java:91)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:919)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source