[bug] Manage Attachments/Rename sometimes fails to rename

edited 10 days ago
Hello. I've submitted debug output D1105381710 concerning a bug on a fully updated Windows 10 and Zotero 5.0.97-beta.33+fdcd4e51c and ZotFile 5.0.16, which is that Manage Attachments/Rename sometimes fails to rename. The bug happens rarely, perhaps 1 out of 50 or more documents. It also happens consistently: a file which fails won't ever be able to be renamed no matter what (restart, etc.). The pdf files in question are NOT in use by other programs. The ZotFile notifications stays forever on screen with the filename grayed out, but other files can be renamed afterwards. I haven't found a clear trigger on item titles, authors or other used fields that might generate the bug. Eg I can rename other items in the same collection by the exact same set of authors and no weird characters in use, other than those of the latin1 set.
  • You'd want to open an issue for that on the ZotFile GitHub page (but note that the developer isn't actively maintaining ZotFile, so I wouldn't expect a fix anytime soon).

    This is the error you're getting:
    TypeError: this is undefined
    OSError@resource://gre/modules/osfile/osfile_shared_allthreads.jsm:1262:3
    OSError@resource://gre/modules/osfile/osfile_win_allthreads.jsm:87:3
  • a file which fails won't ever be able to be renamed no matter what (restart, etc.)
    @safonso: If you select such a failing PDF attachment and hit the Enter key, does the file open properly? Or do you get the "Locate" dialog?

    If the attachment is not broken, it would be interesting to see if there is something in the metadata that is causing the issue. Select the attachment and run
    var items = Zotero.getActiveZoteroPane().getSelectedItems(); items[0];
    in "Tools" -> "Developer" -> "Run JavaScript", then repeat this for the parent item. Copy the results to a text file for reference.

    You could then try to identify problematic entries or share the results here. Check if renaming works if you move the attachment to a different parent item. If the attachment has a "Contents" note, you could see if deleting the table of contents resolves the issue.

    See here for similar error reports:
    https://forums.zotero.org/discussion/82760/zotfile-cant-move-over-200-pdfs-to-custom-file
    https://forums.zotero.org/discussion/comment/321864/#Comment_321864
Sign In or Register to comment.