GjjvdBurg / signal2html

Export a Signal backup to pretty HTML
MIT License
111 stars 15 forks source link

Database Version 140 - no such column: reactions #67

Open arulkevin opened 2 years ago

arulkevin commented 2 years ago

Hi, I have this issue with the latest version of Signal on Android. I am running the signalbackup-tools executable on Windows 10.

2022-05-11 21:49:12 | INFO - This is signal2html version 0.2.9
2022-05-11 21:49:12 | INFO - Found Signal database version: 140.
2022-05-11 21:49:12 | WARNING - This database version is untested, please report errors.
Traceback (most recent call last):
  File "C:\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python39\lib\site-packages\signal2html\__main__.py", line 24, in <module>
    main()
  File "C:\Python39\lib\site-packages\signal2html\__main__.py", line 20, in main
    sys.exit(main())
  File "C:\Python39\lib\site-packages\signal2html\ui.py", line 35, in main
    process_backup(args.input_dir, args.output_dir)
  File "C:\Python39\lib\site-packages\signal2html\core.py", line 690, in process_backup
    populate_thread(
  File "C:\Python39\lib\site-packages\signal2html\core.py", line 648, in populate_thread
    mms_records = get_mms_records(
  File "C:\Python39\lib\site-packages\signal2html\core.py", line 482, in get_mms_records
    qry = db.execute(
sqlite3.OperationalError: no such column: reactions

Thanks for your work

andris0131 commented 2 years ago

Same problem on database version 141.

Thank you in advance.

GjjvdBurg commented 2 years ago

Hi both, thanks for reporting this issue. I don't really have much time or interest to maintain this project at the moment, so please consider submitting a pull request. For this particular issue, it would require identifying the database version that introduced the schema change, and create a path in the code that gets the reaction data conditional on that version

doegox commented 2 years ago

I believe reaction got its own table at https://github.com/signalapp/Signal-Android/commit/ab55fec6bd42060e9cf2cb6e10c2dd59c611ca43 and the database version got bumped to v121 with "REACTION_REFACTOR = 121" at https://github.com/signalapp/Signal-Android/blob/843ed24bbbbd8d0d5e482d6e77f49374bad03cfe/app/src/main/java/org/thoughtcrime/securesms/database/helpers/SignalDatabaseMigrations.kt#L180