Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Restore from backup fails with "Incorrect backup passphrase"

Open jeromio opened this issue 2 years ago • 32 comments

  • [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

Attempts to restore chat backup fail with "Incorrect Passphrase" error yet correct (verified) passphrase was used. This has now happened to me 3 times over the span of 2 years. Same reproduction steps each time. I have never been able to restore a backup 🙁.

Steps to reproduce

  • Created a backup on "old" phone.
  • Copied the 30 digit passphrase.
  • Used the "verify passphrase" functionality and got an affirmative response from the app.
  • Copied the backup file to a PC and then to the "new" phone.
  • On 1st start up of Signal app, chose the Restore function.
  • Selected backup file.
  • Entered correct, verified, 30 digit passphrase.
  • Received "Incorrect passphrase" error. (Repeated the last 2 steps 20 or so times out of desparation)

Actual result: No restore happens: all saved messages lost forever Expected result: Successfully restored all messages contained in the backup

Screenshots

Device info

Device: Google Pixel 3, Samsung Flip3, Samsung Flip4 Android versions: 11,12,12.1 Signal version: 6.8.3

Link to debug log

Not possible to get debug log from restore process since it can only be accessed before the actual app is launched for the 1st time.

jeromio avatar Jan 21 '23 20:01 jeromio

Hi there, sorry you are encountering this. You can get a debuglog in the restore flow by tapping on the title of the screen 8 times.

When entering the passphrase are you typing it manually or pasting it?

cody-signal avatar Jan 23 '23 15:01 cody-signal

@cody-signal Is that debuglog saved anywhere if Signal crashes? I've got a backup that's failing to import for me. I made it before resetting my phone, the password is correct, but import fails/crashes signal about 5200 messages in. Trying to find whatever logs I can so I can file a bug report.

AJolly avatar Feb 26 '23 06:02 AJolly

Yes, the logs are persisted through a crash. So you can do the same and tap on the title of the screen eight times after starting the app after the crash.

cody-signal avatar Feb 27 '23 03:02 cody-signal

Thank goodness, I'm not the only one going through the same issue. :pray:

I proceeded exactly as @jeromio did and got the same result. For the record, I have entered the passphrase manually, not copied/pasted (try a bunch of times desperately too with no luck).

gotgot1995 avatar Apr 20 '23 18:04 gotgot1995

@gotgot1995 Can you tap on the title of any of the registration screens eight times after starting the app to get debuglogs and submit that here?

cody-signal avatar Apr 20 '23 19:04 cody-signal

But of course @cody-signal. Here you go.

signal-log-1682021126912.zip

gotgot1995 avatar Apr 20 '23 20:04 gotgot1995

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 20 '23 05:06 stale[bot]

This issue has been closed due to inactivity.

stale[bot] avatar Jun 27 '23 08:06 stale[bot]

Exactly the same happens to me when transferring from OnePlus 6 to OnePlus Nord 2. Both phones not rooted. The import step doesn't even start. I entered the passphrase both possible ways: reading it either row by row and left to right or column by column and left to right.

Neither works.

This is , eh , ridiculous. This is not a cryptography problem i think.

le-dawg avatar Oct 02 '23 12:10 le-dawg

FWIW: I am trying to import a backup from version 6.30.4 into version 6.6.3

le-dawg avatar Oct 02 '23 12:10 le-dawg

FYI:

I was able to resolve this issue by:

  • updating the OLD phone Signal app to the newest available
  • deleting and reinstalling the signal app on the NEW phone
  • following the instructions

It appears that there was a backward compatibility issue.

le-dawg avatar Oct 02 '23 13:10 le-dawg

I have the same issue, and I too have verified in-app that the passphrase is correct.

I'm now in this weird limbo where I don't want to set up Signal again, because then I won't be able to import my old messages later, but I still need to use Signal to talk to my contacts.

Nothing in the log seems particularly relevant but here it is anyway: signal-log-1700633612372.zip

Could we get this issue re-opened and unmarked as wontfix?

imyxh avatar Nov 22 '23 06:11 imyxh

Same problem here, updated the firmware of Asus Zenfone with a factory reset and can't open my last 3 backups (which are all I have). When I switch to home after "Incorrect passphrase" popup, open Signal again and skip restore, enter my phone number etc and then try verifying the backup code in Settings -> Chat -> Backup, it verifies correctly. It's the same passphrase I used for such a long time and that worked every 6 moths or so when I reset to factory and update the phone.

Signal Version 6.41.3, Android 13

Might there be any problems that Signal Desktop is still installed on a Linux Mint partition (not booted from that since I have the restoring problem)? Signal Debug log says "Linked Devices: false"

studiok87 avatar Dec 28 '23 12:12 studiok87

I have this same issue. My phone service provider told me I had to factory reset my phone as a troubleshooting step when we could not resolve a calling issue. I backed up Signal, verified the passphrase, factory reset my phone, and now it rejects the passphrase, which I saved to my password manager before verifying so I know it is is exact. I have tried both manually typing it in and copy/pasting. In both cases I get the 'Incorrect Passphrase' message. Does this mean 5 years of message history is gone forever?

kocherjj avatar Jan 27 '24 02:01 kocherjj

@imyxh

I have the same issue, and I too have verified in-app that the passphrase is correct.

Really strange, we supposedly log the exception we hit, but it's not in your normal logs. I see this in your logcat at the same time:

11-22 01:12:47.396  5866  5936 W KeyStore: android.os.ServiceSpecificException:  (code 7)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:2387)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at android.os.Parcel.createException(Parcel.java:2357)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at android.os.Parcel.readException(Parcel.java:2340)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at android.os.Parcel.readException(Parcel.java:2282)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at android.security.keystore.IKeystoreService$Stub$Proxy.get(IKeystoreService.java:988)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at android.security.KeyStore.get(KeyStore.java:233)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at android.security.KeyStore.get(KeyStore.java:222)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at android.security.keystore.AndroidKeyStoreSpi.engineGetCertificate(AndroidKeyStoreSpi.java:165)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at java.security.KeyStoreSpi.engineEntryInstanceOf(KeyStoreSpi.java:583)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at java.security.KeyStore.entryInstanceOf(KeyStore.java:1631)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at org.thoughtcrime.securesms.crypto.KeyStoreHelper.hasKeyStoreEntry(KeyStoreHelper.java:147)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at org.thoughtcrime.securesms.crypto.KeyStoreHelper.getOrCreateKeyStoreEntry(KeyStoreHelper.java:82)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at org.thoughtcrime.securesms.crypto.KeyStoreHelper.seal(KeyStoreHelper.java:51)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at org.thoughtcrime.securesms.backup.BackupPassphrase.set(BackupPassphrase.java:47)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at org.thoughtcrime.securesms.registration.fragments.RestoreBackupFragment$2.doInBackground(RestoreBackupFragment.java:290)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at org.thoughtcrime.securesms.registration.fragments.RestoreBackupFragment$2.doInBackground(RestoreBackupFragment.java:281)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at android.os.AsyncTask$3.call(AsyncTask.java:394)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
11-22 01:12:47.396  5866  5936 W KeyStore: 	at java.lang.Thread.run(Thread.java:923)

