Closed mentrena closed 4 years ago
I think the fix you suggest would make sense. Is the issue easy to reproduce? Could you maybe try to add the fix and see whether it solves the problem?
I created a pull request into fix-0.7.8 branch: https://github.com/mentrena/SyncKit/pull/103 . However, it happens rarely and I don't know steps to reproduce, but it happened several times.
It seems that my issues are mostly fixed. Undo does not crash anymore (although it seems there is still some issues with it. Sometimes some changes do not go to another device after undo/redo. I am still debugging it and create an issue when I have more info). Once in awhile (last time it was yesterday) I experience quite a strange bug - after zone deletion (can't tell right now if it was manual zone deletion or by code/UI) -
FetchdatabaseChangesOperation
returns that zone as a changed zone, but when later SyncKit triesfetchZoneChanges
with that zone, it returns "zone not found" error and SyncKit is unable to fix it. It ends sync with such error and when you try syncing again - the same thing happens. Not sure how common is such weird behaviour (not existing zone returned as changed zone). I think a fix could be simple - just handling zone not found error (result.error) in the loopfor (zoneID, result) in zoneResults
the same way as it is handled during fetchdatabasechanges:self.notifyProviderForDeletedZoneIDs()
. Probably I should have created a new issue for this.