Previous 1 2 3 Next 39 Replies Latest reply: Nov 17, 2014 4:40 PM by Robertab8 Go to original post
  • Semrys Level 1 Level 1

    Im also getting the same problem.


    Ive tried deleting passwords through keychain, force stopping Caldav processes in Activities, and deleting and reinstalling Calendar accounts.


    Im on 10.8 and using delegates (8).


    Here's what I get:

    8/13/12 5:01:17.479 PM CalendarAgent[59836]: [] [Account refresh failed with error: Error Domain=CoreDAVHTTPStatusErrorDomain Code=401 "The operation couldn’t be completed. (CoreDAVHTTPStatusErrorDomain error 401.)" UserInfo=0x7fe89606d290 {AccountName=Google, CalDAVErrFromRefresh=YES, CoreDAVHTTPHeaders=<CFBasicHash 0x7fe8938b9e40 [0x7fff78720190]>{type = immutable dict, count = 10,

    entries =>

              0 : Case Insensitive Key: X-Content-Type-Options = <CFString 0x7fe893895e80 [0x7fff78720190]>{contents = "nosniff"}

              1 : Case Insensitive Key: Content-Type = <CFString 0x7fe893895c80 [0x7fff78720190]>{contents = "text/html; charset=UTF-8"}

              2 : Case Insensitive Key: Server = <CFString 0x7fe8938d3310 [0x7fff78720190]>{contents = "GSE"}

              3 : Case Insensitive Key: Transfer-Encoding = <CFString 0x7fff78b9c6b8 [0x7fff78720190]>{contents = "Identity"}

              6 : Case Insensitive Key: Date = <CFString 0x7fe8938e4080 [0x7fff78720190]>{contents = "Mon, 13 Aug 2012 16:01:17 GMT"}

              7 : Case Insensitive Key: X-Frame-Options = <CFString 0x7fe8938c17c0 [0x7fff78720190]>{contents = "SAMEORIGIN"}

              8 : Case Insensitive Key: X-XSS-Protection = <CFString 0x7fe896016b70 [0x7fff78720190]>{contents = "1; mode=block"}

              9 : Case Insensitive Key: Www-Authenticate = <CFString 0x7fe8938e0630 [0x7fff78720190]>{contents = "BASIC realm="Google CalDAV""}

              11 : Case Insensitive Key: Cache-Control = <CFString 0x7fe8938f1c60 [0x7fff78720190]>{contents = "private, max-age=0"}

              12 : Case Insensitive Key: Expires = <CFString 0x7fe896002560 [0x7fff78720190]>{contents = "Mon, 13 Aug 2012 16:01:17 GMT"}



  • ibid Level 1 Level 1

    I'm seeing these same errors and not using Google calendar. I am connecting to a Zimbra calendar server using CalDAV from my Mac Book Pro which is running Mountain Lion.

  • alex349 Level 3 Level 3

    I may just have figured out a fairly complicated way to fix this issue, or at least glean some insight into the problem (as in the course of this writing the problem came back for me). I'll try to explain it in simple terms here, but please ask questions if you don't follow me (and know that I'm writing this after just minutes of not seeing the dreaded password prompt.



    Thinking of this possible fix started with first seeing the syncing work with the trial versions of BusyCal and BusySync… So it is not directly an issue with CalDAV on the Google end, and might well be Calendar specific (maybe not OS X Calendar specific if iOS Calendar shares the bug).



    Then I paid close attention to the first part of the log entries most of us have posted: “8/12/12 4:58:21.263 PM CalendarAgent[431]:”, specifically “CalendarAgent”. The process that actually does the syncing with Google Calendar is not Calendar directly, but Apple’s system-level background process CalendarAgent. CalendarAgent is located (as found using Activity Monitor in /Applications/Utilities) in /System/Library/PrivateFrameworks/CalendarAgent.framework/Executables.



    Then, where does the system (supposedly, given these issue…) store the account passwords? In the keychain, which we can view and edit using Keychain Access (in /Applications/Utilities).



    I just did two things that (for more than one functional sync at least) eradicated the password prompts. It may be worth trying if you’ve had these issues, it may work more permanently for you, or at least give you ideas for future attempts at fixing the problem and further insight into the issue. I made two changes to every Google-related keychain item in my login keychain:

    1. If the stored password was my old password I updated it to my current/new password.

    2. Added CalendarAgent as a process that can access the password under the Access Control tab of the keychain item editor



    That’s all I did, and at least for a bit it appeared that I had fixed the issue. I suggest you try this and see if it fixes the problem for you. If not then at least this write-up furthers our documenting of this issue even if it doesn’t resolve it.



    Also, anyone and not just registered developers can log in at and submit bug reports. I think as many of you who are willing ought to at this point regarding this problem.

  • alex349 Level 3 Level 3

    I just submitted a bug report to Apple. Bug ID# 12092315

  • emarmite Level 1 Level 1

    Thanks for taking the time to write this up, it sounds like the kind of thing it could be. Let's hope it's a fix included in the next software update.

  • Semrys Level 1 Level 1

    I tried changing the passwords under Keychain, as well as adding Calendar Agent as a permitted process, but still the same problem

  • MacsBaine Level 1 Level 1

    Having the same problem. Spent an hour at the Genius Bar, this really appears to be an issue on Googles server side. This is getting tiresome.

  • Semrys Level 1 Level 1

    Although intermittent, authorising Calendar Agent through KeyChain access (I had to go through System/Library Framework etc) seems to have made it happen less frequently....    

  • edlsoccer Level 1 Level 1

    How do you give Calendar Agent access to KeyChain?

  • Semrys Level 1 Level 1

    In KeyChain select permission rights, then navigate to calendar agent and select it: System/Library/PrivateFrameworks/CalendarAgent Framework/Calendar Agent    

  • LCohen Level 1 Level 1
    Mac OS X

    This is a Mountain Lion issue.  My Macbook Pro, which still has Snow Leopard, doesn't exhibit this problem.

  • Dano22 Level 1 Level 1

    Screen Shot 2012-08-15 at 10.37.49 PM.pngIn MT. Lion I don't see permission rights in KeyChain...This is what I see...


  • Semrys Level 1 Level 1

    Ah. You need to search for the CalDav keychains - search for DAV or or Caldav. You should then have two google related items in the finder pane - and it should indicate that they are for calendar use. Good instructions for this stage are here:


    Except you dont delete the keychain - but rather select it and and then when you have found the keychain double click, select Access Control, select + to add a new application, and then navigate to the Calendare Agent.


    Good's still working for me - though it does still ask for a password intermittently, but not as bad as it was before.     

  • warrenkerrigan Level 1 Level 1

    I think I may have found quite a simple solution.


    Here is what I did, and for now it seems to be working.


    1. Open iCal and wait for the password prompt.
    2. Generate an appliaction specific password on Google (assuming you are using two token authentication)
    3. Put the password into iCal and press ok. Leave iCal open.
    4. Then go to System Preferences, Mail, Contacts and Calendars
    5. Select the same account in the left hand bar, then select Details
    6. Paste the same password there as you just did in iCal.


    That seems to now work perfectly for Mail and Calendar.


    If it stops working, I will update the thread again.



    P.S.  I assume it works for normal passwords in the same way.

  • warrenkerrigan Level 1 Level 1

    OK, I'm afraid that didn't work. The problem has returned!