android / android/codelab-android-workmanager
android.database.sqlite.SQLiteException: cannot rollback - no transaction is active (code 1)
- Dominant language
- Kotlin
- Stars
- 557
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
```
android.database.sqlite.SQLiteException: cannot rollback - no transaction is active (code 1)
at android.database.sqlite.SQLiteConnection.nativeExecute(Native Method)
at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:555)
at android.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:439)
at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:401)
at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:522)
at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.endTransaction(FrameworkSQLiteDatabase.java:90)
at androidx.work.impl.WorkDatabase$2.onOpen(WorkDatabase.java:169)
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:266)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
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.beginTransaction(RoomDatabase.java:352)
at androidx.work.impl.utils.ForceStopRunnable.cleanUp(ForceStopRunnable.java:205)
at androidx.work.impl.utils.ForceStopRunnable.forceStopRunnable(ForceStopRunnable.java:165)
at androidx.work.impl.utils.ForceStopRunnable.run(ForceStopRunnable.java:102)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
```
**Android Platform API Version 22**
Contributor guide
Research direction
Start by tracing the reported path through androidx.work.impl.WorkDatabase.onOpen, androidx.sqlite.db.framework.FrameworkSQLiteDatabase.endTransaction, and androidx.work.impl.utils.ForceStopRunnable on Android Platform API 22. The issue names no reproduction steps or expected behavior, so first establish the triggering database state and define completion as preventing or correctly handling this rollback exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin, sqlite
- Domain
- database, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100