Signal-android: Crash after newest Update via Playstore

Created on 7 Sep 2018  路  39Comments  路  Source: signalapp/Signal-Android

Since the update from yesterday, the app crashes right after starting.
After reinstall, ist crashes after restoring a backup, and after eacht restart after that.
After reinstalling without restoring the backup, it works again.

Most helpful comment

Ok, 4.25.10 should be in the beta channel. Was able to repro the crash and verify it was fixed with this release, so hopefully everything goes smoothly for everyone :) Thank you for the understanding!

All 39 comments

I have experienced the same problem on a Pixel 2 XL with Android 9. It appears that the update from last night prevents Signal from starting. When I received the Pixel 2 XL I exported Signal's data from my older Nexus 6P and then imported that archive onto the Pixel 2 XL. Signal has worked perfectly on the Pixel 2 XL until Signal 4.25.9 was received from the Play Store. I do not wish to lose my large archive of messages by reinstalling Signal and restoring from a backup.

Signal Desktop also isn't starting but works after manual reinstall.

Do any of you have custom notifications setup in general or for specific people? If so, what are those customizations?

Also, do you know what Signal version you were upgrading from?

Thanks!

Sent crash report.

I have had no special notfications. In fact, my smartphone is 3 days old, signal worked for 2 of these. So the previous version must have been the one, that was available in play store 3 days ago. Importing my backup from my old phone worked perfectly on that version.

i just tried to migrate my Signal data to my new phone using this method (downgrade the apk, backup/restore, update Signal).

i tried to do this using org.thoughtcrime.securesms-2.28.1-156-minAPI9.apk, but experienced this instant crash at start after the update. may very well be because of my messing around, but i did this about a year ago successfully (this time i needed root for restorecon).

the coincidence of this bug and my upgrade is rather unfortunate.

EDIT: i reinstalled from play store on my old phone, and it crashes at start there, too.

again, not sure it's related, but here's an exception that happens on my old phone (i.e. on a phone where i didn't mess around much besides creating an adb backup, pm uninstall -k the app, and then install it again from play store):

FATAL EXCEPTION: main
Process: org.thoughtcrime.securesms, PID: 17836
java.lang.RuntimeException: Unable to create application org.thoughtcrime.securesms.ApplicationContext: java.lang.NullPointerException: Attempt to invoke virtual method 'javax.crypto.SecretKey java.security.KeyStore$SecretKeyEntry.getSecretKey()' on a null object reference
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5758)
    at android.app.ActivityThread.-wrap1(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1659)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6518)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'javax.crypto.SecretKey java.security.KeyStore$SecretKeyEntry.getSecretKey()' on a null object reference
    at org.thoughtcrime.securesms.crypto.KeyStoreHelper.getKeyStoreEntry(KeyStoreHelper.java:106)
    at org.thoughtcrime.securesms.crypto.KeyStoreHelper.unseal(KeyStoreHelper.java:65)
    at org.thoughtcrime.securesms.crypto.DatabaseSecretProvider.getEncryptedDatabaseSecret(DatabaseSecretProvider.java:58)
    at org.thoughtcrime.securesms.crypto.DatabaseSecretProvider.getOrCreateDatabaseSecret(DatabaseSecretProvider.java:29)
    at org.thoughtcrime.securesms.database.DatabaseFactory.<init>(DatabaseFactory.java:150)
    at org.thoughtcrime.securesms.database.DatabaseFactory.getInstance(DatabaseFactory.java:64)
    at org.thoughtcrime.securesms.database.DatabaseFactory.getSmsDatabase(DatabaseFactory.java:79)
    at org.thoughtcrime.securesms.service.ExpiringMessageManager.<init>(ExpiringMessageManager.java:29)
    at org.thoughtcrime.securesms.ApplicationContext.initializeExpiringMessageManager(ApplicationContext.java:180)
    at org.thoughtcrime.securesms.ApplicationContext.onCreate(ApplicationContext.java:95)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1120)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5755)
    ... 8 more

So the stack traces I get from the Play Console just indicate a generic database upgrade problem. And I've been trying to repro this all morning to no avail. This is only happening to a handful of users, but also happening on stock devices like Pixels, so I'm assuming it has something to do with the data that's in your databases.

