bepaald / signalbackup-tools

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

importdesktop terminate after std::bad_any_cast #91

Closed Meteor0id closed 1 year ago

Meteor0id commented 1 year ago
Inserting 1 message reactions.
Finding recipient for uuid: debbxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Getting value of field 'update_timestamp' (idx 3). Value as string:
Type: Dn Requested type: x
terminate called after throwing an instance of 'std::bad_any_cast'
    what():   bad any_cast

Signal desktop 6.5.0-beta.2 production Windows 10

bepaald commented 1 year ago

Right, this is a problem. I wonder if it has anything to do with the beta version...

I need to get to work, but I'll surely try to fix this later today. Thanks for reporting!

bepaald commented 1 year ago

As a first quick search, I thought I'd just quickly grep through the code for update_timestamp, but that doesn't give any results. Did you copy-paste that snippet or could there be a typo in there?

EDIT I think it's probable updateD_timestamp... I'll get on it after work.

bepaald commented 1 year ago

Ok, this should be taken care of. Please let me know if it's not.

I'm still very much trying to get the --importfromdesktop function working on old desktop databases (I believe it's working ok with newer databases), but mine is quite new, so that makes it impossible to test. If you encounter a new error please let me know, either in a new issue or in #57 (which is more or less the main issue for this function).

Thanks!

Meteor0id commented 1 year ago

I now run into the same error further down the line it seems

Checking foreign key constraints... ok
Checking database integrity (full)... ok
Dealing with thread 19
Error: File exists. Not overwriting
Getting value of field 'remote deleted' (idx 11). Value as string:
Type: Dn Requested type: x
terminate called after throwing an instance of 'std::bad_any_cast'
   what():   bad any_cast
bepaald commented 1 year ago

Thanks again!

Slightly confused here, I assume there is another typo (remote_deleted?), but that field is never queried in --importfromdesktop, as it is not a desktop-field, it only exists in the Android database.

Also I see the line Dealing with thread 19, which this function does not print. May I assume this was actually --exporthtml? For that case, I did actually fix this, I think (but it's still confusing as this field should always exist and be non-null in current databases which exporthtml requires and checks for).

Anyway, I may have fixed this if I understood it correctly? Please let me know. Thanks again!

Meteor0id commented 1 year ago

I am combining --importfromdesktop and --exporthtml with the idea of creating a very complete html export. I retried with the most recent version and somehow did not run into the bug this time.