You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an error in the CareKitStore: OCKCDOutcome validateForInsert() function. During synchronization, it is possible for two outcomes for the same task/taskOccurrenceIndex values where one is the previous outcome. The validation correctly handles the case where the next set is empty. However, when the validation occurs for the previous outcome, the validation will see the other outcome as a duplicate outcome.
This issue has been dogging me since version 2.x, and I finally tracked it down. The solution is to add after the guard let:
if next.count > 0 {
return
}
However, before fixing this, the context save in synchronization failing (due to the duplicate outcome) would break future synchronization attempts. The next synchronization attempt would crash because the task is missing when creating an outcome (when the task is forcibly unwrapped). As the above fixes my issue, I did not investigate further, but there seems to be an issue if the try self.context.save() fails in pullThenPush(completion:) step #5.
The text was updated successfully, but these errors were encountered:
There is an error in the
CareKitStore: OCKCDOutcome validateForInsert()
function. During synchronization, it is possible for two outcomes for the same task/taskOccurrenceIndex values where one is the previous outcome. The validation correctly handles the case where the next set is empty. However, when the validation occurs for the previous outcome, the validation will see the other outcome as a duplicate outcome.This issue has been dogging me since version 2.x, and I finally tracked it down. The solution is to add after the guard let:
However, before fixing this, the context save in synchronization failing (due to the duplicate outcome) would break future synchronization attempts. The next synchronization attempt would crash because the task is missing when creating an outcome (when the task is forcibly unwrapped). As the above fixes my issue, I did not investigate further, but there seems to be an issue if the
try self.context.save()
fails inpullThenPush(completion:)
step #5.The text was updated successfully, but these errors were encountered: