Skip to content

Errors not passed to ZSyncDelegate #13

@MrRooni

Description

@MrRooni

I cleared out all the registered sync clients and the schema using Syncrospector. I then fired up the ZSyncDaemon and a fresh copy of the iPhone app. My computer showed up in the list, but when I attempted to sync I got the following (expected) error at the command line of the iPhone app:
2010-04-07 10:08:54.676 MoneyWell[28988:207] zSyncNoServerPaired:
2010-04-07 10:08:54.678 MoneyWell[28988:207] ZSyncService GumpBookPro
2010-04-07 10:08:56.960 MoneyWell[28988:207] -[ZSyncTouchHandler connectionDidOpen:] entered
2010-04-07 10:08:56.962 MoneyWell[28988:207] -[ZSyncTouchHandler connectionDidOpen:] initial send complete
2010-04-07 10:09:00.229 MoneyWell[28988:207] -[ZSyncTouchHandler connection:receivedResponse:] entered
{

"Error-Code" = 501;
"Error-Domain" = BLIP;
NSLocalizedDescription = "[NOTE: this exception originated in the server.]\nfailed to register client because: client named 4A74A770-8144-48FD-8141-5F1CD56A04F6-28988-0001BCC14D1FF439 wants to sync unrecognized entity named: com.nothirst.MoneyWell.BucketBalance";
} 2010-04-07 10:09:00.229 MoneyWell[28988:207] -[ZSyncTouchHandler connection:receivedResponse:] received empty response, ignoring

The trouble is that the ZSyncDelegate method - (void)zSync:(ZSyncTouchHandler)handler errorOccurred:(NSError)error was never called so the UI just hung out waiting for a response that would never come.


I found another case of errors not being passed to the iPhone: During a sync attempt I had conflicts. In the sync conflict resolution window on my Mac I clicked "Sync Later". The daemon threw an error but the iPhone never saw it.
Here's the log from the ZSyncDaemon:
2010-05-17 11:19:58.334 ZSyncDaemon[15243:a0f] -[ZSyncConnectionDelegate connection:receivedRequest:] entered
2010-05-17 11:19:58.335 ZSyncDaemon[15243:a0f] -[ZSyncConnectionDelegate registerSyncClient:] clientID A1B6EBFA-1C29-4E3C-A0C0-D4A3947F01B9-13741-0000EF282DB05186
2010-05-17 11:19:58.343 ZSyncDaemon[15243:a0f] -[ZSyncConnectionDelegate registerSyncClient:] client already registered: MoneyWell for iPhone: iPhone Simulator
2010-05-17 11:19:58.349 ZSyncDaemon[15243:a0f] -[ZSyncConnectionDelegate connection:receivedRequest:] entered
2010-05-17 11:19:58.364 ZSyncDaemon[15243:a0f] -[PairingCodeWindowController windowDidLoad] fired
2010-05-17 11:20:03.383 ZSyncDaemon[15243:a0f] -[PairingCodeWindowController windowDidBecomeKey:] fired
2010-05-17 11:20:08.086 ZSyncDaemon[15243:a0f] -[PairingCodeWindowController dealloc] window released cleanly
2010-05-17 11:20:08.189 ZSyncDaemon[15243:a0f] -[ZSyncConnectionDelegate connection:receivedRequest:] entered
2010-05-17 11:20:08.190 ZSyncDaemon[15243:a0f] -[ZSyncConnectionDelegate addPersistentStore:] request length: 0
2010-05-17 11:20:08.221 ZSyncDaemon[15243:a0f] -[ZSyncConnectionDelegate connection:receivedRequest:] entered
2010-05-17 11:20:08.320 ZSyncDaemon[15243:a0f] -[ZSyncConnectionDelegate persistentStoreCoordinator:willPushChangesInSyncSession:] entered
2010-05-17 11:20:08.350 ZSyncDaemon[15243:a0f] -[ZSyncConnectionDelegate persistentStoreCoordinator:didPushChangesInSyncSession:] entered
2010-05-17 11:20:30.670 ZSyncDaemon[15243:a0f] [110490] |ISyncSession|Warning| A1B6EBFA-1C29-4E3C-A0C0-D4A3947F01B9-13741-0000EF282DB05186: transitioning to cancel - session cancelled by server: SyncServer failed to merge the changes from some clients: ISyncSessionCancelledException session cancelled
2010-05-17 11:20:30.672 ZSyncDaemon[15243:a0f] -[ZSyncConnectionDelegate persistentStoreCoordinator:didCancelSyncSession:error:] entered
2010-05-17 11:20:30.675 ZSyncDaemon[15243:a0f] [110490] |CoreDataSync|Error| Failed to synchronize with error: (null)
2010-05-17 11:20:30.676 ZSyncDaemon[15243:a0f] *** Assertion failure in -ZSyncConnectionDelegate performSync, /Users/feymp/Development/NoThirst/MoneyWell/ZSyncDaemon/../ZSync/DesktopCode/ZSyncConnectionDelegate.m:163
2010-05-17 11:20:30.702 ZSyncDaemon[15243:a0f] Error starting sync session: (null)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions