Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

android.database.sqlite.SQLiteException: cannot rollback - no transaction is active (code 1)

Open
#239 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, kotlin, sqlite
Domain
database, mobile

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.

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

Dominant language
Kotlin
Stars
557
Forks
242
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from android/codelab-android-workmanager

All issues in android/codelab-android-workmanager

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.