ReadYou
ReadYou copied to clipboard
SQLite "duplicate column name" startup crash on debug build
1. Environment
- Device: Samsung A55
- OS: Android 14
- APP: 0.11.1, latest debug build (https://github.com/Ashinch/ReadYou/actions/runs/14446286057)
2. Describe the bug
App crash on startup. The following is the error log:
Version: 0.11.1
Device: samsung SM-A556E
System: Android 14 (API 34)
Stack trace:
android.database.sqlite.SQLiteException: duplicate column name: isBrowser (code 1 SQLITE_ERROR[1]): , while compiling: ALTER TABLE `feed` ADD COLUMN `isBrowser` INTEGER NOT NULL DEFAULT 0
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1540)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:975)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:590)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:63)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:34)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:2652)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:2574)
at androidx.sqlite.db.framework.FrameworkSQLiteDatabase.execSQL(FrameworkSQLiteDatabase.kt:1)
at me.ash.reader.infrastructure.db.AndroidDatabase_AutoMigration_5_6_Impl.migrate(AndroidDatabase_AutoMigration_5_6_Impl.java:3)
at androidx.room.RoomOpenHelper.onUpgrade(RoomOpenHelper.kt:160)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onUpgrade(FrameworkSQLiteOpenHelper.kt:15)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:519)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:417)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableOrReadableDatabase(FrameworkSQLiteOpenHelper.kt:5)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.innerGetDatabase(FrameworkSQLiteOpenHelper.kt:64)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getSupportDatabase(FrameworkSQLiteOpenHelper.kt:24)
at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.kt:10)
at androidx.room.RoomDatabase.inTransaction(RoomDatabase.kt:5)
at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.kt:1)
at androidx.room.RoomDatabase.query(RoomDatabase.kt:4)
at androidx.room.util.DBUtil.query(DBUtil.kt:12)
at me.ash.reader.domain.repository.AccountDao_Impl$9.call(AccountDao_Impl.java:2)
at me.ash.reader.domain.repository.AccountDao_Impl$9.call(AccountDao_Impl.java:1)
at androidx.room.CoroutinesRoom$Companion$execute$4$job$1.invokeSuspend(CoroutinesRoom.kt:10)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:9)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:111)
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)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@fdfcb4b, Dispatchers.Default]
A breaking change which would corrupt the database was added in #917, if you've installed a build before https://github.com/Ashinch/ReadYou/commit/00d7ec1c9d5bfb53311ffa53d57e46a7cc84ad13 and update to any build after, you'll need to clear the app data or perform a clean install
I see, noted