Database Upgrade Error/ Zotero Crashing on Start-Up after Update

I updated Zotero on launch today. I get this error message when starting Zotero:

Database upgrade error

Error: Error(s) encountered during statement execution: attempt to write a readonly database [QUERY: DELETE FROM itemTypesCombined] [PARAMS: ] [ERROR: attempt to write a readonly database]
Zotero.DBConnection.prototype.queryAsync@chrome://zotero/content/xpcom/db.js:705:13
From previous event:
this.init@chrome://zotero/content/xpcom/zotero.js:414:25

Z prompts me to update. There are no updates.
Then Z shuts down.

I tried reinstalling Z and the Firefox connection to no effect.
  • That suggests that your Zotero data directory is no longer writable by your OS user account. This could be due to file permissions or security software.

    If this is an institutional computer, you should ask your IT department for help.
  • It's a personal computer.
    I deleted Zotero and reinstalled to no effect.

    I checked the permissions on:

    /Applications/Zotero.app/Contents/MacOS/zotero

    and they are set to read/write.

    Is there another file that needs permissions checked?
  • It’s about the data directory — follow the link I gave above. It has nothing to do with the app itself, and reinstalling wouldn’t make a difference.
  • edited today at 12:33am
    Thanks.
    I had tried that but the link says the directory should be in:
    /Users/username/Zotero

    But I have no such file or directory in my
    /Users/username/

    directory. (And I replaced "username" with my actual username).
    I'm using Mac Sequoia 15.5
    Searching for "zotero.sqlite" yields nothing either.
    Is there another file to search for?
  • That would mean you either weren’t using Zotero on this computer or you accidentally deleted the data directory, such as when trying to clean up disk space. And then separately, the permissions are incorrect in your home folder, preventing Zotero from creating a new, empty data directory there.

    You can fix the permissions on the home folder using File → Get Info in Finder, but the rest obviously only you would know about.
  • I was using Zotero on my Mac.
    I had a disk image of Zotero 7.0.11 and installed that. It loaded fine. It says the default data directory is:
    /Users/username/Library/Application Support/Zotero/Profiles/gc0u8noh.default/zotero

  • edited 2 hours ago
    Not sure I'm following. Are you saying if you update 7.0.11 to a more recent version (which version?), it fails to start up?
    It says the default data directory is:
    /Users/username/Library/Application Support/Zotero/Profiles/gc0u8noh.default/zotero
    That would only be the default data directory if you used Zotero Standalone on this computer (or one from which you migrated data) many years ago and Zotero hasn't been able to migrate the folder since then — which it wouldn't be able to if the permissions on your home folder are wrong. So you should fix the permissions on your home folder.

    You can also close Zotero and move that final 'zotero' folder to 'Zotero' in the home folder yourself, and Zotero will then use that, but other programs could also break with incorrect permissions on the home folder.
  • That is the filepath for the profile, not the data directory (note the "Profile" in the path), so that'd be very odd. That's what you get when you look for the data directory from the Zotero preferences?
  • edited 2 hours ago
    @adamsmith: That's the old data directory location from when it was stored within the profile, pre-2017.
  • edited 1 hour ago
    @adamsmith Yes. Copied from the Advanced>Data Directory

    I can't figure out why Mac isn't locating the zotero.sqlite files. I was using "locate" in Terminal (yes, I updated the database). Spotlight wasn't finding it either. I'm rebuilding Spotlight index.

    @dstillman It was the update from 7.0.11 to 7.021 yesterday that initiated the snafus.

    Will try Advanced>Data Directory>"Revert to Default Location" later but worried that will do more wackiness.
  • edited 1 hour ago
    I can't figure out why Mac isn't locating the zotero.sqlite files
    Spotlight doesn't search within ~/Library.

    If you can reproduce 7.0.11 → 7.0.21 triggering this startup error, we'd want to know that.

    Anyway, it's what I say — this is an ancient data directory location from the days of Zotero Standalone, and you should fix the permissions in your home folder and move that 'zotero' to be 'Zotero' in your home folder.
Sign In or Register to comment.