drewmccormack / ensembles

A synchronization framework for Core Data.
MIT License
1.63k stars 132 forks source link

Error merging: Error Domain=CDEErrorDomain Code=201 "(null)" #276

Closed jerryga closed 5 years ago

jerryga commented 5 years ago

Hello, Hello, we found that we can't sync on one of our devices. The error message is 201. Who has encountered it? Who can help?


Logs:

2018-07-27 22:21:35.457068+0800[643:41974] -[CDECloudManager importNewRemoteNonBaselineEventsWithCompletion:] line 127: Transferring new events from cloud to event store 2018-07-27 22:21:35.492701+0800[643:42452] -[CDEEventIntegrator integrate:] line 313: Integrating new events into main context 2018-07-27 22:21:35.495658+0800[643:42452] -[CDEEventIntegrator integrate:]_block_invoke line 333: Baseline has changed. Will carry out full integration of the persistent store. 2018-07-27 22:21:35.500771+0800[643:41974] Error merging: Error Domain=CDEErrorDomain Code=201 "(null)"

drewmccormack commented 5 years ago

See https://github.com/drewmccormack/ensembles/blob/master/Framework/Source/General/CDEDefines.h

Missing sync files. Can be caused by upload getting interrupted. Usually will self correct after a little while.

If you change the sync files yourself, you can cause this problem. Also restoring old data might.

Kind regards, Drew

On 27 Jul 2018, at 16:24, Asa. Ga notifications@github.com wrote:

Hello, Hello, we found that we can't sync on one of our devices. The error message is 201. Who has encountered it? Who can help?

Logs:

2018-07-27 22:21:35.457068+0800[643:41974] -[CDECloudManager importNewRemoteNonBaselineEventsWithCompletion:] line 127: Transferring new events from cloud to event store 2018-07-27 22:21:35.492701+0800[643:42452] -[CDEEventIntegrator integrate:] line 313: Integrating new events into main context 2018-07-27 22:21:35.495658+0800[643:42452] -[CDEEventIntegrator integrate:]_block_invoke line 333: Baseline has changed. Will carry out full integration of the persistent store. 2018-07-27 22:21:35.500771+0800[643:41974] Error merging: Error Domain=CDEErrorDomain Code=201 "(null)"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

jerryga commented 5 years ago

Thank you very much for your answer. However, I deleted the application, then reloading, or emptying the data, can't be synchronized, and it's always guaranteed to be wrong. It has been going on for four hours. Is there any other way to fix this error?

drewmccormack commented 5 years ago

My guess is that you have some old sync data left over that is incomplete. Best is to reset the data like this:

  1. Deleech
  2. Call the class method “removeEnsembleWithIdentifier...” to clear the data in the cloud.
  3. Wait a few minutes to let iCloud sync up
  4. Leech and sync again

Kind regards, Drew

On 27 Jul 2018, at 16:41, Asa. Ga notifications@github.com wrote:

Thank you very much for your answer. However, I deleted the application, then reloading, or emptying the data, can't be synchronized, and it's always guaranteed to be wrong. It has been going on for four hours. Is there any other way to fix this error?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jerryga commented 5 years ago

Usually will self correct after a little while.

You are right, but I really don't know why, and suddenly I can synchronize, but it took about 4 hours instead of a little while, and my code didn't change.

By the way, on the iOS10 system, can I use Ensembles1.x instead of iCloud? Quote Apple documentation: "As of macOS v10.12 and iOS 10.0; Core Data's iCloud integration feature has been deprecated. Apps will continue to work. There are no changes to or removal of the functionality in macOS 10.12 and iOS 10. Historically, deprecated symbols in Cocoa remain Only the client side Core Data iCloud API symbols are deprecated. Core Data with iCloud is built on top of the iCloud Drive service. The service pieces are not effected in any way. If and when the Deprecated APIs are disabled in some future OS version, applications running on iOS 9 or 10 will continue to work."

drewmccormack commented 5 years ago

Sometimes iCloud Drive gets jammed. It stops transferring the files. Restarting the device can help.

The simulator also often fails to upload. There is a debug menu to trigger the iCloud Drive sync.

E2 works much better, because it uses CloudKit directly.

The depreciation of CD sync has nothing to do with Ensembles. Ensembles is a separate sync engine which does not use Apple’s.

Kind regards, Drew

On 27 Jul 2018, at 17:02, Asa. Ga notifications@github.com wrote:

Usually will self correct after a little while.

You are right, but I really don't know why, and suddenly I can synchronize, but it took about 4 hours instead of a little while, and my code didn't change.

By the way, on the iOS10 system, can I use Ensembles1.x instead of iCloud? Quote Apple documentation: "As of macOS v10.12 and iOS 10.0; Core Data's iCloud integration feature has been deprecated. Apps will continue to work. There are no changes to or removal of the functionality in macOS 10.12 and iOS 10. Historically, deprecated symbols in Cocoa remain Only the client side Core Data iCloud API symbols are deprecated. Core Data with iCloud is built on top of the iCloud Drive service. The service pieces are not effected in any way. If and when the Deprecated APIs are disabled in some future OS version, applications running on iOS 9 or 10 will continue to work."

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

jerryga commented 5 years ago

E2 works much better, because it uses CloudKit directly.

OK,I got that. thank you again.