mollyim / mollyim-android

Enhanced and security-focused fork of Signal.
GNU Affero General Public License v3.0
1.62k stars 88 forks source link

Crash white/black screen on app start #124

Closed justinormont closed 9 months ago

justinormont commented 2 years ago

Is there an existing issue for this?

Bug description

Phone was low on space, so I suspect DB corruption. Plenty of free space currently, though the App won't start due to crashing on startup.

I upgraded from an earlier, year old version (v4.73.4-1), which also exhibited the same issue.

Output of /adb logcat:

--------- beginning of crash 08-19 14:37:23.736 15919 15919 E AndroidRuntime: FATAL EXCEPTION: main 08-19 14:37:23.736 15919 15919 E AndroidRuntime: Process: im.molly.app, PID: 15919 08-19 14:37:23.736 15919 15919 E AndroidRuntime: java.lang.RuntimeException: Unable to create application org.thoughtcrime.securesms.ApplicationContext: java.lang.IllegalStateException: getDatabase called recursively 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6720) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at android.app.ActivityThread.access$1300(ActivityThread.java:237) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7660) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: Caused by: java.lang.IllegalStateException: getDatabase called recursively 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:313) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:297) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.database.helpers.SignalDatabaseMigrations.getLocalAci(SignalDatabaseMigrations.kt:2101) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.database.helpers.SignalDatabaseMigrations.migrate(SignalDatabaseMigrations.kt:1680) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.database.SignalDatabase.onUpgrade(SignalDatabase.kt:141) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:395) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:297) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.database.SignalDatabase.getRawReadableDatabase(SignalDatabase.kt:159) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.database.SignalDatabase$Companion.hasTable(SignalDatabase.kt:258) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.database.SignalDatabase.hasTable(Unknown Source:2) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.database.KeyValueDatabase.onCreate(KeyValueDatabase.java:82) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:390) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at net.zetetic.database.sqlcipher.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:297) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.database.KeyValueDatabase.getDataSet(KeyValueDatabase.java:111) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.keyvalue.KeyValueStore.initializeIfNecessary(KeyValueStore.java:150) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.keyvalue.KeyValueStore.containsKey(KeyValueStore.java:87) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.keyvalue.AccountValues.(AccountValues.kt:66) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.keyvalue.SignalStore.(SignalStore.java:63) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.keyvalue.SignalStore.getInstance(SignalStore.java:53) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.keyvalue.SignalStore.settings(SignalStore.java:209) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.notifications.NotificationChannels.onCreate(NotificationChannels.java:609) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.notifications.NotificationChannels.create(NotificationChannels.java:95) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.ApplicationContext.lambda$onCreateUnlock$2(ApplicationContext.java:181) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.ApplicationContext.$r8$lambda$3lEYlcL2T3zUtMxdqfNtgyqtbYI(Unknown Source:0) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.ApplicationContext$$ExternalSyntheticLambda40.run(Unknown Source:2) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.util.AppStartup.execute(AppStartup.java:144) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.ApplicationContext.onCreateUnlock(ApplicationContext.java:221) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.ApplicationContext.onUnlock(ApplicationContext.java:276) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.ApplicationContext.initializePassphraseLock(ApplicationContext.java:393) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at org.thoughtcrime.securesms.ApplicationContext.onCreate(ApplicationContext.java:155) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6715) 08-19 14:37:23.736 15919 15919 E AndroidRuntime: ... 8 more

Side question -- is clearing the App Cache safe to do?

Possibly related:

Molly version

Molly v5.4.4.5-1

Android version

Android 11

Device

Pixel 4 XL

Link to debug log

App won't start, therefore can't send this log.

evilmicrowizard commented 2 years ago

I also have this issue. Occurred after (incautiously) upgrading from a version that was showing a notification that I could no longer send messages, only view past ones, and I didn't first take a messages backup. If I wait long enough after launching, I'll get an Android system popup that says that Molly is not responding, with the choices to Close App or Wait.

pooblyfoo commented 1 year ago

I have this same issue. Old version of signal, updated, now when launching on android the screen is white, then black, then just hangs until os says not responding

valldrac commented 1 year ago

I'm afraid that migrations from a very old version of Signal or Molly is not well supported right now. If it's not the case, please report the version you're trying to upgrade.

valldrac commented 9 months ago

This ticket is from a really old version. This bug is already fixed.