So some questions for all of you:

  • Do any of you have contacts with interesting characters in their names? I've tried to repro this by having contacts with emoji and random unicode characters in their name to no avail, but maybe there's a specific character set that's causing problems.
  • Do any of you have custom notifications set for contacts?
  • Do any of you have groups with interesting names or custom notifications?
  • Can anyone get me adb logcat output? I know you'll be unable to submit a debug log, but crash logs in general could be helpful here. The Play Console usually has oddly-truncated stack traces.

Lineage 15.1 (Android 8.1.0 (Oreo)) Phone was installed about a week ago with playstore version of signal. Current Signal app version listed as installed on play store info page is 4.24.8. Current Signal app version provided by app info is 4.25.9. App store mirror shows next oldest non-beta version as 4.24.4.

09-07 09:38:08.637 25957 25957 I PersistentAlarmManagerListener: class org.thoughtcrime.securesms.service.RotateSignedPreKeyListener scheduling for: 1536470916206 09-07 09:38:08.640 25957 25957 I PersistentAlarmManagerListener: class org.thoughtcrime.securesms.service.DirectoryRefreshListener scheduling for: 1536341476035 09-07 09:38:08.642 25957 25957 I PersistentAlarmManagerListener: class org.thoughtcrime.securesms.service.LocalBackupListener scheduling for: 1536389008707 09-07 09:38:08.661 25957 25957 I org.webrtc.Logging: NativeLibrary: Loading native library. 09-07 09:38:08.661 25957 25957 I org.webrtc.Logging: NativeLibrary: Loading library: jingle_peerconnection_so 09-07 09:38:08.693 25957 25990 V Cursor : Filling cursor window with start position:0 required position:0 09-07 09:38:08.695 25957 25990 I SQLCipherOpenHelper: Upgrading database: 10, 12 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: Couldn't open signal.db for writing (will try read-only): 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: net.sqlcipher.database.SQLiteException: duplicate column name: quote_missing: ALTER TABLE mms ADD COLUMN quote_missing INTEGER DEFAULT 0 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at net.sqlcipher.database.SQLiteDatabase.native_execSQL(Native Method) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at net.sqlcipher.database.SQLiteDatabase.execSQL(SQLiteDatabase.java:2363) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper.onUpgrade(SQLCipherOpenHelper.java:245) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:178) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at net.sqlcipher.database.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:233) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at net.sqlcipher.database.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:220) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper.getReadableDatabase(SQLCipherOpenHelper.java:296) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at org.thoughtcrime.securesms.database.SmsDatabase.getExpirationStartedMessages(SmsDatabase.java:671) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at org.thoughtcrime.securesms.service.ExpiringMessageManager$LoadTask.run(ExpiringMessageManager.java:57) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 09-07 09:38:08.705 25957 25990 E SQLiteOpenHelper: at java.lang.Thread.run(Thread.java:764)

@mikecook Thank you so much for that stack trace, that's extraordinarily helpful! I received another log from someone else that had an issue upgrading from 10 -> 12, but it didn't have the specific failure reason, but this one does. So thank you :) Given that I've got two separate logs with this same trace, I'm going to assume that this duplicate column name is the real issue.

Have any of you downgraded versions at any point, restoring from a backup after doing so? This type of thing usually happens when you restore a backup from a newer version of signal onto an older version, which would cause your database to be newer than your app version. Then, whenever you upgrade back to the new version, the database migration fails.

@attila-lendvai You're having a separate issue. Signal uses the Android KeyStore to store keys, but those aren't captured in an adb backup. So officially we don't really support any backup tools that aren't ours, since you wind up in a state where the app _thinks_ you have a key in the KeyStore, but you don't.

EDIT: according to the play store app, i have 4.24.8, updated on Aug 6, 2018. (FWIW, i saw several newer versions on apkmirror)

Do any of you have contacts with interesting characters in their names? I've tried to repro this by having contacts with emoji and random unicode characters in their name to no avail, but maybe there's a specific character set that's causing problems.

i most probably have accented letters and stuff like that, but i doubt i have anything very weird. i did use some contact sync apps in the past, though.

Do any of you have custom notifications set for contacts?

yes. i have silenced group chats, and sometimes i quiet some contacts for a few hours.

Signal uses the Android KeyStore to store keys, but those aren't captured in an adb backup

