Error syncing

Report ID: 113957274

Zotero v5.0.87 standalone application on Ubuntu Focal 20.04 LTS.

Click on sync button, get the error

Component returned failure code: 0x80520008 (NS_ERROR_FILE_ALREADY_EXISTS) [nsIFile.create]

  • Also happens with the initial sync when starting the application. Debug ID: D364647100
  • I think I solved the problem.

    Zotero -> Edit -> Preferences, Advanced tab -> Files and Folders.

    My Data Directory Location is pointing at ~/.zotero/zotero/jzz7ebwd.default/zotero, instead of the default ~/Zotero. Inside of that directory, storage was a broken soft link pointing at an unexisting location, instead of a directory.

    Chaning the data directory location to "Default" would show a window saying that Zotero needs to be restarted, and to copy your data files to the new location before restarting. Then Zotero would shut down. Upon restarting, the data location would still point at ~/.zotero/zotero/jzz7ebwd.default/zotero.

    The solution was to delete the broken soft link, and creating an empty storage directory.
  • Actually, that has only fixed the problem of the sync error at startup. There is no way to make the Data Directory Location to Defaul. When you select Default and restart, it points back at the Custom option.
  • edited June 11, 2020
    Something's wrong with your setup, but just move the ~/.zotero/zotero/jzz7ebwd.default/zotero directory to ~/Zotero. When you restart Zotero, it should detect the directory in the default location.
  • edited June 11, 2020
    Only solution was to move ~/.zotero and ~/Zotero to another location (to have a backup but so that zotero cannot see them), and reinstall. But because while trying to find a solution I purged my online library to move to WebDAV storage, I have lost my attachments.
  • That was definitely not the only solution. You deleted all your files, without a backup?
  • Update: I didn't delete the old zotero directories, just moved them to another directory (Note: I updated my comment to reflect this, as originally I said I deleted them, which is what you are referring to).

    However, I don't think I can recover much. It seems that my zotero installation was using


    .zotero/zotero/jzz7ebwd.default/


    However,


    .zotero/zotero/jzz7ebwd.default/zotero/storage


    was a broken soft link pointing to a directory that no longer exists (I must have deleted it when upgrading Ubuntu at some point in the past). I think this went on undetected because

    1) despite the storage directory being missing (i.e. softlink pointing at nothing), there was no noticeable loss of functionality. Double-clicking on a reference in the Zotero app would open an online reference or sometimes a PDF locally, I don't know how. Also, my online Zotero library, when opening with the browser, showed the acccount quite full in terms of PDFs filling the storage space. I have been adding new references, and there was no problem. I did get errors adding new PDFs from the Chrome extension, but I thought that was because my account was full. (Which is why I was now trying to migrate to WebDAV).

    2) Another reason why this went on undetected is because Zotero didn't give a plain clear error message, e.g. "storage directory missing". Instead, I got seemingly random errors when trying to export a library or the NS_ERROR_FILE_ALREADY_EXISTS when syncing.

    I do have 396 directories in the old Zotero/storage directory (the one I moved to another location). They have names like


    22U6P2RU 553SKG3C 8EDD9J8I ...


    These contain 93 PDFs, and some look recent. So maybe, somehow my zotero desktop app was operating there, even though in the Preferences configuration it said it pointed to .zotero/zotero/jzz7ebwd.default/, and that couldn't be changed as described above.

    So I assume that if I move the backup storage directories to ~/Zotero/storage, I'll have access to those PDFs, right?
  • Update: Copying the directories over seems to give access to those PDFs
  • Update: Many PDFs can be recovered by selecting items in the library, right-click and "Find available PDFs"
  • @rcasero:
    I did get errors adding new PDFs from the Chrome extension, but I thought that was because my account was full.
    Zotero is a local program, so you can save to it regardless of your online storage usage. If you get a red X, it means there's some local problem saving the files.
    2) Another reason why this went on undetected is because Zotero didn't give a plain clear error message, e.g. "storage directory missing". Instead, I got seemingly random errors when trying to export a library or the NS_ERROR_FILE_ALREADY_EXISTS when syncing.
    A symlink from 'storage' to a missing folder isn't an expected state, needless to say, so it shouldn't really be surprising that that's not handled gracefully, but we'll see if we can better detect it.
  • “A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.”, Douglas Adams :)

    Anyway, thanks for looking into it.
Sign In or Register to comment.