Using iCloud Core Data Syncing Extremely Slowly

Originator:aleksey
Number:rdar://11188629 Date Originated:4/4/2012
Status:Open Resolved:
Product:iOS Product Version:5.1
Classification: Reproducible:YES
 
Summary:

Syncing Core Data between two devices using iCloud is extremely slow and appears to be associated with numerous errors.

Steps to Reproduce:

Run the enclosed test project (also found at https://github.com/alekseyn/iCloudStoreManager) with a provisioning file that has iCloud entitlements enabled. Run the app on two different devices simultaneously, configured to the same iCloud account. Tap the PLUS symbol to add a few lines of data. Then tap the iCloud switch to the ON position, and select "Move Data".

After 10 seconds or so, the iCloud switch will automatically be set to ON, and the data from the first device will appear. Tap the PLUS symbol on both devices now and make sure data is synchronized on both devices.

Expected Results:

Data is synchronized in less than 30 seconds.

Actual Results:

Data often takes 10 to 20 minutes to synchronize. For some reason the problem is much more common on the iPad 3.

Regression:

100% when one of the devices is the iPad 3. Much less than 100% on other devices.

Notes:

When data is changed on one device, we expect to get an NSPersistentStoreDidImportUbiquitousContentChangesNotification on the second device (typically the iPad 3). That notification does eventually arrive after 10 minutes and data is properly synced. However immediately before that notification arrives, a slew of errors are reported to the console:

+[PFUbiquityTransactionLog loadPlistAtLocation:withError:](378): CoreData: Ubiquity:  Encountered an error trying to open the log file at the location: <PFUbiquityLocation: 0x1c07f0>: /private/var/mobile/Library/Mobile Documents/AN64VUXABU~com~yodelcode~iCloudManager/Data/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/mobile.03001591-5320-59B8-B191-F1E9C1137636/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/O3tixTSneVe~lBBgd~AMTZcjfNo~05nwt~QHLhc9f7I=/13A64272-6E34-416E-BA0D-1D1BC1A22019.1.cdt
Error: Error Domain=NSCocoaErrorDomain Code=256 "The operation couldn’t be completed. (Cocoa error 256 - The item failed to download.)" UserInfo=0xde5ff60 {NSURL=file://localhost/private/var/mobile/Library/Mobile%20Documents/AN64VUXABU~com~yodelcode~iCloudManager/Data/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/mobile.03001591-5320-59B8-B191-F1E9C1137636/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/O3tixTSneVe~lBBgd~AMTZcjfNo~05nwt~QHLhc9f7I=/13A64272-6E34-416E-BA0D-1D1BC1A22019.1.cdt, NSDescription=The item failed to download.}

-[PFUbiquityTransactionLog loadComparisonMetadataWithError:](244): CoreData: Ubiquity:  Error encountered while trying to load the comparison metadata for transaction log: <PFUbiquityTransactionLog: 0xde8b960>
	transactionLogLocation: <PFUbiquityLocation: 0x1c07f0>: /private/var/mobile/Library/Mobile Documents/AN64VUXABU~com~yodelcode~iCloudManager/Data/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/mobile.03001591-5320-59B8-B191-F1E9C1137636/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/O3tixTSneVe~lBBgd~AMTZcjfNo~05nwt~QHLhc9f7I=/13A64272-6E34-416E-BA0D-1D1BC1A22019.1.cdt
	transactionNumber: (null)

Error: Error Domain=NSCocoaErrorDomain Code=134302 "The operation couldn’t be completed. (Cocoa error 134302.)" UserInfo=0x1b71f0 {reason=Error during property list parsing during import or opening of log file at location: <PFUbiquityLocation: 0x1c07f0>: /private/var/mobile/Library/Mobile Documents/AN64VUXABU~com~yodelcode~iCloudManager/Data/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/mobile.03001591-5320-59B8-B191-F1E9C1137636/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/O3tixTSneVe~lBBgd~AMTZcjfNo~05nwt~QHLhc9f7I=/13A64272-6E34-416E-BA0D-1D1BC1A22019.1.cdt, error: Error Domain=NSCocoaErrorDomain Code=256 "The operation couldn’t be completed. (Cocoa error 256 - The item failed to download.)" UserInfo=0xde5ff60 {NSURL=file://localhost/private/var/mobile/Library/Mobile%20Documents/AN64VUXABU~com~yodelcode~iCloudManager/Data/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/mobile.03001591-5320-59B8-B191-F1E9C1137636/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/O3tixTSneVe~lBBgd~AMTZcjfNo~05nwt~QHLhc9f7I=/13A64272-6E34-416E-BA0D-1D1BC1A22019.1.cdt, NSDescription=The item failed to download.}}

-[_PFUbiquityStack shouldProcessTransactionLogAtLocation:error:](928): CoreData: Ubiquity:  Couldn't open transaction log at URL: <PFUbiquityLocation: 0x1c07f0>: /private/var/mobile/Library/Mobile Documents/AN64VUXABU~com~yodelcode~iCloudManager/Data/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/mobile.03001591-5320-59B8-B191-F1E9C1137636/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/O3tixTSneVe~lBBgd~AMTZcjfNo~05nwt~QHLhc9f7I=/13A64272-6E34-416E-BA0D-1D1BC1A22019.1.cdt, error: Error Domain=NSCocoaErrorDomain Code=134302 "The operation couldn’t be completed. (Cocoa error 134302.)" UserInfo=0x1b71f0 {reason=Error during property list parsing during import or opening of log file at location: <PFUbiquityLocation: 0x1c07f0>: /private/var/mobile/Library/Mobile Documents/AN64VUXABU~com~yodelcode~iCloudManager/Data/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/mobile.03001591-5320-59B8-B191-F1E9C1137636/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/O3tixTSneVe~lBBgd~AMTZcjfNo~05nwt~QHLhc9f7I=/13A64272-6E34-416E-BA0D-1D1BC1A22019.1.cdt, error: Error Domain=NSCocoaErrorDomain Code=256 "The operation couldn’t be completed. (Cocoa error 256 - The item failed to download.)" UserInfo=0xde5ff60 {NSURL=file://localhost/private/var/mobile/Library/Mobile%20Documents/AN64VUXABU~com~yodelcode~iCloudManager/Data/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/mobile.03001591-5320-59B8-B191-F1E9C1137636/DDF2BE3E-AA99-468F-BDCB-4FEB8215D4C2/O3tixTSneVe~lBBgd~AMTZcjfNo~05nwt~QHLhc9f7I=/13A64272-6E34-416E-BA0D-1D1BC1A22019.1.cdt, NSDescription=The item failed to download.}}

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!