signal-message-exporter icon indicating copy to clipboard operation
signal-message-exporter copied to clipboard

sqlite3 error: no such column: type

Open jimmale opened this issue 2 years ago • 1 comments

I'm using the branch signal-6-5-6 (commit a9fc439d57849990841e4a7f403122d41fc0f50f) with a backup file generated with Signal version 5.51.7 and I've run into the following error:

[docker image build step removed for brevity]


Successfully tagged workspace:latest
docker run -e SIG_KEY -e SIG_FILE -it -v ${PWD}:/root/ workspace python3 signal-message-exporter.py
2022-12-31 17:16:05 - INFO - Recreating temporary export dir
2022-12-31 17:16:05 - INFO - Starting signalbackup-tools
2022-12-31 17:16:05 - INFO - running command: /usr/bin/signalbackup-tools --input signal-2022-12-31-09-37-14.backup --output bits/ --password [REDACTED] --no-showprogress
2022-12-31 17:19:33 - INFO - signalbackup-tools (/usr/bin/signalbackup-tools) source version 20221227.152141 (OpenSSL)
IV: (hex:) [REDACTED] (size: 16)
SALT: (hex:) [REDACTED] (size: 32)
BACKUPKEY: (hex:) [REDACTED] (size: 32)
CIPHERKEY: (hex:) [REDACTED] (size: 32)
MACKEY: (hex:) [REDACTED] (size: 32)
COUNTER: 4057112380
Reading backup file...
Read entire backup file...

done!

Exporting backup into 'bits//'
Writing HeaderFrame...
Writing DatabaseVersionFrame...
Writing Attachments...
Writing Avatars...
Writing SharedPrefFrame(s)...
Writing KeyValueFrame(s)...
Writing StickerFrames...
Writing EndFrame...
Writing database...
Done!

2022-12-31 17:19:33 - INFO - Finished signalbackup-tools
2022-12-31 17:19:33 - INFO - Parsing the sqlite database bits/database.sqlite
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 1656
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 1742
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 1763
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 1777
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 1785
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 1821
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 1844
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 1852
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 1905
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 1914
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 2063
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 2089
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 2096
2022-12-31 17:19:33 - INFO - Unable to find a contact on your phone with ID: 2166
2022-12-31 17:19:33 - INFO - Total num SMS messages: 78704
2022-12-31 17:19:33 - INFO - Total number Signal messages: 39918
Traceback (most recent call last):
  File "/root/signal-message-exporter.py", line 254, in <module>
    print_num_mms()
  File "/root/signal-message-exporter.py", line 37, in print_num_mms
    cursor.execute(q)
sqlite3.OperationalError: no such column: type
make: *** [Makefile:6: run] Error 1
~/signal-message-exporter [signal-6-5-6] $

Any recommendations?

jimmale avatar Dec 31 '22 17:12 jimmale

Yep if it's version 5ish of Signal, then use the master branch. From version 5 to 6, there were changes to the database like:

mms.address became mms.recipient_id mms.msg_box became mms.type

So the master branch should work with the older database schema.

alexlance avatar Dec 31 '22 23:12 alexlance