Mac OS X 10.9 Mavericks Calendar + Google Sync Problems

On occasion my Calendar on Mavericks gets hosed when syncing with Google.  If I look in the console, I see errors like the following mentioning “An error exists on principal”:

6/5/14 10:05:00.337 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [iCloud]]
6/5/14 10:05:00.338 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [Time Off]]
6/5/14 10:05:00.340 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [Events]]
6/5/14 10:05:00.341 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [Launch]]
6/5/14 10:05:00.341 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [Conferences]]
6/5/14 10:05:00.342 AM Calendar[59555]: [com.apple.calendar.ui.log] [An error exists on principal: [Some Team]]

Hitting Command-R in calendar results in it sitting on Updating for some time (minutes?) and then an exclamation point appearing next to the calendars in question.  I finally found a solution to fix it until the next time it happens.  I’m not sure what the actual cause is but this can get you back up & running.

  1. Close the Calendar app.
  2. Go into System Preferences.
  3. Click on Internet Accounts.
  4. Click on the Google account (if you have multiple you may have to do this for each).
  5. Uncheck “Calendars”.
  6. Click Show All or close preferences.
  7. Open Terminal.app (Applications > Utilities)
  8. type: killall -9 CalendarAgent
  9. type exit or close the window.
  10. Go back into System Preferences and turn Calendar back on for the Google Account(s).
  11. Start up Calendar and hit command-R – everything should refresh properly.

Let me know if you have questions!