0

I am working with the parent/child sync in version 7.2 of the SDK. I believe my syncs are defined correctly. I am able to pull parent/child records from the server. However, when I try and push locally created parent record only or a parent and child record to the server I get the following error:

2019-08-01 16:06:57.760247-0700 mobileApp[4783:98756] *** 
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 
'*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object 
from objects[0]'
*** First throw call stack:
(
    0   CoreFoundation                      0x00000001023c06fb __exceptionPreprocess + 331
    1   libobjc.A.dylib                     0x0000000101529ac5 objc_exception_throw + 48
    2   CoreFoundation                      0x000000010230eddc _CFThrowFormattedException + 194
    3   CoreFoundation                      0x000000010239a86d -[__NSPlaceholderArray initWithObjects:count:] + 237
    4   CoreFoundation                      0x00000001023af2a4 +[NSArray arrayWithObjects:count:] + 52
    5   SmartSync                           0x000000010149ee78 +[SFParentChildrenSyncHelper getMutableChildrenFromLocalStore:parentInfo:childrenInfo:parent:] + 392
    6   SmartSync                           0x00000001014a0b6b -[SFParentChildrenSyncUpTarget syncUpRecord:record:fieldlist:mergeMode:completionBlock:failBlock:] + 603
    7   SmartSync                           0x00000001014a088e -[SFParentChildrenSyncUpTarget syncUpRecords:records:fieldlist:mergeMode:syncSoupName:completionBlock:failBlock:] + 414
    8   SmartSync                           0x00000001014895de -[SFAdvancedSyncUpTask processSyncUpBatch:recordIds:index:batch:] + 942
    9   SmartSync                           0x0000000101489189 -[SFAdvancedSyncUpTask addToSyncUpBatchAndProcessIfNeeded:recordIds:index:record:batch:] + 345
    10  SmartSync                           0x0000000101488cdb -[SFAdvancedSyncUpTask syncUpMultipleEntries:recordIds:index:batch:] + 1403
    11  SmartSync                           0x000000010148871b -[SFAdvancedSyncUpTask syncUp:recordIds:] + 155
    12  SmartSync                           0x00000001014cec5c -[SFSyncUpTask runSync:] + 236
    13  SmartSync                           0x00000001014ca243 -[SFSyncTask run] + 115
    14  SmartSync                           0x00000001014b9b57 __46-[SFSmartSyncSyncManager runSync:updateBlock:]_block_invoke + 39
    15  libdispatch.dylib                   0x0000000103c49d7f _dispatch_call_block_and_release + 12
    16  libdispatch.dylib                   0x0000000103c4adb5 _dispatch_client_callout + 8
    17  libdispatch.dylib                   0x0000000103c52225 _dispatch_lane_serial_drain + 778
    18  libdispatch.dylib                   0x0000000103c52e9c _dispatch_lane_invoke + 425
    19  libdispatch.dylib                   0x0000000103c5cea3 _dispatch_workloop_worker_thread + 733
    20  libsystem_pthread.dylib             0x00000001040f8611 _pthread_wqthread + 421
    21  libsystem_pthread.dylib             0x00000001040f83fd start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Please let me know if you have any ideas on what I can try, or if there is some additional information I can provide. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.