File sync stopped properly working in latest iOS beta app

More precisely, I'm talking about WebDAV sync and it works one way only. If an item with PDF is saved via the iOS app it does not download to the desktop Zotero. Double clicking results in the File not found error message, similarly to when one device saves to Zotero and the other one to WebDAV.
However, when I fix the issue in the desktop app by removing and re-adding the file it syncs to the iOS app without any issue. This suggests that the basic problem is not the iOS app syncing files to the Zotero server. Also, any PDF file which is on the WebDAV server can be downloaded on both systems. The following screenshot was made after a successfully finished sync: https://u.pcloud.link/publink/show?code=XZE8PAXZLAHGkwPkdDYPriL2K61vlYxSOUIV
  • Assuming you don't see files for the attachment in question on the WebDAV server (Files Not Syncing explains how to check), we'd want to see a Debug ID from the iOS app for saving a file and having it not upload correctly.
  • Interestingly, 7 items saved on the iPad synced just fine then I got another one unavailable on desktop.
    Debug ID: D1546840224
    Zotero desktop file open error message screenshot: https://u.pcloud.link/publink/show?code=XZxbKAXZI0NE87sJrMVJ5zzjxFJ8a8Rm8KM7
    iPad Zotero screenshot: https://u.pcloud.link/publink/show?code=XZIhKAXZVhmLUgGVY2b3eHWQlH1bDFnu4nhX
  • @erdoke thanks for sharing the debug id. Logs don't indicate any issues with the upload. Could you please check whether files "7UDX6HCR.zip" and "7UDX6HCR.prop" can be found in your pcloud account in zotero folder?
  • I manually fixed that problem soon after reporting, but have recorded several since:

    D766597084
    VRFIX5QT is not created on the WebDAV in the Zotero folder.

    D346596513
    J2GPZW7U is not created on the WebDAV in the Zotero folder.

    D380957402
    4CEV4UHI is not created on the WebDAV in the Zotero folder.

    WebDAV\Zotero screenshot https://u.pcloud.link/publink/show?code=XZwKIAXZePso3PsbJxzT5r9BqM4qLVDcRHNk
  • @erdoke are ".prop" files missing too or just ".zip" files?
  • @michalrentka
    Nothing with the mentioned file names was created on the WebDAV\Zotero
    See also screenshot in my previous comment.
  • @erdoke I'm having hard time with this. Logs clearly state that at least the ".prop" files were successfully uploaded and server responded with appropriate message. Are you sure you're logged to the same pCloud account on iOS and on web?

    Also there are some 0b files in your screenshot. Were those created by iOS app?
  • @michalrentka
    Yes, sync works perfectly the other direction, i.e. when saving on the desktop (latest beta Zotero). I only have this problem when saving papers with the iOS app on my iPad. Also, not all items turn out to be missing when saved on the iPad, so it’s not a general problem. I failed to recognize a pattern though.

    I can try to save a few items on my iPhone in an attempt to replicate the problem on another device if that helps.
  • The logs show a 201 Created response from the server, which pretty much puts this out of our hands, but the last remaining thing we could look at here, just for a clear comparison, would be two pairs of Debug IDs:

    1) From iOS and desktop while saving on iOS and trying unsuccessfully to open on desktop

    2) From desktop and iOS while saving on desktop and opening successfully on iOS

    In both cases, start the debug output on both devices at the same time, perform the full process, and then submit both.
  • I had the same problem: when I export a pdf to Zotero iOS beta, it appears on the iPad but the file is missing on Zotero desktop. My sync settings use Box as WebDAV. I think the problem could be the pdf export (from one app to Zotero) on iPad, since that is not possible on Zotero desktop (at least I do not have Zotero in my sharing options). It seems that the export action adds a pdf only locally on Zotero iOS and it does not upload the pdf through WebDAV.
    My debug output is D1680932420.
  • edited December 15, 2021
    ZShare(+0000000): WebDavController: 5S7JFKEI item prop file not found
    ZShare(+0000000): WebDavController: ZIP file for upload
    ZShare(+0000036): ExtensionStore: upload authorized
    ZShare(+0000006): State: done

    (+0020048): WebDavController: finish successful upload

    (+0000000): WebDavController: upload metadata for 5S7JFKEI

    (+0000001): HTTP PUT https://dav.box.com/dav/zotero/5S7JFKEI.prop

    (+0000000): Data: 110 bytes

    (+0001607): HTTP PUT https://dav.box.com/dav/zotero/5S7JFKEI.prop succeeded with 201
    @liannelli: You're saying you don't see 5S7JFKEI.zip or 5S7JFKEI.prop on the WebDAV server?

    The method you use to add the file to the Zotero app shouldn't be relevant here, because it's actually getting a 201 Created from the WebDAV server, meaning something is supposedly being uploaded and accepted by the server.

    To debug this, we'd need the pair of Debug IDs I ask for above.
  • @dstillman I cannot see any 5S7JFKEI.zip file but I found a 5S7JFKEI.prop file in the trash. I also verified that as soon as my desktop Zotero syncs and find a new item in the library, a corresponding .prop file (no .zip) is created on the WebDAV server but soon it is deleted (it appears in trash with the same time of the creation).

    I tried again the following:

    1. on Zotero iOS I export the annotated pdf from an app (LiquidText) to Zotero (that asks in which section to put the pdf). Zotero Desktop syncs and realizes that a new item is in the library. It is in the right section but as soon as I open the pdf, Zotero is not able to find it (and it seems to look at the local storage folder rather than at the WebDAV server).

    Debug IDs are the following:
    Desktop ID: D1615960069
    iOS ID: D198473883

    2. on Zotero Desktop, since there is no export extension available (I cannot export the pdf to Zotero from an other app as I can on iOS) I create a new item in a specific section of the library. Then I attach the annotated pdf file that was on the local disk.
    Zotero iOS realizes that there is a new item and it syncs correctly and the pdf is opened without any problem.

    Debug IDs are the following:
    Desktop ID: D241634849
    iOS ID: D621014998

  • edited December 27, 2021
    I apologize for the delay, and I still haven’t been able to carry out the tests as suggested above.
    However, the problem might be communication related between the iOS Zotero app and the Zotero server. I regularly get API connection errors and this may also prevent proper saving of files. Debug ID: D1420253772

    Another hint that the issue is Zotero app specific is that saving via PaperShip works 100 % of the time. One can easily tell which entries were saved via Zotero and which with PaperShip by just looking at the generated PDF file names: https://u.pcloud.link/publink/show?code=XZPTxaXZvhvBpiCc0KjcS5gzjegVnkOj6QEX
    There are 3 items saved via Zotero and 3 via PaperShip out of the last 7 in the screenshot, and PaperShip worked 3/3 while Zotero 0/3. It doesn’t appear as a WebDAV server issue. (The very last item was saved via Zotero desktop.)
  • edited December 27, 2021
    I forgot to mention that this server communication issue affects the Safari extension as well. Often “Loading collections” is stuck forever.
    I use a system wide DNS based filter (AdGuard), although its involvement sounds unlikely, given that PaperShip can save all entries to Zotero and all files to the WebDAV server without any issue.
  • @erdoke: This is now a different, unrelated error.
    (+0001839): HTTP PUT https://webdav.pcloud.com/zotero/3VLCJVUW.zip succeeded with 204

    (+0000000): WebDavController: finish successful upload

    (+0000000): WebDavController: upload metadata for 3VLCJVUW

    (+0000321): HTTP PUT https://webdav.pcloud.com/zotero/3VLCJVUW.prop succeeded with 201

    (+0000002): UploadAttachmentSyncAction: submit mtime and md5

    (+0000002): HTTP POST https://api.zotero.org/users/2888205/items

    (+0000000): [{"md5":"<null>","key":"3VLCJVUW","dateAdded":"2021-12-24T19:19:41Z","version":53832,"dateModified":"2021-12-24T19:19:41Z"}]

    (+0000158): HTTP POST https://api.zotero.org/users/2888205/items succeeded with 200
    [ERROR] Zotero(+0000007): SubmitUpdateSyncAction: unknown failures - [Zotero.FailedUpdateResponse(key: nil, code: 400, message: "\'&lt;null&gt;\' is not a valid MD5 hash")]
    [ERROR] Zotero(+0000000): UploadAttachmentSyncAction: could not upload - submitUpdateFailures("\'&lt;null&gt;\' is not a valid MD5 hash")

    Do you know whether you updated to the latest app version before or after you saved these files? You have several files that were definitely saved incorrectly, but the most recent is from 12/25. Can you reproduce this with a newly saved item? If so, can you provide a Debug ID for the save?
  • edited December 27, 2021
    Yes, I just corrected (deleted and re-added) several PDFs in the desktop app earlier this morning. Latest Zotero iOS as well as desktop betas.
    I mean the issue was present both before and after updating the app in TestFlight.
    Debugging was not active when getting this, but it’s very likely related: https://u.pcloud.link/publink/show?code=XZW1waXZyMTwXcbAX50bybcwoY9s6QE4GeK7
    Will try to catch an upload error with Debug on and share.
  • edited December 27, 2021
    D795862931
    I hope this report captured the problem. The in-app error message claimed that there were sync issues with 18 files?
    The last 4 iPad saved items again contain no valid PDFs when trying to access on the desktop.
    Another one following the failed API response/request timed out error message, this time right after app restart: D315606442
  • The Debug ID should be for saving in Safari, not syncing in the Zotero app. Start debug output logging, switch to Safari, and save, and then switch back to the app and submit the output.
  • I think I caught one. What’s more, there’s also an error message on the desktop.
    First, the iOS debug: D1807591404
    The desktop: 1377550587
  • Did you have access to the PDF on that page? Was the PDF saved locally in the iOS app, or do you get an error trying to open it there?
  • It’s an open access journal and yes, everything seems normal in the iOS app, I can open the PDF.
    However, the Sync failed (Failed API response) as well as the very slow or failed loading of collections in Safari is rampant now. I still suspect that it’s linked to a communication error with the Zotero and not the WebDAV server.
  • No, the Zotero servers aren't involved here, other than to reject invalid data. There's a problem with the handling of the file in the iOS app. We'll investigate.

    Does this happen from any site, or just from that one?
  • It happens from almost all journal sites.
    I’m on iOS 15.3 beta now, but no difference is noticeable between OS versions, the behavior was the same when on 15.2 final.
    If you recall it I recently reinstalled the app. I can give it another go if necessary. (It would be great to include a batch PDF download option for collections and/or for filtered lists for quick restoration of previous state. That’s the biggest pain of deleting and reinstalling.)
  • edited December 27, 2021
    It seems that this issue affects my iPhone as well. Just saved a paper on the phone
    D2122321945
    Corresponding desktop report ID: 182067952
    Desktop error may be related to the latest beta, it was updated earlier today. I hadn't seen the sync error before that.

    What’s different on the phone is that there are no Failed API responses and the Safari extension loads collections instantly vs. the lag/loading failure on the iPad.
  • @dstillman did you check my debug logs?
    Thanks.
  • @liannelli: Are you still seeing the issue in 175? If so, can you provide another Debug ID from the app? (No need for one from the desktop.)
  • Now it works, version 175 seems having solved the problem. I can modify the pdf and import to Zotero. Very nice!!
Sign In or Register to comment.