Closed foss- closed 9 months ago
Hmm, I recently added some missing foreign keys to the statuses
table. If you uninstall and reinstall, I think think the issue will resolve itself. That won't solve the root cause of the violation, but I have a theory on why that happened.
Let me know if uninstalling and reinstalling doesn't fix the issue for you
Thanks for the reply. Uninstalling, re-installing and re-adding account resolves the problem.
Since some versions mozilla social nightly crashes on open when used with a friendica account. If you think it is helpful I could try to find out the exact version where this broke but will need to find the time to do that. Maybe logcat output is already helpful to understand and resolve the problem?
Android 13.1 mozilla.social nightly 0.1.0.86
logcat:
``` 01-26 12:21:02.097 8909 8909 E AndroidRuntime: FATAL EXCEPTION: main 01-26 12:21:02.097 8909 8909 E AndroidRuntime: Process: org.mozilla.social.nightly, PID: 8909 01-26 12:21:02.097 8909 8909 E AndroidRuntime: android.database.sqlite.SQLiteConstraintException: Foreign key violation(s) detected in 'statuses'. 01-26 12:21:02.097 8909 8909 E AndroidRuntime: Number of different violations discovered: 2 01-26 12:21:02.097 8909 8909 E AndroidRuntime: Number of rows in violation: 94 01-26 12:21:02.097 8909 8909 E AndroidRuntime: Violation(s) detected in the following constraint(s): 01-26 12:21:02.097 8909 8909 E AndroidRuntime: Parent Table = accounts, Foreign Key Constraint Index = 1 01-26 12:21:02.097 8909 8909 E AndroidRuntime: Parent Table = statuses, Foreign Key Constraint Index = 2 01-26 12:21:02.097 8909 8909 E AndroidRuntime: 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at okio.Utf8.foreignKeyCheck(Unknown Source:207) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.paging.Pager$$ExternalSynthetic$IA1.m(SourceFile:49) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.work.impl.WorkDatabase_AutoMigration_13_14_Impl.migrate(Unknown Source:185) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.room.RoomOpenHelper.onUpgrade(Unknown Source:159) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onUpgrade(Unknown Source:14) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:416) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableOrReadableDatabase(Unknown Source:4) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.innerGetDatabase(Unknown Source:63) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getSupportDatabase(Unknown Source:23) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(Unknown Source:9) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at io.sentry.android.sqlite.SentrySupportSQLiteOpenHelper$sentryReadableDatabase$2.invoke(SourceFile:5) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at io.sentry.android.sqlite.SentrySupportSQLiteOpenHelper$sentryReadableDatabase$2.invoke(SourceFile:1) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at kotlin.SynchronizedLazyImpl.getValue(Unknown Source:20) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at io.sentry.android.sqlite.SentrySupportSQLiteOpenHelper.getWritableDatabase(Unknown Source:2) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.room.RoomDatabase.beginTransaction(Unknown Source:10) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.room.RoomDatabaseKt$withTransaction$transactionBlock$1.invokeSuspend(Unknown Source:58) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.room.RoomDatabaseKt$withTransaction$transactionBlock$1.invoke(Unknown Source:12) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at okio.internal.ZipKt.startUndispatchedOrReturn(Unknown Source:4) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at coil.ImageLoaders.withContext(Unknown Source:73) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.room.RoomDatabaseKt$startTransactionCoroutine$2$1$1.invokeSuspend(Unknown Source:87) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.run(Unknown Source:114) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at kotlinx.coroutines.EventLoopImplBase.processNextEvent(Unknown Source:138) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at coil.ImageLoaders.runBlocking(Unknown Source:102) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.work.impl.utils.WorkProgressUpdater$1.run(Unknown Source:166) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at androidx.work.impl.WorkerWrapper$$ExternalSyntheticLambda0.run(Unknown Source:327) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: at java.lang.Thread.run(Thread.java:1012) 01-26 12:21:02.097 8909 8909 E AndroidRuntime: Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@3cd5ddc, Dispatchers.Main.immediate] ```