8000 [BUG] SqliteError: database disk image is malformed · Issue #348 · jakowenko/double-take · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[BUG] SqliteError: database disk image is malformed #348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jjvelar opened this issue Mar 21, 2024 · 1 comment
Open

[BUG] SqliteError: database disk image is malformed #348

jjvelar opened this issue Mar 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jjvelar
Copy link
jjvelar commented Mar 21, 2024

Hi,
I get this error: SqliteError: database disk image is malformed
No images or training images are available.
Double-take (1.13.1) is installed in Home Assistant OS as an add-onn.
Please advise.
Thanks in advance for your help.

@jjvelar jjvelar added the bug Something isn't working label Mar 21, 2024
@bsdzip
Copy link
bsdzip commented Mar 22, 2025

I got this too. Running in docker, connected to compreface and hass/mqtt.

info: Double Take v1.13.11.8
info: MQTT: connected
info: MQTT: subscribed to frigate/events
error: SqliteError: purge error: database disk image is malformed
at Job.job (/double-take/api/src/util/storage.util.js:42:70)

Images was purged, but not the data.
After manually removing all matches, I was left with one that gives me "Request failed with status 500" and it could not be deleted.

Log when trying to delete:
error: SqliteError: database disk image is malformed
at module.exports.delete (/double-take/api/src/controllers/match.controller.js:136:75)
at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)
at Layer.handle [as handle_request] (/double-take/api/node_modules/express/lib/router/layer.js:95:5)
at next (/double-take/api/node_modules/express/lib/router/route.js:149:13)
at /double-take/api/src/middlewares/index.js:67:3
at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)
at Layer.handle [as handle_request] (/double-take/api/node_modules/express/lib/router/layer.js:95:5)
at next (/double-take/api/node_modules/express/lib/router/route.js:149:13)
at module.exports.jwt (/double-take/api/src/middlewares/index.js:9:14)
at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)

I did try with sqlite3 PRAGMA commands, but failed, these was the output:
sqlite> PRAGMA integrity_check;
row 1 missing from index idx_match_response_match
row 1 missing from index idx_match_filename
row 1 missing from index idx_match_createdAt
wrong # of entries in index idx_match_response_match
wrong # of entries in index idx_match_filename
wrong # of entries in index idx_match_createdAt

Ended up recreating the db:
sqlite3 database.db .dump > backup.sql
mv database.db old_database.db
sqlite3 database.db < backup.sql

All good, seems to be working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0