Troubleshooting tip for advanced users

296 views
Skip to first unread message

Larry Hendricks

unread,
Mar 30, 2010, 3:15:04 PM3/30/10
to Spanning Sync
There's an Apple iCal bug that strikes a fair number of users and yet
is difficult to detect if you don't know where to look. Unfortunately,
it's impossible to diagnose or solve this problem without spending
some time in the Terminal, so this is a tip for "advanced" users only.

The symptom is this: calendar stuff just doesn't sync and/or the
conflict resolver window comes up almost every time you sync.

If you're having this symptom, try looking at your system.log in
Console (or using the tail command). Do a sync with Spanning Sync and
when the sync is finished, search the log for "multiple exceptions"
and look for an error like this one:

Mar 30 09:38:53 My-Mac-Pro iCalExternalSync[13616]:
[ICalExternalSync ]Error: Core Data save failed. Sync canceled. -
Events cannot have multiple exceptions for the same date.

If you see that error even once, then all calendar syncs are going to
silently fail. The reason is that ICalExternalSync (which is iCal's
background sync program) has detected two or more exception dates for
a repeating event which are exactly the same, and this is invalid. One
would think that it would, uhm, FIX the problem or skip over the
event, but no, it gives up and cancels the entire sync without even
letting the user know. For what it's worth: Spanning Sync DOES look
for this exact problem and will fix it on the fly, but only if the
event comes through Spanning Sync first (i.e. it originated on Google
Calendar).

Another head scratcher: why doesn't ICalExternalSync tell you the name
of this event in the log so that you can go delete it? I'm pretty sure
that's a privacy thing-- Apple doesn't want names of your calendar
events in the logs that it might be collecting for troubleshooting
purposes.

So to find out the name of this event (or events), you're going to
have to do a little work. First, turn on some extra debugging so that
ICalExternalSync will reveal the actual name of the event:

defaults write iCalExternalSync debugLevel full

Then, sync again. Syncing any software that syncs calendars will work,
including Spanning Sync.

When the sync is done, open this file:

~/Library/Logs/iCalExternalSync.log

and again search for "multiple exceptions". You should see one or more
lines that look like this:

[2010-03-30 11:27:23 -0700] Failed Event/p2042 modify validation -
Events cannot have multiple exceptions for the same date.

Aggravatingly, iCalExternalSync still doesn't tell you the name of the
event, but the "p2042" is actually a unique identifier so now do a
search on that string (yours will be slightly different, of course,
but they all seem to start with 'p'). Eventually you'll find the
entire event record:

"Event/p2042" = {
calendar = (
"LocalCalendar/p6"
);
….
summary = "Pottery class";
};

And so now you know the name of the problematic event (in this case,
"Pottery class"). Open iCal, search on the event name, and delete all
occurrences of the event. You may have to keep searching as iCal seems
to find new "versions" of the event as you go.

Do this for each "Events cannot have multiple exceptions for the same
date" log that you find in ~/Library/Logs/iCalExternalSync.log.

Now try syncing. It will probably go much smoother.

Finally, you don't want such large amounts of logging occurring on
your Mac so disable it by doing

defaults delete iCalExternalSync debugLevel

and delete ~/Library/Logs/iCalExternalSync.log .

FWIW, I reported this bug to Apple in November of 2009 but haven't
heard anything back from them. The bug # for reference is 7428565.
--
Larry Hendricks
la...@spanningsync.com
http://spanningsync.com

Reply all
Reply to author
Forward
0 new messages