Transferring Signal message history to a new device keeps causing Signal to crash
- [x] I have searched open and closed issues for duplicates
- [x] I am submitting a bug report for existing functionality that does not work as intended
- [x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
- [x] This isn't a feature request or a discussion topic
Bug description
I have been in the process of switching to a new phone over the past week, and when I try to use Signal's built-in procedure for transferring saved chats and messages to my new phone, it always causes the new phone to crash. The crash does not take place immediately; Signal on the new device works fine until either (i) some amount of time, apparently around 30 minutes to 2 hours, passes, or (ii) I force-stop Signal or re-boot my phone. After that, whenever I try to open Signal, it crashes and I cannot use it. I've tried a number of different configurations for the destination phone and the transfer strategy, and they all lead to this result.
Steps to reproduce
- install Signal on a new phone, and use the "transfer" feature (the one that requires the new and old device to both activate transfer, find each other via location, confirm a 7-digit code, etc) to move my existing Signal account over to it
- either wait some amount of time, or reboot the phone or the Signal app
- try to open Signal again
Expected result: I can use Signal on my new phone normally Actual result: Signal crashes
Device info
My old device parameters:
- Device: Samsung Galaxy S21 Ultra
- Signal version: 6.13.6 (downloaded from google play store)
- Android version: 11
I attempted to move Signal to a new phone many times, using different methods; all failed in the same way. Here are the new device configurations:
- Pixel 7 Pro running GrapheneOS, Android version 13, Signal version 6.13.6 (installed from the APK from signal.org)
- Pixel 4 running the default OS, Android version 13, Signal version 6.13.6 (APK from signal.org)
- Pixel 4 as above, but using the Signal version from the Google Play store
- Pixel 7 Pro as above, but transferring by making an encrypted backup, putting that backup on the new device, and using the "restore from backup" option
- Pixel 7 Pro as above, but Signal's rate-limiting prevented me from finishing the signup process ("please try again in 04:47:21"), and even still, by the time I theoretically had another chance to register my phone number, the app had already started crashing
One time I tried setting up a signal account on the new device using a different phone number and WITHOUT attempting to transfer history. This worked totally fine.
Screenshots
When Signal crashes, it gets stuck with a screen that looks like this: https://i.imgur.com/LlUfJCR.jpeg
adb logcat output
--------- beginning of crash
03-08 07:34:01.061 3607 3607 E AndroidRuntime: FATAL EXCEPTION: main
03-08 07:34:01.061 3607 3607 E AndroidRuntime: Process: org.thoughtcrime.securesms, PID: 3607
03-08 07:34:01.061 3607 3607 E AndroidRuntime: java.lang.RuntimeException: Unable to create application org.thoughtcrime.securesms.ApplicationContext: net.zetetic.database.sqlcipher.SQLiteException: no such table: recipient_preferences (code 1): , while compiling: ALTER TABLE recipient_preferences ADD COLUMN call_ringtone TEXT DEFAULT NULL
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6771)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2134)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7879)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at com.android.internal.os.ExecInit.main(ExecInit.java:49)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
03-08 07:34:01.061 3607 3607 E AndroidRuntime: Caused by: net.zetetic.database.sqlcipher.SQLiteException: no such table: recipient_preferences (code 1): , while compiling: ALTER TABLE recipient_preferences ADD COLUMN call_ringtone TEXT DEFAULT NULL
@vbuterin Hi there, sorry you're encountering this. For reproducing, you second step is a little vague to me. Are you saying you reboot the device or app during the transfer process?
If you're able to capture logcat during the import/transfer process on the new device instead of after it gets into the crash loop that would be helpful for us in debugging. The crash you included in the report is really odd and likely because the real problem occurred earlier and this is showing as a symptom of that.
Thanks!
Are you saying you reboot the device or app during the transfer process?
No, I was rebooting after the transfer is finished and signal seemed to be working on the new phone.
Unfortunately I did not catch the logcat of the transfer process itself, and at this point I've already "solved" the problem for myself by giving up on transferring messages and just creating a new account with the same phone number, so I'm not in a position to do it again :(
Ah, bummer.
Sorry for your loss.
I'm also observing insta-crashes after data transfer on a new Android device :( I would really like to keep the conversations history though, so not ready yet to ditch it all :/ although it means I can't use Signal at this moment :/
Interestingly, I can see a flash of the Signal screen with messages visible for a second, so the data seems to be there at a glance.
I can try to reproduce something, though I am not sure how. Should I click "cancel" on the old Signal instance screen asking to confirm the transfer? Can you outline any steps I should follow if you want me to try reproducing anything?
edit: Just got a notification about a message (albwit 40 min late), and it showed fine and well in the notification area. But after clicking it I got a crash as well.
@akavel you can try to open the app in airplane mode and see if that helps. You can also look at using adb to capture a log and email that to me. https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports#debug-logs-with-adb
You can click cancel on the old device and it should let you resume or re-register on that device with all of your pre-existing message history.
@cody-signal in airplane mode enabled still crashing in the same way. Will try to find some time to look into collecting adb logs.
edit: from my previous little experience with adb logcat, there tends to be tons of logs from the whole OS in the dump. Any hints as to what to look for there so that I only send you Signal-related stuff?
You can filter adb by pid, see https://stackoverflow.com/a/48004086 for details
adb logcat --pid=$(adb shell pidof -s org.thoughtcrime.securesms)
There's also pidcat but not sure it still works, haven't used it in awhile: https://github.com/JakeWharton/pidcat
Hmmmmm, after cancelling the transfer, I had to uninstall Signal and re-install it again on the new device, as it was still crashing. I then tried a transfer from the old device again, with Signal v6.13.8 now on the new device. This time the new Signal seems to be working fine over the last several minutes! I tried closing all apps on the new phone, then also tried rebooting the phone, and in both cases Signal seems to open fine for the time being. Keeping fingers crossed, hopefully it'll stay so! 🤞🙂 If I don't add comments in this issue during a week from today, let's interpret this as me silently saying it appears fixed to me. Thanks!
Hi all,
I have the same issue as described above. I got a new phone and installed Signal on the new phone (I used the Aurora Store). Then I transferred the account from the old to the new phone following the description from the Signal support. The transfer worked fine But now Signal crashes when I try to access it, I see it flashing showing the welcome page and then its gone again. My data is on the new phone. Unfortunately I deleted the app from the old phone. In the description on Signal support that was the last step and I was not sure if that is needed. Now I know that was a mistake because my data is somehow stuck on the new phone and I cannot reach it anymore.
Is there any chance still to get my data (message history)? If I de- and reinstall Signal, the data will get lost.
@Lilrose30
- Can you try enabling airplane mode and then launching the app?
- Do you have access to Android Debug Bridge?
- On your old device, did you have backups enabled? (These would not have been deleted if the app was removed)
* Can you try enabling airplane mode and then launching the app?I tried this, it has the same effect -> Signal crashes
* Do you have access to Android Debug Bridge?I am not sure, I don't know this. How can I check that?
* On your old device, did you have backups enabled? (These would not have been deleted if the app was removed)
No :( I did not do any backup. I realized first after all the mess that this was possible.
@Lilrose30 Android Debug Bridge is something you'd have had to install yourself onto your personal computer (Or installed Android Studio).
https://developer.android.com/tools/adb
(Please note I'm assuming a basic understanding of what the terminal is and that's about it, so apologies if I mention something you're already aware of)
Using ADB, you can use the built in command logcat to get some output while you launch the app:
adb logcat -b all -v color --pid=`adb shell pidof -s org.thoughtcrime.securesms`
This will print out the realtime logs for Signal (org.thoughtcrime.securesms) to the terminal. You can redirect this output to a file using >
adb logcat -b all -v color --pid=`adb shell pidof -s org.thoughtcrime.securesms` > out.txt
In this case, the output file is out.txt
That file can be sent to support at signal dot org, or you can find the stacktrace inside, which generally will have something like SignalUncaughtException or the word Exception in it. (It'll have a list of methods and line numbers, which tells us where and why something happened).
If you choose to send the file to support at signal dot org, please include this ticket number and mentioned that I told you to send it on. Hopefully with that we can figure out what happened to your install.
@alex-signal
Ok, I can try to do that. But I tried already twice to contact support of Signal via signal.org and I did not get any reply beside an automatic one. Do you have better experience with that? I used the formular under "Contact Us".
Or I could also send the stracktrace to you here and you check it? Would that help?
Could it work to install Signal again on top without deinstalling it before? Would the data be kept?
@Lilrose30 If you install a new version, no data would be lost as it would just be an upgrade. If you uninstall, data will be lost.
Best if you can post a stacktrace here :-)
@alex-signal I just completed the transfer process to a new device but the app on the new device crashed before the registration could complete. On the old device, the transfer is marked as completed and signal is inactive. On the new device, I'm reset back to the normal start screen before any registration or transfer. But, the app has 5GB of storage in use, so it clearly has the data.
I don't have a backup, so I'm very scared to do anything to proceed. I don't have any obvious way to get a debug log. I'm happy to provide any logs that are safe without losing my history. It's also possible this is a different issue but it's hard to tell.
Also, I don't think it's relevant but this was my second try to transfer - first failed because the old device fell asleep or froze or something, so I had to retry.
Edit: to be clear, I'm willing to retry the transfer with logcat, I'm just not sure how to do this with certainty that I won't lose data.
@cg505 first, the original device with all data won't get deleted. So as long as you leave your old device intact you will be fine.
In the registration flow, you can tap any title on a screen 8 times to submit a debuglog and get a link you can share here.
Given that the old device indicates the transfer is complete you can try registering on the new device with the same number and seeing if things populate. This won't delete any data on your original device. If things don't work out you can always re-register on your old device and try again. You could also make a backup on your old device to protect against data loss.
@cody-signal Thank you! Here is the debug log from the new device. I haven't yet tried going through the registration flow to see if that works. https://debuglogs.org/android/6.21.3/e22a3e9a58dd6c26aa61701255610a6789f2e60aab707b95d1f62b7ab5b2a0b4
FWIW: I managed to restore my backup successfully by downloading the latest apk from the website, installing and restoring in there and updating through aurora afterwards.
update: completing registration flow seems to have worked as expected. have all my history and have not yet experienced any crashes. I guess the registration crash may be a separate issue then