But this is made by the system, not us, and reports online indicate this particular error is usually something that the KeyStore will log but not throw. I can't tell just by looking at the logs. If this is the issue, there's not much we do besides provide a better error message. We need the KeyStore for many app operations.

Regardless, ya'll are likely hitting some error that is not an incorrect passphrase and we're just rendering a bad error message, but there is some other problem with the backup here that we'll need to find out, but that can only be debugged with logs.

@kocherjj @studiok87 Please share logs.

greyson-signal avatar Jan 29 '24 14:01 greyson-signal

Sorry for answering that late, too busy the last months, but I'll send you debug and logcat via mail. Or anything else I can provide (non-rooted phone)? Seems like many more users have this problem -> #13333 Is #6159 solved or still everything in logcat?

Update: @greyson-signal : I reproduced the failure with one of the old backups on my second phone, sent you the android bug report via mail. Can't create Signal debug because Verification Code is not sent, so I'm stuck at this screen. Idk what the heck is the problem now..

studiok87 avatar Apr 02 '24 11:04 studiok87

having the same problem... this issue is not resolved and should be reopened

giammin avatar Apr 07 '24 14:04 giammin

I have the same issue. I lost my backup for the thousand time now. Remove file backups if it won't work...

pablo03v avatar May 09 '24 13:05 pablo03v

I have the same issue....

signal-log-1717428673731.zip

DDPF02 avatar Jun 03 '24 15:06 DDPF02

Dear Signal-devs, two months ago I've sent you logs twice and all I got was two e-mails with this: "Hi there, I’d like to help you. Did you see our previous email? Did you start using Signal?" Is that a joke? If it's a serious question, my answer is: yes, I started using Signal since it was published and I regret it!

studiok87 avatar Jun 03 '24 16:06 studiok87

This seems to have happened to me as well. I have a screenshot from 2021-06-06 with the passphrase, I'm 99% certain it should still be the same one (I have no idea why it wouldn't be). I reinstalled the OS yesterday, installed Signal just now and tried to restore the backup; I'm 100% certain I entered the correct 30 numbers, but I get "incorrect backup passphrase" thrice.

