Errors were found in Zotero database

A new installation, with no data entered yet, produces the subject error when checking data integrity. Installation as follows:
Ubuntu Gutsy
Firefox 2.0.0.6
Zrc4 installed with data in default location (Firefox profile)
I deleted the zotero folder and reinstalled, but get the same error. I have added a few items and everything seems OK. Is this anything to worry about?
  • edited October 19, 2007
    Well, it's not great... For what it's worth, a clean install on Feisty (under Parallels on OS X) works fine for me.

    Could you try opening zotero.sqlite with the sqlite3 command line client (with Firefox closed) and running "PRAGMA integrity_check;" manually to see where the problem lies?

    If it's happening right after installation, you might want to dump and restore your post-install database using our DB Repair Tool and see if the database gets corrupted going forward.

    You might also want to try installing Zotero in a nightly build of Firefox 3.0 (using the Nightly Tester Tools to override the version check) to see if it still happens. My guess is that it won't.
  • Thanks, Dan,
    but you lost me at "opening zotero.sqlite . . .." I have sqlite3 but I don't know how to open a file with it or run the PRAGMA command.

    I tried your second suggestion (the DB Repair Tool) but the problem still existed immediately after the repair. It also persists using Zrc5.
  • So you're saying that if you use the DB Repair Tool, drop the file it gives back into the data directory as zotero.sqlite, start Firefox, and run the integrity check, it fails?

    Sounds like a spurious error to me. The repair tool should tell you if the file you uploaded was corrupt, so if it hasn't been giving you that message, it's probably nothing to worry about.

    If you wanted to check yourself, you'd need to use the command line client. You should be able to grab version 3.x of the SQLite client from your package manager (or you can install from source if you know how). Then start the terminal, navigate to the Zotero data directory, and run sqlite3 zotero.sqlite (with Firefox closed), and at the SQLite command prompt, type "PRAGMA integrity_check;".
  • The repair tool didn't say that the original file was corrupt.

    In sqlite3, "PRAGMA integrity_check" command produces just another command prompt.
  • edited October 22, 2007
    In sqlite3, "PRAGMA integrity_check" command produces just another command prompt.
    Does it say "ok"? If so then you're fine, and the error with Firefox open is just a fluke of the mozStorage system. It'll probably go away in Firefox 3.
  • Thanks, Dan,
    It does say "ok" so I'm not going to worry about it. I appreciate the help.
  • Hi Dan, I also keep getting errors in the database. I have passed the database through the tool and eliminated them but they keep coming back. Following your instructions I get the following:

    SQLite version 3.3.13
    Enter ".help" for instructions
    sqlite> PRAGMA integrity_check;
    rowid 34789 missing from index sqlite_autoindex_fulltextWords_1
    rowid 34937 missing from index sqlite_autoindex_fulltextWords_1
    wrong # of entries in index sqlite_autoindex_fulltextWords_1
    sqlite>

    I don't think that looks good. Any idea how I can resolve this problem? Is it simply a matter of reindexing? If so how? I have about 45 documents that won;t index in my database at the moment...

    Tony
    ubuntu 7.04, ooo 2.2.0, firefox 2.0.0.8, zotero 1.0.0rc5, ooo plugins 1.0b1
  • Tony: Reindexing might fix the problem, though the repair tool is better. (The unindexed items are likely just web links, which can't be reindexed because there's no content.)

    Note that a Firefox crash could corrupt your database like this. Can you reproduce the corruption even without Firefox crashing?
  • I have similar "Errors were found in Zotero database" message in Ubuntu Gutsy, FF2008, Zotero rc5, on two different machines with same settings.
  • I think it is due to Firefox crashes. I will restore using repair tool and then monitor.

    Thank you for the response.
  • Hwere is the location of Zotero database? I use Ubuntu Gutsy. Thanks
  • On Linux, the path is usually ~/.mozilla/firefox/xxxxxxxx.default/zotero

    Also, in your file browser you may need to select the option to "show hidden files" in order to see .mozilla
  • FWIW the integrity check command is
    sqlite3 zotero.sqlite "PRAGMA integrity_check"
    I ran this command and got "ok", but Zotero still reports DB errors, therefore, it must be a disconnect between Zotero and the underlying database. What is the actual command run when the user clicks on the "Check Database Integrity" button? Is there some tool used in this command that is expected by Zotero but not available in Ubuntu?
  • As I said above, this is a spurious error that is just a fluke of the mozStorage system on Linux (or the way disk caching works, or something of the sort). The "Check Database Integrity" button just runs PRAGMA integrity_check.

    Hopefully Firefox 3.0 will fix this, but you can safely ignore it in the meantime.
  • I've used the database repair tool a couple of times now to fix errors in my Zotero database. However, each time I repair the database I still get errors again within a day or two. I can't tell if the previous discussions on this thread address this problem or not. Is there something I can do to stop this problem from occurring again? Thanks.
  • I've used the database repair tool a couple of times now to fix errors in my Zotero database. However, each time I repair the database I still get errors again within a day or two. I can't tell if the previous discussions on this thread address this problem or not. Is there something I can do to stop this problem from occurring again?
    No, the above discussion pertains to Linux only and refers to a spurious error message.

    If you keep getting actual DB errors, I'd recommend turning off full-text indexing in the Search pane of the Zotero prefs by setting "Maximum characters to index per file" and "Maximum pages to index per file" to 0. You could also just try a smaller maximum number of characters (say, 5000).

    This problem should go away with Firefox 3, which Zotero 1.5 will require. You'll be able to reindex locally stored documents at that time.
Sign In or Register to comment.