pajowu / signal-backup-decode

Decode Signal Backups
GNU General Public License v3.0
212 stars 17 forks source link

Failed to copy in memory database to file [..] near "INTO": syntax error: Error code 1: SQL error or missing database. #41

Open frans-fuerst opened 3 years ago

frans-fuerst commented 3 years ago

On tag v0.2.1, after building and installing and running

signal-backup-decode --force --password-file pw-2021-03-21  signal-2021-03-21-16-51-07.backup 

I'm getting

[ERROR] Failed to copy in memory database to file: signal-2021-03-21-16-51-07/signal_backup.db: near "INTO": syntax error: Error code 1: SQL error or missing database.

with both - a new backup file I made right now on Signal (Android) 5.4.12 and an older one from 2019-07-24 (I don't know the exact version any more, but I can try to narrow it down if of any help.)

I tried adding --output-type RAW and build from master as well as some prior commits all with the same result.

pajowu commented 3 years ago

Oh, interesting. This seems to be an issue when running VACUUM INTO {OUTPUT_FILENAME}. Which version of sqlite3 is installed on your system? Does the path you're exporting to include any special characters?

pajowu commented 3 years ago

It seems that VACUUM INTO was added in sqlite 3.27 (https://www.sqlite.org/releaselog/3_27_1.html). Could you try upgrading to a sqlite version newer than 3.27 an check if the issue still exists there?

frans-fuerst commented 3 years ago

On Fedora 30 SQLite is being shipped in version 3.26, so this seems to be the problem. On Fedora 33 version 3.34.1 is installed and the decryption works

Is there a possibility for you to let cargo check for v3.27+? (fyi: on RedHat based systems the packack is called sqlite-devel)?

Maybe in that step you could also add cargo as requirement in your Readme file