this is on my old phone. here's what i did there, to the best of my recollection:

$ adb shell pm uninstall -k org.thoughtcrime.securesms
$ adb backup -noapk org.thoughtcrime.securesms

and then i reinstalled Signal from play store.

now i get a different backtrace on my old phone. i did the same (just start the app once again), but now i get a different error. it seems to persist if i retry.

hope it helps! if not, feel free to ignore me, i'll probably just reinstall afresh on my new phone eventually.

 5732 I ActivityManager: Start proc 14744:org.thoughtcrime.securesms/u0a100 for activity org.thoughtcrime.securesms/.RoutingActivity
14744 W zygote  : Using default instruction set features for ARM CPU variant (cortex-a9) using conservative defaults
 5732 D CompatibilityInfo: mCompatibilityFlags - 10
 5732 D CompatibilityInfo: applicationDensity - 480
 5732 D CompatibilityInfo: applicationScale - 1.0
 4172 D msm8916_platform: platform_set_channel_map mixer_ctl_name:Playback Channel Map12
 4172 D msm8916_platform: platform_set_channel_map: set mapping(1 2 0 0 0 0 0 0) for channel:2
 4172 D audio_hw_primary: start_output_stream: exit
 5732 D CompatibilityInfo: mCompatibilityFlags - 10
 5732 D CompatibilityInfo: applicationDensity - 480
 5732 D CompatibilityInfo: applicationScale - 1.0
14744 I MultiDex: VM with version 2.1.0 has multidex support
14744 I MultiDex: Installing application
14744 I MultiDex: VM has multidex support, MultiDex support library is disabled.
14744 W PartProvider: onCreate()
14293 I MicroDetector: Keeping mic open: false
14439 I DeviceStateChecker: DeviceStateChecker cancelled
14403 I AudioController: internalShutdown
14689 I MicroRecognitionRunner: Stopping hotword detection.
  987 D audio_hw_primary: in_standby: enter: stream (0xe7c1f800) usecase(18: audio-record)
  987 D audio_hw_primary: disable_audio_route: reset and update mixer path: audio-record
  987 D soundtrigger: audio_extn_sound_trigger_update_stream_status: uc_id 18 of type 1 for Event 2, with Raise=0
  987 D hardware_info: hw_info_append_hw_type : device_name = voice-rec-mic
  987 D audio_hw_primary: disable_snd_device: snd_device(97: voice-rec-mic)
  987 D msm8916_platform: platform_split_snd_device: snd_device(97) num devices(0) new_snd_devices(0)
  987 I soundtrigger: audio_extn_sound_trigger_update_device_status: device 0x61 of type 1 for Event 0, with Raise=1
  987 D sound_trigger_platform: platform_stdev_check_and_update_concurrency: concurrency active 0, tx 0, rx 0, concurrency session_allowed 1
  567 D audio_hw_primary: in_set_parameters: enter: kvpairs=routing=0
 2401 I SoundTriggerHwService::Module: onCallbackEvent no clients
14403 I MicrophoneInputStream: mic_close  SR : 16000 CC : 16 SO : 1999
14440 I MicroRecognitionRunner: Detection finished
  567 D audio_hw_primary: adev_close_input_stream: enter:stream_handle(0xe7c1f800)
  567 D audio_hw_primary: in_standby: enter: stream (0xe7c1f800) usecase(18: audio-record)
