bepaald / signalbackup-tools

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

importfromdesktop fails with "no such column: uuid" #144

Closed f0k closed 1 year ago

f0k commented 1 year ago

Hey, thanks a lot for maintaining this tool! I'm currently trying to merge a recent desktop backup into a dated (2022) Android backup. After reading the backup file and getting to the point of reading the desktop data, it fails with:

Error : During sqlite3_prepare_v2(): no such column: uuid
  Query: "SELECT rowid,id,e164,type,LOWER(uuid) AS 'uuid',groupId,IFNULL(json_extract(json,'$.isArchived'), false) AS 'is_archived',IFNULL(json_extract(json,'$.isPinned'), false) AS 'is_pinned',IFNULL(json_extract(json,'$.groupId'),'') AS 'json_groupId',IFNULL(json_extract(json,'$.derivedGroupV2Id'),'') AS 'derivedGroupV2Id',IFNULL(json_extract(json,'$.groupVersion'), 1) AS groupVersion FROM conversations WHERE json_extract(json, '$.messageCount') > 0"

What I have found so far:

I did a half-hearted attempt at checking the database schema of Signal Desktop with the latest AppImage on sqlitebrowser.org (which has sqlcipher support), but it keeps re-asking for the key (tried the key from config.json as a raw key using both the v3 and v4 defaults without luck). Will try to investigate further, maybe by adding some print or export statements to signalbackup-tools, but wanted to report here in case this problem was encountered before.

f0k commented 1 year ago

Oh wait, this was fixed in b0de42b :clap: I was using an outdated two-week old version of signalbackup-tools, it works with the current master. Thanks and sorry for the noise!

bepaald commented 1 year ago

Hi! The desktop application recently renamed all 'uuid' columns in the database to other names (mostly 'serviceid').

I have dealt with this about two weeks ago, but it's possible I've missed a spot. I will check later, but since I'm not at home at the moment, could you first just make sure you have a fully updated version of this program? The version (= the date) is always the very first line of output printed. It must be at least > 20230509, but changes to importfromdesktop were made even 4 days ago, try to get the most up-to-date version.

Thanks!

EDIT haha, we were simul-typing. Glad it's solved.