zotero / zotero-ios

Zotero for iOS
https://apps.apple.com/us/app/zotero/id1513554812
Other
225 stars 27 forks source link

File upload error: "Invalid ETag in If-Match header" #303

Closed dstillman closed 2 years ago

dstillman commented 3 years ago

https://forums.zotero.org/discussion/comment/384202/#Comment_384202

The headers aren't logged, so hard to know what's happening here, but it should only happen if an invalid value is passed for the ETag:

https://github.com/zotero/dataserver/blob/830cafb2ec5ac88bbdc84eb40c8873ed888961ba/controllers/ItemsController.php#L824-L827

michalrentka commented 3 years ago

I'm not quite sure how this could happen. The If-Match header is sent only when this item was synced from backend but the same item was also queued for upload. Currently on iOS app you can't edit an existing file, just delete it and create a new one. So the item which was synced from backend shouldn't be queued for upload.

I added additional logging to this request to log what's being sent when this issue happens and we'll see if we can get more info from the user.

dstillman commented 2 years ago

Another report: https://forums.zotero.org/discussion/93726/sync-error-failed-api-response-invalid-e-tag-in-if-match-header

This shows md5: "<null>", so probably also related to https://github.com/zotero/zotero-ios/issues/406?