bepaald / signalbackup-tools

Tool to work with Signal Backup files.
GNU General Public License v3.0
755 stars 36 forks source link

Merging with Win-Version 20240127.140645 does not work anymore #183

Closed hugogithubs closed 7 months ago

hugogithubs commented 7 months ago

Hi, Background: I have big file ("long term merge file") and another smaller daily cropped file. Both file (big one and cropped one) have same database version 211.

I have issue with new win-version 20240127.140645 if merging these two files (merge big file to cropped file).

With previous Win Version 20240103.201232 it seems to work fine without error or warnings in both order of the two files during merge.

If I do exactly the same with new version 20240127.140645 I get errors:

importThread (53)
[Warning]: Source database contains 'remapped_recipients'. This case may not yet be handled correctly by this program!

and later

Failed to find recipient._id matching uuid/phone/group_id in target database
[Error]: A fatal error occurred while trying to import thread 54. Aborting

If I reverse the order of the two files during the merge with New Win Version 20240127.140645 it works without errors.

hugogithubs commented 7 months ago

BTW: I added/uploaded a log file but then decided not to use this fille for data protection reasons. The link in in comment is deleted, but the file can still be reached whith this previous link. How can I delete this file again?

bepaald commented 7 months ago

That looks like a bug. I did mess with the thread/recipient matching just recently so I must have made a mistake in that. I'm not home right now, but I'll investigate later today. I might have some commands for you to run to get some more info if that's all right.

I deleted your earlier edits from history, not sure if that helps (I did not see any links in there). Other than that, I wouldn't know, I wouldn't know how to access that file without a link and I don't think anyone can, except probably github employees.

hugogithubs commented 7 months ago

BTW: I added/uploaded a log file but then decided not to use this fille for data protection reasons. The link in in comment is deleted, but the file can still be reached whith this previous link. How can I delete this file again?

I investigated and file can be deleted via github support by myself: https://support.github.com/?q=remove+image+attachment

bepaald commented 7 months ago

Ok, just took a look at the change I made recently. I erroneously added a return false after not finding a recipient in the target database, even though that's not an error. I've now removed it, so I'm hoping everything is back in working order. I'd love for you to let me know.

You might also notice, between versions 20240103 and 20240127 (or current), I implemented fairly big speedup in merging (if the source is large). Before, the source backup had to be re-read for every thread imported, now it should only be read once. So I'm extra curious if everything is still working the same. Maybe, just to be sure and if it's not too much trouble, you could also switch the target and source and let me know if that still works as well.

Thanks for reporting!

hugogithubs commented 7 months ago

Hi, I tested with latest Win Version 20240205.120839.

Merging in both directions ( big old to new cropped and vice versa) runs now without any errors! I will have a deeper look into the log, but I think it is ok now, if not I will give you again feedback.

Having now logfile creation is a good new feature. My script for merging can now look in logfiles which db version are to be merged and if cropped has newer version the script merges the old big to the cropped new instead of recommended direction (small to big file). So my merged has always the most actual db version.

Thank you for fast reaction, good Job!

bepaald commented 7 months ago

Excellent, thanks for reporting back!