Edit: I found a backup from 2021-08-11 which does accept the passphrase. I do not recall ever re-installing Signal. Would that even change the passphrase? Is it possible an update changed it?

Edit2: fuck it, I'll just start over from scratch. I'll have absolutely 0 chat history, but at least every 0 of those chats will be secure! So secure, I'm not even able to have them! This, the complete lack of syncing messages with the desktop app and constantly losing chat history there too, and the devs failure to e.g. implement something simple as getting Signal desktop to follow the system 24h time format and their refusal (after 4+ years I think we can call it 'refusal') to fix it or implement an option to set the time format is why I will not recommend Signal anymore. I will acknowledge that if you want security, Signal is the way to go, and the people who prefer security over usability will find Signal anyway, but I much prefer a slightly less secure chat history over a 100% secure nothing.

PeteSapai avatar Jul 02 '24 15:07 PeteSapai

Hello, I have the same issue here too! I hope to find a solution quickly as... currently I don't know if I should wait for a solution or... start from scratch :(. Thanks for your help :)

oversanne avatar Aug 17 '24 17:08 oversanne

I would recommend moving on. No one seems to be seriously interested in resolving this. I lost years of history and do not intend to trust signal with my data any longer unless/until they give their users back control of our own data by allowing local unencrypted backups.

kocherjj avatar Aug 18 '24 02:08 kocherjj

I would recommend moving on. No one seems to be seriously interested in resolving this. I lost years of history and do not intend to trust signal with my data any longer unless/until they give their users back control of our own data by allowing local unencrypted backups.

This is exactly why I stopped using Signal and so did my friends. If they added the option of local unencrypted backups, it would be the best messaging app overall

Without it, I risk losing all my chats with friends and family, which is unacceptable

mark8819 avatar Aug 18 '24 13:08 mark8819

This is exactly why I stopped using Signal and so did my friends. If they added the option of local unencrypted backups, it would be the best messaging app overall

Without it, I risk losing all my chats with friends and family, which is unacceptable

Yes, beside the automated answer I quoted from some months ago ("Did you start using Signal?") I never got an answer after sending my logs, also not for other stuff like the captcha problems with Signal Desktop. Talking about security: as long as I can't choose the install folder on Windows and have to trust BitLocker, every "it's more secure bla bla" is just a joke. As long as Signal is installed in Windows-System-partition, nobody needs encrypted backups...

studiok87 avatar Aug 20 '24 20:08 studiok87

I also lost my conversations. I couldn't verify the passphrase on the old app since I have reset the phone it was on, but I know for a fact that it was the correct passphrase, I took a screenshot of it...

00Martin avatar Dec 22 '24 18:12 00Martin

I have this issue as well. Screen captured the passphrase and entered it manually a dozen times, I don't think I entered it incorrectly that many times.... I had to do a factory reset on the phone and now cannot restore critical messages. I have them on my laptop so have stopped using signal on my phone since I cannot afford to lose the information in those messages.

kcorbridge avatar Dec 27 '24 13:12 kcorbridge

Same issue here on a 1yo backup

Mitsu13Ion avatar Jan 01 '25 11:01 Mitsu13Ion

Same issue here with a "backup" done 12h ago ...

Solution: Install on your new phone the same, old apk-Version of Signal as on your old phone where you "backuped" your chats (load the older apk from apkmirror or similiar - VERY SECURE! - because Signal Foundation provides no old apks) and restore your chats with this older version.

After you restored your data, you can update Signal via google playstore.

Thx Signal Foundation for the hours of "fun" and "security" ....

Superslub avatar Jan 05 '25 22:01 Superslub

Same issue here with a "backup" done 12h ago ...

Solution: Install on your new phone the same, old apk-Version of Signal as on your old phone where you "backuped" your chats (load the older apk from apkmirror or similiar - VERY SECURE! - because Signal Foundation provides no old apks) and restore your chats with this older version.

After you restored your data, you can update Signal via google playstore.

Thx Signal Foundation for the hours of "fun" and "security" ....

Fully agree, this is so nonsense! Great that worked for you, did not for me, tried everything. And due to the great dev team, Signal Desktop (only Linux, don't use the Windows-version unless you trust MS BitLocker...^^) conversations are lost too. Keyring/database error after a faulty update, tried all to restore, no luck. If they don't get the job done to make the app with all of its functions reliable (or at least react to this issue here), I wouldn't trust them that the app is secure...

studiok87 avatar Jan 12 '25 13:01 studiok87