14744 W PersistentAlarmManagerListener: class org.thoughtcrime.securesms.service.RotateSignedPreKeyListener scheduling for: 1536413118303
14744 W PersistentAlarmManagerListener: class org.thoughtcrime.securesms.service.DirectoryRefreshListener scheduling for: 1536366796744
14744 I org.webrtc.Logging: NativeLibrary: Loading native library.
14744 I org.webrtc.Logging: NativeLibrary: Loading library: jingle_peerconnection_so
14768 V Cursor  : Filling cursor window with start position:0 required position:0
14768 E SQLiteOpenHelper: Couldn't open signal.db for writing (will try read-only):
14768 E SQLiteOpenHelper: net.sqlcipher.database.SQLiteException: Can't downgrade database from version 12 to 10
14768 E SQLiteOpenHelper:   at net.sqlcipher.database.SQLiteOpenHelper.onDowngrade(SQLiteOpenHelper.java:336)
14768 E SQLiteOpenHelper:   at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:176)
14768 E SQLiteOpenHelper:   at net.sqlcipher.database.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:233)
14768 E SQLiteOpenHelper:   at net.sqlcipher.database.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:220)
14768 E SQLiteOpenHelper:   at org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper.getReadableDatabase(SQLCipherOpenHelper.java:249)
14768 E SQLiteOpenHelper:   at org.thoughtcrime.securesms.database.SmsDatabase.getExpirationStartedMessages(SmsDatabase.java:671)
14768 E SQLiteOpenHelper:   at org.thoughtcrime.securesms.service.ExpiringMessageManager$LoadTask.run(ExpiringMessageManager.java:57)
14768 E SQLiteOpenHelper:   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
14768 E SQLiteOpenHelper:   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
14768 E SQLiteOpenHelper:   at java.lang.Thread.run(Thread.java:764)
14744 I org.webrtc.Logging: PeerConnectionFactory: PeerConnectionFactory was initialized without an injected Loggable. Any existing Loggable will be deleted.
14768 V Cursor  : Filling cursor window with start position:0 required position:0
14768 E AndroidRuntime: FATAL EXCEPTION: pool-3-thread-1
14768 E AndroidRuntime: Process: org.thoughtcrime.securesms, PID: 14744
14768 E AndroidRuntime: net.sqlcipher.database.SQLiteException: Can't upgrade read-only database from version 12 to 10: /data/user/0/org.thoughtcrime.securesms/databases/signal.db
14768 E AndroidRuntime:     at net.sqlcipher.database.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:258)
14768 E AndroidRuntime:     at net.sqlcipher.database.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:220)
14768 E AndroidRuntime:     at org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper.getReadableDatabase(SQLCipherOpenHelper.java:249)
14768 E AndroidRuntime:     at org.thoughtcrime.securesms.database.SmsDatabase.getExpirationStartedMessages(SmsDatabase.java:671)
14768 E AndroidRuntime:     at org.thoughtcrime.securesms.service.ExpiringMessageManager$LoadTask.run(ExpiringMessageManager.java:57)
14768 E AndroidRuntime:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
14768 E AndroidRuntime:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
14768 E AndroidRuntime:     at java.lang.Thread.run(Thread.java:764)
 8330 W ActivityManager:   Force finishing activity org.thoughtcrime.securesms/.RoutingActivity
 8330 D ActivityTrigger: ActivityTrigger activityPauseTrigger 
 2438 I ActivityManager: Showing crash dialog for package org.thoughtcrime.securesms u0

here is my logcat, but the _read-only_ confuses me. maybe related to some backup/restore tests with titanium? but for this logcat, i went back to the last backup i made, the one that crashed first this morning.

09-07 13:46:03.314 17453 17482 E AndroidRuntime: FATAL EXCEPTION: pool-3-thread-1 09-07 13:46:03.314 17453 17482 E AndroidRuntime: Process: org.thoughtcrime.securesms, PID: 17453 09-07 13:46:03.314 17453 17482 E AndroidRuntime: net.sqlcipher.database.SQLiteException: Can't upgrade read-only database from version 10 to 12: /data/user/0/org.thoughtcrime.securesms/databases/signal.db 09-07 13:46:03.314 17453 17482 E AndroidRuntime: at net.sqlcipher.database.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:258) 09-07 13:46:03.314 17453 17482 E AndroidRuntime: at net.sqlcipher.database.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:220) 09-07 13:46:03.314 17453 17482 E AndroidRuntime: at org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper.getReadableDatabase(SQLCipherOpenHelper.java:296) 09-07 13:46:03.314 17453 17482 E AndroidRuntime: at org.thoughtcrime.securesms.database.SmsDatabase.getExpirationStartedMessages(SmsDatabase.java:671) 09-07 13:46:03.314 17453 17482 E AndroidRuntime: at org.thoughtcrime.securesms.service.ExpiringMessageManager$LoadTask.run(ExpiringMessageManager.java:57) 09-07 13:46:03.314 17453 17482 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 09-07 13:46:03.314 17453 17482 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 09-07 13:46:03.314 17453 17482 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)

