Zotero Standalone won't open - Database upgrade error

Hello,

Installed Trying to install Zotero Standalone 5.0.78 on laptop running Windows 10 (no Firefox or Chrome) and getting the following error message when trying to launch it:
=============
Database upgrade error

Error: Error(s) encountered during statement execution: no such trigger: insert_date_field [QUERY: DROP TRIGGER insert_date_field] [PARAMS: ] [ERROR: no such trigger: insert_date_field]
Zotero.DBConnection.prototype.queryAsync<@chrome://zotero/content/xpcom/db.js:662:13
From previous event:
Zotero.Schema</this.updateSchema/updated<@chrome://zotero/content/xpcom/schema.js:204:25
==============

Same client on a different computer seems to be working fine with the same parameters. The Zotero library is stored on the local hard disk, same location and both copies are identical. Any suggestions would be most welcome.
Thanks and best wishes
Alex
  • It looks like your database was in an unexpected state, possibly from some DB corruption in the past. If you run the latest Zotero beta, you should be able to perform the upgrade, and you can then switch back to the release version. You can use the Windows ZIP version on that page and just run zotero.exe once from the extracted folder rather than replacing your current installation.
  • Thanks a lot for the speedy reply!
    I tried running once and then overwriting the current installation, but now I get a different message:
    =========
    There was an error starting Zotero.

    Error: Invalid field 'accessDate
    _fieldCheck@chrome://zotero/content/xpcom/data/itemFields.js:426:13
    Zotero.ItemFields</this.getLocalizedString@chrome://zotero/content/xpcom/data/itemFields.js:166:5
    getLocalizedName@chrome://zotero/content/xpcom/data/searchConditions.js:654:14
    Zotero.SearchConditions</this.init<@chrome://zotero/content/xpcom/data/searchConditions.js:578:23
    From previous event:
    ZoteroService@file:///C:/Program%20Files%20(x86)/Zotero/components/zotero-service.js:352:7
    @chrome://zotero/content/include.js:4:14
    =========
    As I mentioned, the database seems to work perfectly on the other computer.
    Anything else that could be done?
    Thanks!
  • Would you mind uploading your database to the DB Repair Tool and posting the Upload ID? You can ignore the download link the tool provides, but the Upload ID may help us figure out what happened during your upgrade.
  • Thank you - that solved it. For your reference, the ID is 5de577a0ebe05
    Still a bit strange that the old (corrupt?) DB file works fine on one computer, but not the other. Hopefully, the above info could provide insights... Anyway, everything works fine on both machines now - thanks a lot for your time!

  • Oh, the DB Repair Tool wasn't really meant to fix this, but glad it's working now.

    You're saying you tried the same zotero.sqlite file on both computers? Or just synced libraries?

    If the former, I'd guess that the other one simply hasn't been updated to Zotero 5.0.78 yet, which includes a DB upgrade that touched the corrupted data.

    On the computer where this was broken, is there a zotero.sqlite.105.bak file in your data directory? Could you upload that to the DB Repair Tool and provide another Upload ID?
  • I was not able to sync anything initially because Zotero would not get me past the error message on the other computer. I tried copying the 'old' zotero.sqlite file from the computer where I had it working properly and that did not help. But when I uploaded it for repair and copied over the repaired zotero.sqlite onto the new computer, it started working like it should, with no more tweaking required. The original file still works properly on the 'old' machine, although it did run some auto sync when I launched Zotero after the backup/repair procedure. The 'old' computer has 5.0.78 on it, the new one now has 5.0.79 beta.
    I uploaded the zotero.sqlite.105.bak from the 'new' computer. The ID is 5de5844763d44.
    Thanks!
  • Hi I recive the same error as the first mentioned in this thread. I do not get it to work with the repair tool, the Upload ID is 5de5942f6dff7.

    Thanks in advance,
  • @joelmarkgren: You can upgrade using the beta, as mentioned above, and then switch back to the official version. (We'll push 5.0.79 soon for databases in this unexpected state, but right now the beta is just this and one other fix, so it's perfectly safe to use.)
  • It worked thanks for the help.
  • @aborisen: I'm not quite sure what happened for you. The databases you uploaded pass all tests and don't seem to be in a state where they'd even trigger the original error (whereas joelmarkgren's was).

    We definitely fixed the original error for databases in this unexpected state in the beta, so if you don't want to worry about this, that's fine, but I'd be very curious if you're able to reproduce any sort of problem again by closing Zotero, moving the working zotero.sqlite out of the way, and then renaming zotero.sqlite.105.bak to zotero.sqlite and restarting the Zotero beta. If so, it'd be great to see debug output for a startup that results in the error from the beta.
  • I have the same problem. My Upload ID is 5de59a0f6f342.
    Could you help me please ? Thanks very much.
  • The "no such trigger: insert_date_field" error is fixed in Zotero 5.0.79, available now. Sorry for the trouble.
  • @dstillman: My original step was to replace 5.0.78 with 5.0.79 beta and that did not help. I have two folders in Program Files (x86): Zotero (currently active) and Zotero Standalone (probably from an earlier installation of 4.x).

    I tried reverting back to zotero.sqlite.105.bak but the DB loaded no problem, so I can't replicate the glitch. I have a hunch that it had something to do with the fact that I had an outdated version of Zotero on this laptop but did not use it for a while until I tried using it today and it said that it could not read the DB in this later version and requested an upgrade. Do you think something might have gone wrong when I moved from 4.x to 5.0.58.?
  • Hi, I still have an error (Error: Invalid field 'accessDate
    _fieldCheck@chrome://zotero/content/xpcom/data/itemFields.js:426:13
    Zotero.ItemFields</this.getLocalizedString@chrome://zotero/content/xpcom/data/itemFields.js:166:5
    getLocalizedName@chrome://zotero/content/xpcom/data/searchConditions.js:654:14
    Zotero.SearchConditions</this.init<@chrome://zotero/content/xpcom/data/searchConditions.js:578:23
    From previous event:
    ZoteroService@file:///Applications/Zotero.app/Contents/Resources/components/zotero-service.js:352:7
    @chrome://zotero/content/include.js:4:14").

    I downloaded the last version of zotero, used the DB repair tool (My Upload ID is 5de59a0f6f342). And nothing works. An idea of why?

    I have access to my synchronized database from 6 month ago (approximately), but lost all the changes that I have done on it since the last months. I think it comes from the fact that I changed my word version, so I had to update my zotero version. At this point, I lost everything. Thank you for the help.
  • adelineDelonca, I was having exactly the same problem.

    I closed Zotero (after many restarts and attempts at reinstalling), deteted the Zotero file within my user section and restarted the programme. It downloaded all the deleted info from the cloud storage when it restarted and now works fine.

    I'm running a mac, so if you're using a PC I'm not sure where I'd find the folder.

    No idea what went wrong, but a new start seemed to fix it.
  • No, please don't wipe and resync — we'd like to help troubleshoot this so we can solve this for others who are affected.

    @adelineDelonca, we'll review your Upload ID and get back to you shortly.
  • edited December 3, 2019
    OK, @adelineDelonca and others: I was able to reproduce the "Invalid field" error by upgrading a Zotero 4 database to Zotero 5.0.79. So if you hadn't upgraded Zotero in over two years and upgraded now, this would happen.

    We'll try to have a fix out today, but if you prefer to restore from a synced computer in the meantime, that's fine — we don't need further debugging info.
  • edited December 4, 2019
    These steps are no longer necessary. Update to Zotero 5.0.80 for the fix.

    If you'd like to fix this right away, here's how you can do so:

    1) Close Zotero and go to your Zotero data directory.

    2) Make a backup of all the zotero.sqlite* files in that directory.

    3) In that directory, look for zotero.sqlite.X.bak, where X is the highest number above 1 and below 105 — probably around zotero.sqlite.78.bak. Delete the current zotero.sqlite and rename zotero.sqlite.78.bak (or similar) to zotero.sqlite.

    4) Before starting Zotero again, install Zotero 5.0.77: 5) Open Zotero 5.0.77, which should upgrade your Zotero 4 database.

    6) Update to Zotero 5.0.79 from Help → Check for Updates.
  • edited December 4, 2019
    OK, a fix is available in the latest Zotero beta, so you can install that and let us know if it works for you. After doing so, you can switch back to Zotero 5.0.79 from the download page.
  • We didn't receive any feedback on the beta version, but I didn't want to delay getting this out, so the fix is now included in Zotero 5.0.80, available via Help → "Check for Updates…". If you're experiencing this, update to 5.0.80 and let us know if you have any further trouble.
  • Fixed for me now I appreciate it!
This discussion has been closed.