iCal: Fixing Google Calendar Console Error (CalendarAgent: AOSKit ERROR)


In the last couple of days I noticed a redundant error message appearing in my mac’s console log:
CalendarAgent: AOSKit ERROR: (-) RAF: Invalid url -- https://<username>%40gmail.com@calendar.google.com/calendar/dav/<username>%40gmail.com/

The error happens each time iCal syncs.

I found out I need to create the calDAV account from within the Calendar Application instead of system preferences or it won’t work.

This must be an OSX implementation error that forces the username to be suffixed with @gmail.com when you register a gmail account through System Preferences > Mail, Contacts & Calendars.

If you use System Preferences > Mail, Contacts & Calendars to add your gmail account, and enable Mail, Calendar & Reminders, Messages and Notes, your caldav account for calendar will be set up with a username like <username>@gmail.com, originating a caldav url like:


This is an invalid url, as google is expecting only your username and not username and domain.

If you delete your GMAIL account from Mail, Contacts & Calendar and go to Calendars > preferences > accounts and choose add an account, choosing account type calDAV  and entering only your user name (without domain), password and your calDAV URL in the below format; your account will setup correctly and no errors will appear on console log.

https://www.google.com/calendar/dav/<your username>@gmail.com/user


Furthermore, if you wish to re-enable mail, Messages and Notes, just head up to System Preferences > Mail, Contacts & Calendars, choose your recently created gmail account and enable those checkboxes.

This solved my 100+ error messages per day on console log for CalendarAgent.

If you have multiple calendars on the same account, go to https://www.google.com/calendar/syncselect and select those that you want to show on calendar.


Hope this helps whomever found out about this and want to fix it, and even those who have not yet detected this issue.

Tags: , , , ,

3 Responses to “iCal: Fixing Google Calendar Console Error (CalendarAgent: AOSKit ERROR)”

  1. CFC says:

    Doesn’t work with Google Apps. If you run a domain through Google apps, you must use username@domain

  2. intoxicated impulsive Dixie Gate says:

    whoah this blog is excellent i love studying your articles.

    Stay up the great work! You realize, many people are looking around for this info, you can help them greatly.

  3. facebook fans says:

    Good post. I ought some time to absorb your article..

Leave a Reply