I've never downgraded versions. This brand new phone was installed about a week ago so I could move from lineage 14 to 15. The backup from that signal was imported, plus an old SMS db was also imported. The old SMS db had been modified by a 3rd party app to add a year old unencrypted signal backup.

I created a fresh logcat dump by deleting data of version 4.25.9, starting it up and directly importing the last found backup. looks similar to the one reported by @mikecook:

09-07 19:03:36.983 16650 16860 I SQLCipherOpenHelper: Upgrading database: 10, -1 09-07 19:03:36.985 16650 16860 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #5 09-07 19:03:36.985 16650 16860 E AndroidRuntime: Process: org.thoughtcrime.securesms, PID: 16650 09-07 19:03:36.985 16650 16860 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground() 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at android.os.AsyncTask$3.done(Unknown Source:28) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:252) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:271) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(Unknown Source:2) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: Caused by: net.sqlcipher.database.SQLiteException: duplicate column name: quote_missing: ALTER TABLE mms ADD COLUMN quote_missing INTEGER DEFAULT 0 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at net.sqlcipher.database.SQLiteDatabase.native_execSQL(Native Method) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at net.sqlcipher.database.SQLiteDatabase.execSQL(SQLiteDatabase.java:2363) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at org.thoughtcrime.securesms.database.helpers.SQLCipherOpenHelper.onUpgrade(SQLCipherOpenHelper.java:245) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at org.thoughtcrime.securesms.database.DatabaseFactory.upgradeRestored(DatabaseFactory.java:143) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at org.thoughtcrime.securesms.RegistrationActivity$2.doInBackground(RegistrationActivity.java:381) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at org.thoughtcrime.securesms.RegistrationActivity$2.doInBackground(RegistrationActivity.java:369) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at android.os.AsyncTask$2.call(Unknown Source:20) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:266) 09-07 19:03:36.985 16650 16860 E AndroidRuntime: ... 4 more

@attila-lendvai Your stack trace says you're trying to downgrade versions. You're going through a rather complicated flow that isn't really supported, unfortunately. When you start moving between versions and using non-signal backup methods, you start getting into not-officially-supported territory. You're probably better off going to the forum where people have messed around with this more. Thanks!

@mikecook Somehow you've already done the migration from version 10 -> 11, but now you're going through that same migration again. I did a sanity check and verified via the commit history that the version never went down. The version went from 10 -> 11 three weeks ago, so you didn't necessarily have to do a downgrade just recently.

@boennhoff You have the same issue where you're going through old database migrations, but the added issue of the system thinking you're upgrading to version -1, which is quite odd. I'll look into that more.

@greyson-signal I've never downgraded signal, and I only run whatever is on play store with auto update.

@greyson-signal i know, but keep in mind that i did not intend to downgrade the apk on my old phone, and most probably i didn't do it accidentally. maybe i got an older apk from play store? maybe someone withdrew a version while i uninstalled and reinstalled?

i'm not looking for answers here, just pointing out something that may be a useful piece of info.

duplicate column name

Why give an uncaught exception here at all? This means probably "this action has already happened for some reason", so why not catch the exception and go to the next step?

@greyson-signal Just to clarify my situation: I switched from Nougat (7.1) to Oreo (8.0) a few days ago, reseting my complete phone, before that I made a backup of the conversations within Signal (4.24.8). I reinstalled Signal (again 4.24.8) under Oreo and restored the encrypted backup successfully. This morning I was still able to read some new messages but suddenly wasn't able to start it up anymore (I assume the actual Signal update happened inbetween). For my last posted logcat, I just deleted the data of Signal to start with a "fresh" installation, it started up successfully and on the first screen I tried to restore the encrypted backup again: at the very end of the process Signal crashes, and has a FC on startup again.

Play store shows 4.24.8 as of 5th September https://play.google.com/store/apps/details?id=org.thoughtcrime.securesms

But my local app version is 4.25.9 (and was installed from playstore 5 days ago (within an hour after this backup date: 2018-09-02-21-42-45)). It worked yesterday. I got an "updated apps" notification this morning, and app doesn't open now.

Does play store use timestamp or semver? Because I'm wondering if an older version made it back into playstore latest, which my phone tried to auto-update to.

