Serious Problem with the Zotero App on iPad (PDF File Disappeared)

I downloaded a PDF file from the internet, clicked 'Share', selected 'Zotero', and then placed it in the corresponding folder in 'My Library'. Afterwards, when I clicked 'Create Parent Item' for this PDF file and then clicked 'Cancel', the problem occurred: the PDF file disappeared in Zotero on my iPad.

Furthermore, I opened Zotero on my computer. After the automatic synchronization finished, I found that the PDF file had also disappeared (it contained my notes and annotations). I had checked the Trash and used the search function, but couldn't find it.

I'd like to know why this strange problem happened and how I can retrieve the original notes and other related data.
  • Afterwards, when I clicked 'Create Parent Item' for this PDF file and then clicked 'Cancel', the problem occurred: the PDF file disappeared in Zotero on my iPad.
    I can reproduce this, but this doesn't affect other devices. The attachment disappears from the iPad due to a bug, but it's not actually deleted, and since Zotero only ever syncs explicit deletions, it's still available on other devices. Making any change to the attachment elsewhere — e.g., adding it temporarily to a collection — will cause the iPad to redownload it and show it again.
    After the automatic synchronization finished, I found that the PDF file had also disappeared (it contained my notes and annotations).
    Meaning the PDF file couldn't be opened, or the attachment item itself was missing?

    And are you saying you annotated the file at some point in there? On which device?

    What was the file called? (If you don't want to share publicly, you can email to support@zotero.org with a link to this thread, but we'll respond here.)
  • 1. Only one PDF file was involved, and there was no parent item or other related items. When I opened Zotero on my computer and waited for it to finish synchronizing, the entire PDF file disappeared. I couldn't locate the item anywhere. It's not that I could see the item but couldn't open it.

    2. I made some annotations in the PDF (all of which were done on the computer) before performing the series of actions that led to this issue (clicking 'Create Parent Item', then clicking 'Cancel', and checking the computer app for the file after noticing it disappeared on the iPad).

    3. The filename is 'CV.pdf'.
  • OK, I can reproduce that. It doesn't happen if you quickly tap Cancel, but if you wait a second or two and then tap Cancel, the attachment is deleted.

    Basically, the iOS app is creating the parent item and moving the attachment under it as soon as Create Parent Item is triggered. Within a few seconds, it syncs that change to the online library. If you then tap Cancel, it deletes the parent item (which automatically deletes the child item), and then syncs the deletion of the parent item. Since the child attachment was already moved under the parent item in the online library, deleting the parent item deletes the attachment.

    If you tap Cancel before the parent item is initially uploaded (as I must have been doing above), only the parent item is deleted, not the attachment.

    The app shouldn't be creating the parent item at all until Save is pressed. We'll fix that, which will fix this bug.

    Depending on when you made the annotations, you may be able to restore them from one of your automatic backups. You should look at the timestamps of all the zotero.sqlite .bak files within your Zotero data directory, and if one is from before this happened but after you would've made these notes and annotations, make an immediate copy of it. You can then follow the linked steps to load the backup with auto-sync temporarily disabled. The actual file will be missing, so you won't be able to open the PDF in the reader, but you can either point Zotero to the file if you still have a copy of it somewhere to copy it back in, or I can give you some code to run to at least extract the notes and annotations.

    Sorry about this, and thanks for reporting it.
  • No worries. Thank you for your clear explanation!
Sign In or Register to comment.