Upgrade Failed (Report ID: 1135535810)
I attempted to upgrade from (I assume) the latest Zotero 1.x to 2.0b7.6 and received the following error after about 30-45 minutes:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://zotero/content/xpcom/db.js :: anonymous :: line 485" data: no] [ERROR: constraint failed]
The system is running Windows XP and Firefox 3.5.6 and the sqlite file is about 150 MB.
Before I downgrade, anything I can do to recover from this problem? Any further info needed?
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://zotero/content/xpcom/db.js :: anonymous :: line 485" data: no] [ERROR: constraint failed]
The system is running Windows XP and Firefox 3.5.6 and the sqlite file is about 150 MB.
Before I downgrade, anything I can do to recover from this problem? Any further info needed?
If you don't have a backup of your data from before the upgrade, then there's probably not an awful lot that can be done to confirm that nothing was lost.
Once again:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://zotero/content/xpcom/db.js :: anonymous :: line 485" data: no] [ERROR: constraint failed]
This time it's report id 1270220850
As before, zotero failed to start until I restarted firefox, then it came up apparently ok. The database also passes the integrity check.
I told zotero to submit the debug file to the server and got id D861845428
The resulting converted database is the same size as last time. (It's slightly smaller than the v. 1.x database.)
Anyone have an idea what's going on? Short of tarring up 7 GB of data and moving it to a Unix machine where I can do a proper diff on it, it's hard to tell if anything went missing, but after casual inspection it does look OK. (And performance is noticeably better than under 1.x as well!)
Relevant debug output should include a line beginning with "Updating user data tables".
I take it the debug output is cleared on restart of Firefox?
You can access the Zotero preferences via Tools -> Add-ons -> Extensions -> Zotero -> Options/Preferences even if you can't open the Zotero pane (though whether debug output submission works may depend on the error).
Report: 2098773452
Debug: D803575741
Same error, but in context it's:
(3)(+0012794): Vacuuming database
(3)(+0001189): [Exception... "Component returned failure code: 0x80004005 (NS_ER
ROR_FAILURE) [mozIStorageConnection.executeSimpleSQL]" nsresult: "0x80004005 (N
S_ERROR_FAILURE)" location: "JS frame :: chrome://zotero/content/xpcom/db.js ::
anonymous :: line 485" data: no] [ERROR: constraint failed]
(2)(+0000000): Transaction is not in progress in rollbackTransaction()
(3)(+0004010): Backing up database 'zotero'
Basically, something in your database is in a state that's inconsistent with certain checks that were added in Zotero 2.0, and a database cleanup that takes place after the upgrade is catching that. The update process should take care of such cases, but something is apparently being missed. The upgrade itself seems to have completed successfully for you, so all your data should be intact, but you might run into an issue later if the problem isn't corrected.
VACUUM;
That would give us a more helpful error, which unfortunately Firefox itself doesn't pass along.
C:\Documents and Settings\szarka\Desktop\foo>sqlite3.exe zotero.sqlite
SQLite version 3.6.21
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> VACUUM;
Error: constraint failed
sqlite>
(I'll go back to plan A and upload my db while I sleep...)
Dan wrote to let me know that "this looks like a bug in SQLite that allowed an inconsistency into your database without triggering an integrity check error." He had me follow the instructions at https://www.zotero.org/utils/dbfix/manual to rebuild the database, and I could see that SQLite caught several "constraint failures" that had crept in. Then I issued the VACUUM; command from the SQLite prompt and this time it completed without error.
So, I'm calling this a success and moving on to try syncing my database & files!