sigtop icon indicating copy to clipboard operation
sigtop copied to clipboard

Not a database error when running sigtop db

Open sylasabdullahnguyen opened this issue 6 months ago • 13 comments

Hello,

I am getting the following error when running sigtop db signal.db, sigtop check and sigtop query pragma user_version:

sigtop: cannot verify key: cannot execute SQL statement: file is not a database

I am on a MacBook M1 Pro with Ventura 13.6.3. I have the following versions of sqlite and sqlcipher:

3.41.2 2023-03-22 11:56:21 0d1fc92f94cb6b76bffe3ec34d69cffde2924203304e8ffc4155597af0c191da

or

3.46.0 2024-05-23 13:25:27 96c92aba00c8375bc32fafcdf12429c58bd8aabfcadab6683e35bbb9cdebf19e (64-bit)

after running

echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> \~/.zshrc
source ~/.zshrc

and

3.45.3 2024-04-15 13:34:05 8653b758870e6ef0c98d46b3ace27849054af85da891eb121e9aaa537f1ealt1 (64-bit) (SQLCipher 4.6.0 community)

From what I've found googling, the "not a database" issue generally means that the file is corrupted--but the Signal app itself seems to be functioning fine (for now, anyway). This is the output of hexdump -C db.sqlite | head -1:

00000000  22 45 77 04 d3 ae 7f d1  28 01 17 ca 87 9b 7e 93  |"Ew.....(.....~.|

This seems to be a bad sign according to what I read here, except that my Signal app starts up without an error. I've tried accessing the db.sqlite file (copied over from the /sql folder of the Signal app) directly in:

  • DB Browser for SQLite (v3.13.0),
  • SQLite Studio (v3.4.4),
  • using node and @signalapp/better-sqlite3 in a JS script,
  • sqlcipher from terminal, and
  • sqlite3 from terminal

with no success. I have also updated sigtop to the latest release. Would you happen to have an idea as to what is going on?

sylasabdullahnguyen avatar Jul 26 '24 06:07 sylasabdullahnguyen