There's been a few halted rollouts for 4.25.x as we've found bugs, but the Play Store explicitly states that users who already have the new version will keep it -- it just prevents new users from getting it. So I don't think that's the problem.

What _could_ be the problem is that some of you are dealing with phone migrations / factory resets. I imagine it's possible that you got auto-updated to the new version _before_ you backed up your phone but didn't realize. Then, when you switched/reset phones, you were no longer in the same rollout bucket, so the Play Store gave you the old version.

Then, during the most recent rollout of 4.25.9, you went through the database migration you already went through, causing this crash.

@johanw666 I'm hesitant to do that because in a general sense it means we're in an undefined state. What if we're getting that bug not because we're restoring a new version of a database (which is what's happening here), but because of an actual bug with our database versioning or something? When it comes to our database, shrugging off strange state is something we very much want to avoid. But I'll look into mitigation.

@greyson-signal How do you suggest I recover from this state. I have no backups from the last 5 days, and losing that would make me sad. I have root, is there something I can set to allow it to skip migration? Should I attempt to roll fwd? What version if so?

I have 4.25.9 installed on my phone and that's what I see in the Play Store, but there is no release or tag with that version number. I find that confusing.

I made a Signal backup on my old Motorola G4 on the 31.Aug 2018
Moved the backup to my new phone Huawei 10 Pro Mate on the same day.
Both phones are on auto-update.
Pulled Signal from the Playstore that day, imported the backup.
Everything worked fine.
Signal worked smoothly and has written its last backup on the 06. Sep 2018.
This morning (the update is 11h ago) it stop working, it crashes on start.
When I look in the Playstore right now 07.Sep 2018, 21:50) I see Signal version 4.24.8
My phone says I have version 4.25.9 (33,34MB) installed.

I did not do any downgrading or whatsoever. Just backuped one large conversation on the old phone, moved the backup to the freshly installed new phone and imported it.
Everything was straight forward until the update.

@mikecook yes, if we find out exactly what had been done already on this database a special Signal version can be built where this database upgrade step is commented out. I've done that before for someone else.

4.25.9 is pulled back, 4.24.8 is now again in playstore.

@garakelim On August 30th we started a production rollout that was later halted that had this migration. I'm assuming you got the update and made a backup on the 31st with that update. When you switched to the Huawei phone, I'm assuming you installed an earlier version and imported the backup. The import would have succeeded, but under the hood you now had DB version 11, even though from the app thought you were on DB version 10. Finally, when you got the most recent update, it tried to do the 10 -> 11 migration again, causing the crash.

Hey folks, so this is what I'm going to do. I'm going to take @johanw666's suggestion and we're going to ignore this version 11 migration if you've already gotten it. That should put you all back in a good state. I'm sorry about that. I know this is probably very frustrating (I'd certainly be panicked if I was facing the prospect of losing my message history!)

To prevent this from ever happening in the future, I'm going to simultaneously make it so that you won't be able to restore a backup from a newer version of Signal. That means you'd see an error upon restore instead of having a bug that's essentially hidden in your database schema waiting to crash your app at the next app update.

Going to be working on this now so we can get an update out later today. I suggest you all join the beta (if you're not in it already) so you can get the update ASAP.

Thanks!

In the meantime, @mikecook could probably download a copy of 4.25.9 from apkmirror.com, restore his backup with it and wait until 4.25.10 arrives in Google Play so he can continue to work.

Ok, 4.25.10 should be in the beta channel. Was able to repro the crash and verify it was fixed with this release, so hopefully everything goes smoothly for everyone :) Thank you for the understanding!

So, that was fast! You're obviously a much more experienced Android developer than I am.

With the beta update to 4.25.10 I'm back to working without having to do any restores. Thank you!!!

Works like a charm!
THANKS for the very quick support, much appreciated 馃憤

I can confirm: With Signal 4.25.10 from Play Store (Beta) it works again. Thank you VERY much!

metoo -- i am online again! thanks for your fast help @greyson-signal

I received 4.25.10 in the Play Store (stable) today and it works. Thanks so much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

j3fffff picture j3fffff  路  3Comments

kwlg picture kwlg  路  3Comments

hiredgunhouse picture hiredgunhouse  路  3Comments

nxfifteen picture nxfifteen  路  3Comments

derWalter picture derWalter  路  3Comments