Command to attach files ceased working

In the last week or so, the command "attach stored copy of file" ceased to work.

When I use it now, it only seems to attach the file (the small triangle next to the item shows up), but no file is actually attached. When I reopen Zotero, even the small triangle is no longer there.

I can still add individual items and notes, just not attach files to them.

I use Zotero on Firefox Portable and my database is large (~105,000 items, most of them with a note and/or a file attached, total ~1 terabyte).

Thank you.
  • we'd want a debug ID that includes such an attempt as well as a report ID right after:
    https://www.zotero.org/support/debug_output
    https://www.zotero.org/support/reporting_problems#provide_a_report_id
  • Here it is:

    Debug ID: D1845233723
    Report ID: 1761282144

    Thank you.
  • Hmm, there's something weird happening here — Zotero doesn't seem to be properly getting the path of that file.

    I can't recall seeing anything like this before, so there might be something strange with Firefox Portable. The best I can suggest is to point Zotero in an official Firefox build at your existing data directory and see if it still happens with that, to determine if Firefox Portable is the issue.

    You can also try adding a file from a different location (e.g., desktop on your main hard drive), if you haven't.
  • Also, I assume this happens after you restart your computer? Can you also check your DB integrity from the Advanced → Files and Folders pane of the Zotero preferences?
  • Thanks.

    I tried installing Zotero Standalone on the desktop, pointing it at the database on the external hard disk, and the same problem continues.

    The problem also happens no matter the identity of the file to be attached, or its location (desktop or HD).

    It began about a week ago, for no apparent reason (I have not done anything consciously different), and continues no matter how many times I open and close Zotero, restart the computer, or change the computer.

    I had already checked the database integrity, and it is fine. I just re-checked it now.

    I also continue to use Zotero normally, adding new items and notes, opening previously uploaded files, etc. It’s just the attaching new files that’s become impossible.
  • Does this happen in a new database? To test, you'd want to temporarily disable auto-sync in Zotero and then point its data directory to a temporary folder on your desktop from the Advanced → Files and Folders pane of the Zotero preferences.
  • edited April 4, 2016
    Yes, changing the database solved the problem. I switched to an empty folder on the desktop, then added the same file I used for the debug ID above. It worked.

    Going back to the the old database, the problem returned.

    What does this mean?

    Also, I don't use auto-sync anyway.
  • Sorry, are you still having a look at this, or is the problem unsolvable?
  • Sorry for the delay in getting back to you.

    I believe this is fixed in the latest 4.0 Beta. Can you try that and let me know? The beta shouldn't cause any problems, but just to be safe, make sure you have a backup of your Zotero data directory before installing it. You can switch back to the official version when 4.0.29.7 comes out, which should be within a few days.

    (If you have items in the trash, you can also probably fix this temporarily by emptying the trash and restarting Firefox. Basically this can happen in extremely large databases that haven't seen a lot of items being deleted.)
  • edited April 7, 2016
    Thank you! I just wanted to be sure the question was still open, as I imagine you have plenty of other things to do.

    If 4.0.29.7 comes out "within a few days", I think I'll rather wait for it instead of trying the beta. That's because making a backup of the full database at this moment would take me quite a while anyway. I'm in the interior of Ethiopia and HDs over 1 TB in size are not easy to get in here!

    Just FYI, I don't have anything in the trash. I usually empty it after every work session, so I never acumulate too many things in it.
  • Zotero 4.0.29.7 is out now for Firefox with this fix. (A Standalone version will come soon.)
  • I installed the update and... the problem continues.

    Just as before. The error report is precisely the same.
  • Can you provide another Debug ID from the new version? The cause may be different than I thought.
  • The new Debug ID is D980859530.

    Thank you.
  • How many folders are there underneath 'storage' in your Zotero data directory? Are you able to create a new folder manually?

    Zotero is getting an NS_ERROR_FILE_ALREADY_EXISTS error when trying to create a directory for the attachment under 'storage', with this code:

    if (!dir.exists()) {
    dir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0755);
    }

    This error shouldn't be possible, because it should only try to create a directory if one doesn't exist. So this means that Zotero is getting false information about either 1) the directory not existing or 2) the directory already existing.

    My first guess would be security software on your system, so if you're running any, try temporarily disabling it. But given the size of your library, I wouldn't be surprised if this was also due to having too many files (folders) in a given directory ('storage'), so knowing the exact number would be helpful.
  • I have 65,534 folders underneath 'storage'.

    I tried to create a new folder manually, and it didn't work. I got the following error message:

    "An unexpected error is keeping you from creating the folder. If you continue to receive this error, you can use the error code to search for help with this problem. Error 0x80070052: The directory or file cannot be created".

    I'm not running security software in the computer I'm currently using Zotero with.

    Thank you.
  • OK, yes, that would do it. 65536 is 2^16, so it's a common limit in computing, and this is a limitation with old Windows filesystems (FAT32). The fix would be to delete some attachments or to upgrade the filesystem to NTFS.
  • edited June 6, 2016
    Thank you! I'll try converting the filesystem.
Sign In or Register to comment.