error starting error after latest beta update?

Hello! After installing the latest beta update Zotero refuses to launch with this message:

```
Error: Error(s) encountered during statement execution: database disk image is malformed [QUERY: SELECT * FROM creators] [PARAMS: ] [ERROR: database disk image is malformed]
Zotero.DBConnection.prototype.queryAsync@chrome://zotero/content/xpcom/db.js:680:13
From previous event:
ZoteroService@file:///home/alex/Zotero_5.0.97_beta/components/zotero-service.js:347:7
callback@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/alex/.zotero/zotero/odxygpmz.default/extensions/zotxt@e6h.org.xpi!/bootstrap.js:55:26
loadZotero@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/alex/.zotero/zotero/odxygpmz.default/extensions/zotxt@e6h.org.xpi!/bootstrap.js:63:12
observe@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///home/alex/.zotero/zotero/odxygpmz.default/extensions/zotxt@e6h.org.xpi!/bootstrap.js:496:13
```

Can this error be caused by the new beta or is 'just' a problem that occurs by coincidence after the update?

Thanks!
  • Most updates don't affect data in any way, and the ones that do (which haven't happened recently) run standard database commands that wouldn't cause file corruption.

    Generally this happens if you keep your Zotero data directory in a cloud storage folder, on a network share, or on an external drive that's unmounted incorrectly. Is that the case for you?

    Try restoring from one of the automatic backups in your data directory.
  • Thanks for this clarification! I don't think it's a problem with (un)mounting as my zotero db is stored on my local disk.

    The error message has some variations:

    [Exception... "Could not convert JavaScript argument arg 0 [mozIStorageService.openDatabase]" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" location: "JS frame :: chrome://zotero/content/xpcom/db.js :: Zotero.DBConnection.prototype._handleCorruptionMarker :: line 1324" data: no]
    Zotero.DBConnection.prototype._handleCorruptionMarker@chrome://zotero/content/xpcom/db.js:1324:24
    From previous event:
    ZoteroService@file:///home/alex/Zotero_5.0.97_beta/components/zotero-service.js:347:7
    @chrome://zotero/content/include.js:4:14


    The error keeps popping up even when I try older database backups ...
  • That might be a bug, but delete the zotero.sqlite.is.corrupt file and try again.
  • I got a db copy from another installation on a second machine, deleted *.is.corrupt AND *.damaged and now Zotero runs again.
  • If you don't mind (and still have them), could you upload ZIPs of both zotero.sqlite.damaged and zotero.sqlite.1.bak to the DB Repair Tool and post the two Upload IDs? You can ignore the download links the tool provides, but the Upload IDs would let us run some tests to see what kind of file corruption this was and whether it was present in the backup file.

    (If you wanted to check this yourself, you could also make a backup of all the zotero.sqlite* files, temporarily disable auto-sync, swap in the various .bak files in the data directory as zotero.sqlite, and for each one start Zotero and check database integrity from the Advanced → Files and Folders pane of the preferences.)
  • edited February 17, 2023
    Not sure it's related, but as another data point, I also had a corrupted DB running beta last week on a database that's only ever been on a local SSD. Automated restore worked fine (so I don't need any help) and my DB is 700MB, so I can't upload it to the repair tool, but I do still have the .damaged file and can make it available if it's of interest.
  • @adamsmith: Hmm. And DB integrity check passes on the restored DB?
  • yup, integrity check is fine.
  • Can you open the .damaged file in sqlite3 (or another SQLite client), run pragma integrity_check;, and (assuming there's actually an error) send the output to support@zotero.org?
  • sqlite> pragma integrity_check;
    ok


    so not an actual issue? Zotero was quite insistent there was, though.
Sign In or Register to comment.