nextcloud / nextcloud/talk-android
Database onMigrate RuntimeException
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 739
- Forks
- 321
- Avg merge
- 14h 59m
- Merged PRs (30d)
- 151
Description
From gplay console reported for 21.2.0 RC1
Exception java.lang.RuntimeException:
at androidx.room.BaseRoomConnectionManager.onMigrate (RoomConnectionManager.kt:212)
at androidx.room.RoomConnectionManager$SupportOpenHelperCallback.onUpgrade (RoomConnectionManager.android.kt:152)
at net.zetetic.database.sqlcipher.SupportHelper$1.onUpgrade (SupportHelper.java:27)
at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:403)
at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:278)
at net.zetetic.database.sqlcipher.SupportHelper.getWritableDatabase (SupportHelper.java:60)
at androidx.room.driver.SupportSQLiteDriver.open (SupportSQLiteDriver.android.kt:26)
at androidx.room.driver.SupportSQLiteConnectionPool.getSupportConnection (SupportSQLiteConnectionPool.android.kt:35)
at androidx.room.driver.SupportSQLiteConnectionPool.useConnection (SupportSQLiteConnectionPool.android.kt:42)
at androidx.room.RoomConnectionManager.useConnection (RoomConnectionManager.android.kt:126)
at androidx.room.RoomDatabase.useConnection$room_runtime_release (RoomDatabase.android.kt:593)
at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$$inlined$compatCoroutineExecute$DBUtil__DBUtil_androidKt$1.invokeSuspend (DBUtil.android.kt:113)
at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$$inlined$compatCoroutineExecute$DBUtil__DBUtil_androidKt$1.invoke (Unknown Source:8)
at androidx.room.util.DBUtil__DBUtil_androidKt$performSuspending$$inlined$compatCoroutineExecute$DBUtil__DBUtil_androidKt$1.invoke (Unknown Source:4)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn (Undispatched.kt:61)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext (Builders.common.kt:163)
at kotlinx.coroutines.BuildersKt.withContext (Unknown Source:1)
at androidx.room.util.DBUtil__DBUtil_androidKt.performSuspending (DBUtil.android.kt:251)
at androidx.room.util.DBUtil.performSuspending (Unknown Source:1)
at androidx.room.RxRoom$Companion$createMaybe$1.invokeSuspend (RxRoom.kt:83)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104)
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)
There seems to be something wrong with DB Migrations.
According to https://github.com/nextcloud/talk-android/milestone/96?closed=1 the only PRs that touch the migrations are
- https://github.com/nextcloud/talk-android/pull/4971/
- https://github.com/nextcloud/talk-android/pull/4973/
The database was also touched in
Please note:
- This exception will postpone the 21.2.0 release to production at least by 2 weeks as i won't release this before my vacation (4.8.-16.8.).
- This has NOTHING to do with https://github.com/nextcloud/talk-android/pull/5175 which is not included in the stable-21.2 branch.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with androidx.room.BaseRoomConnectionManager.onMigrate at RoomConnectionManager.kt:212 and the migration-related changes in PRs 4971 and 4973. Compare those with the database changes in PR 5155, then reproduce the 21.2.0 RC1 upgrade failure. Done means identifying and resolving the migration exception and confirming the database upgrade succeeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- database, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100