-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Share extension causing updates to be skipped? #882
Comments
Couldn't recreate such a scenario so far. During sharing, sync happens always before advancing any versions. We can ask the users to describe how they use the share extension, to understand if there is an edge case we haven't covered, |
And that's the case even if the app is force-quit? |
Did you try with 1.0.24? |
Oh, wait, 1.0.24 is from November, not February. Maybe this is an old bug that we fixed, and these people were using outdated versions? |
It shouldn't matter, as the share extension itself will sync any changes in the local database. |
Well, it looks like the share extension just uploads new items without passing If-Unmodified-Since-Version (so presumably with But I figured it out. It's the file upload request. When there's a file, the version number gets advanced and the app misses remote updates.
|
Along with fixing this, we'd ideally trigger a "full sync" on upgrade — i.e., a sync that checks the versions of all objects in the online library and compares to the local versions, and then downloads updates. (It would also look for local changes that were missing remotely, but that wouldn't matter here.) I can't remember if we ever implemented code to do that on iOS. |
I found out why my first tests didn't produce the error. I saved a science direct article, which always resulted to the "ExtensionViewModel: upload authorized" case, that doesn't cause the issue. When I saved the article you suggested @dstillman, it followed the alternate case "ExtensionViewModel: file exists remotely", that indeed saves the items version, overlooking the unfetched changes. Removing that, resolves this issue. |
We previously ran a full sync on startup — seemingly to fix an extremely similar bug — but it looks like that was done as a one-off. If that's still what's in place, we should instead use a counter there that we can increment when this needs to be done, and then have it run now for upgraders. |
This looks a lot like the share extension is advancing the library version without actually downloading objects.
The text was updated successfully, but these errors were encountered: