-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chat partner was not found in recipient-table #244
Comments
Interestingly, signalbackup-tools was able to merge the up-to-date desktop backup into a very old Android Signal backup file. So I now also have my data back in a very old backup format (database version 106, Signal 5.17.1). I'm a bit hopeless I can ever get my data back into the app (and thus into future backups).
|
signalbackup-tools/signalbackup/importfromdesktop.cc Lines 429 to 431 in cbdecd9
I see there is a |
This is a known and expected situation, there is more to adding contacts than just inserting an entry into the recipient table and setting the UUID, there need to be valid keys exchanged and such. I believe the required data to do this is not present in the Desktop client (and if it is I don't know how to do it). It may even be necessary to communicate with Signal's servers to create valid contacts. This limitation is also mentioned in the README.
Signal Desktop certainly has the UUIDs, the problem (probably) is they are not in your Android backup.
This may be interesting. Generally, in cases like this, I tell people to make sure the contacts exist in the backup by starting some chats with them. But, if However, things have actually changed a little recently, since phone numbers are no longer required (they are for registration, but not for communicating with a new contact), some contacts are split in two: 1 from the system phone book and 1 'true' registered Signal contact (that may not have a phone number associated). I wonder if that's what's happening here. My guess would be that the UUID's for these contacts are not set. You could check this by running:
You could compare this to the output when running on the old v106 backup (due to renaming of columns, change the query to My theory is that the UUID's ('aci') on the new database are empty, because as far as Signal knows these contacts are not actual Signal contacts.
Yes this is intentional. Getting the recipient by phone number is only done when no UUID is found. This is for dealing with old Signal Desktop data, valid contacts without a UUID can not exist in current databases.
We should be able to get this working. It's unfortunate your only other backup is so old. I think the best chance of fixing this right now, is what I tell everyone: do not use a completely empty backup as the base, but try to actually start a thread with as many of your contacts as possible, to make sure they are present in the Android database. If that is not possible for some reason, I might be able to write some migration code for the old backup (there is already code that migrates from version 132 upwards, maybe I can extend that down a bit), or write a custom function to copy the contacts, with their keys, from the old database into the new one (not sure about that though, it's certainly never been done). Let me know if you can get the contacts in your Android backup, and if that fixes things. Then we'll see from there. Thanks! |
Thank you for your detailed reply! In the meantime, I figured out on my own that neither UUID nor phone number could be matched, since the recipient table is empty (I didn't know that it was from the input backup, not the desktop backup). So basically, it does a left join. Also, as expected, I hoped to fix it in one go before continuing messaging, but as it seems I have to leave it as it is.
|
The identifiers need to be present in both databases to be able to match between them. Once recipients are matched, messages/attachments can be transferred fro the Desktop database into the Android backup, also creating threads if not present. I'm slightly confused about the empty recipient table, as you mentioned
Yes, if exchanging some messages to get the recipients in your Android database is not an option than you'd indeed have to wait. I was thinking about some other ways to get the contacts in your Android installation (like sharing them in note-to-self from Desktop), but I can't come up with anything that works.
I also think these are your options, unless you want me to attempt to write custom code to migrate the old v106 database (or data from it) to a newer version. But if the above are acceptable for you they would probably be safer (less experimental). Let me know if you have any more questions or if I can do anything else for you. Otherwise this issue can probably be closed. Thanks! |
Just wanted to quickly let you know, I have added a (highly experimental) option to import valid contacts from the Signal Desktop database. Obviously you don't have to test it, you can just wait for the contacts to show up, if you prefer, but I thought I'd at least let you know. Some more info here |
I try to "convert" a desktop backup into a phone backup so that I can import it into the Android app.
However, signalbackup-tools requires the phone backup file as a "scaffold" to operate on. So I reinstalled and re-registered the Android app, exported a backup file of the empty app (1.7MB). When running:
it succeeds, but the new backup file is still empty and small (2.1MB instead of > 600MB)
The log contains these warnings:
Failed to find recipient for uuid
Why can the recipients not be added from the desktop backup?
Afterall, Signal desktop shows recipient names and phone numbers, so it should certainly contains not only anonymous UUIDs to do the match. I tried the same with:
--listrecipients
also shows that all recipients are there.The text was updated successfully, but these errors were encountered: