9 Replies Latest reply: May 16, 2013 3:46 PM by arielhawk
alex349 Level 3 Level 3 (635 points)

Yesterday I changed my Google password, but haven't enabled 2-step verification (though I did enable it and then disable it after seeing this issue). After updating my account password in Mail, Contacts, and Calendars preferences in System Preferences with my new main Google account password everything except Calendar has been working fine. Calendar now constantly asks for my account password in a dialog that states "Calendar can't connect to the Google account "__"; "Enter the password for user "__". After entering the (correct, as proven with Mail, Messages, and logging in online) little "alert" icons will appear next to most of my calendars that sync with Google (both main calendar and delegates) and some of the time the dialog reappears immediately and other times it appears on the next refresh. Likewise clicking the alert icons will either bring up the password dialog or a dialog saying the server responded with an error and "There was an unexpected error with the request (domain (null) / error 0)." After dismissing that dialog and clicking the alert icons again the password dialog reappears. I will find messages similar to the below in Console when the password fails and brings up the dialog again:



8/10/12 3:22:33.141 PM CalendarAgent[352]: [com.apple.calendar.store.log.caldav.queue] [Account refresh failed with error: Error Domain=CoreDAVHTTPStatusErrorDomain Code=401 "The operation couldn’t be completed. (CoreDAVHTTPStatusErrorDomain error 401.)" UserInfo=0x7f98e56322b0 {AccountName=US Holidays, CalDAVErrFromRefresh=YES, CoreDAVHTTPHeaders=<CFBasicHash 0x7f98e56bb8e0 [0x7fff77606190]>{type = immutable dict, count = 10,

entries =>

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

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

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

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

        6 : Case Insensitive Key: Date = <CFString 0x7f98e535f330 [0x7fff77606190]>{contents = "Fri, 10 Aug 2012 20:22:32 GMT"}

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

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

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

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

        12 : Case Insensitive Key: Expires = <CFString 0x7f98e533b320 [0x7fff77606190]>{contents = "Fri, 10 Aug 2012 20:22:32 GMT"}





Any ideas what is going wrong or how to get Calendar to sync properly with Google Calendar again now that all I did was an innocent password change? Is anyone else seeing such an issue? Of note, my iOS devices were set up with CalDAV syncing and I've seen the same thing happen on them now. However, a simple fix there was to just set up my Google account using Exchange. So one question I'm considering is that something is going wrong on Google's end, but cannot be absolutely sure of that. At the moment using Calendar is out of the question as I can't work with it if it doesn't stop asking for my password.

OS X Mountain Lion, 8 GB RAM Core 2 Duo
  • 1. Re: Calendar Constantly Asks for Google Account Password
    Kiwi Graham Level 4 Level 4 (1,850 points)

    I'm getting frustrated by this too. I have a Gmail account with several sub-calendars which are so called "delegates" when set up in Calendar. I know that the password is actually OK because eventually Calendar does in fact manage to connect and synchronise, but I just can't tell when it is going to be successful and therefore I don't know if Calendar's view of things is up to date.

  • 2. Re: Calendar Constantly Asks for Google Account Password
    Vic van Dijk Level 1 Level 1 (10 points)

    I got the password prompt, too and also "error 302". I was not able to sync new events from iCal to Google. I force quit the process "CalendarAgent" using Activity Monitor, and now syncing seems to work. And I haven't seen the password prompt nor error messages yet (though Console is full of errors).

  • 3. Re: Calendar Constantly Asks for Google Account Password
    alex349 Level 3 Level 3 (635 points)

    That is an interesting point about CalendarAgent... But didn't work for me. Given that my iOS devices also had the problem until I configured them with Exchange sync to Google Calendar I'm beggining to think that this really is a server-side issue at least as much as (if at all) something awry on our Macs.

  • 4. Re: Calendar Constantly Asks for Google Account Password
    alex349 Level 3 Level 3 (635 points)

    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 https://bugreport.apple.com and submit bug reports. I think as many of you who are willing ought to at this point regarding this problem.

  • 5. Re: Calendar Constantly Asks for Google Account Password
    alex349 Level 3 Level 3 (635 points)

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

  • 6. Re: Calendar Constantly Asks for Google Account Password
    jameswedge Level 1 Level 1 (25 points)

    I'm still getting this, has anyopne figured out why it is happening?

  • 7. Re: Calendar Constantly Asks for Google Account Password
    alex349 Level 3 Level 3 (635 points)

    In a surprising turn of events for me unplugging my router and letting it sit for a few minutes fixed the issue (I was moving the router temporarily yesterday for an entirely different reason). Why this fixed the issue I don't quite understand, but my theory is that somehow the router had cached my old password and always used that instead of letting my Mac pass the new one through. That makes very little logical sense, I know, but it's the best I have. This follows in line with evidence someone else posted at https://discussions.apple.com/message/19304388#19304388 that said it worked on one network but not another (home versus work for them). I suggest those of you still seeing this issue (and me if it ever returns and a router reset doesn't fix it) follow that discussion as we should consolidate this one into it anyways. I have seen a response from Apple regarding the bug report I sent in which simply stated it was a duplicate issue report, so they are aware of the problem. Let's hope it is fixed in an upcoming update. I'll continue to follow these discussions and add suggestions if none of the ones already given work.

  • 8. Re: Calendar Constantly Asks for Google Account Password
    gweiss Level 1 Level 1 (0 points)

    So interestingly, I have the same issue as the rest of these posts, and similar Alex, I tried out the trial of busysync, which was able to sync without issue for the past 30 days.


    Now that the license has expired, I need to deide whether to move to icloud (undesireable) or pay $40 for software to do what the free OS integrated services are supposed to do.  This is not a bashing of apple, as I am a very happy consumer, but just frustrated that this crucial functionality is having issues.


    I'll try the mentioned updating of keys and hopefully that will work.  If not, I will fork over the $40 for busysync and know that I will not have to waste further time to keep everything in sync.

  • 9. Re: Calendar Constantly Asks for Google Account Password
    arielhawk Level 1 Level 1 (0 points)

    i have known the answer to this problem for a while (or at least my specific problem that sounds very similar) and i didn't see this post until now. i just haven't fixed my problem yet because of finding the time to do it and also i don't find it to be that big of a deal. it just doesn't sync back and forth between my other devices and gmail (where it stores everything for backup), which i don't find to be that big of an issue for how i use it. so now today i am fixing it simply with enter an application-specific code generated by gmail here you go!!! <3