Fixing iCloud “Unknown error occurred” & “Mac can’t connect to iCloud because of a problem” Errors
Some Mac users may encounter an error message stating “This Mac can’t connect to iCloud because of a problem with email@address.com”, which then directs the user to open the iCloud preferences. Once inside Mac iCloud preference panel, some users may be able to successfully login to iCloud, but often another error is encountered here which states “An unknown error occurred” when trying to login to iCloud on the Mac, or sometimes the iCloud preference panel freezes up and spins endlessly. Once these two error messages have been encountered, the Mac will typically be stuck in an infinite loop of iCloud login failures with an endless unknown error and the endless “problem” pop-up message, which prevents all iCloud functionality from working on the Mac including Messages, FaceTime, Notes, Mail, Contacts, Calendars, and all other iCloud related abilities.
This set of iCloud unknown errors and problems is not exactly rare (see 1, 2, 3) and can be notoriously quirky to resolve, but the steps below should remedy these type of iCloud login issues on a Mac if they are seen.
How to Fix “This Mac can’t connect to iCloud” and Unknown Errors with iCloud on Mac
This is a multi-part series of troubleshooting steps that will resolve most iCloud connection issues on Mac.
Check if iCloud is Down or Not
The first thing you should do is check if iCloud is down or not by going to https://www.apple.com/support/systemstatus/ and confirming that all Apple online services are available.
If iCloud is down, you will need to wait until it is back up again before being able to resolve the issue.
Quick side note: if iCloud was down but is now back up, there may be a lingering connectivity issue due to caching or otherwise, in that case proceed with the steps below and you can likely resolve the connection difficulty.
Quit All iCloud Apps, Reboot the Mac
Next up is to quit out of every app that is using iCloud, this includes quitting Messages, quitting FaceTime, Calendar, Notes, Reminders, etc. Be sure to quit the System Preference app as well. If the apps are stuck or not responding, go ahead and use Force Quit on the apps to exit them.
Once all of those apps have been quit, go ahead and restart the Mac as usual by going to the Apple menu and choosing “Restart”. If the Mac is frozen or refusing to reboot, you can do a forced reboot as well.
When the Mac boots back up again as usual, don’t open any iCloud apps yet, instead first go to the iCloud Preference panel ( Apple menu > System Preferences > iCloud) and attempt to login to the Apple ID / iCloud account again. At this point the iCloud login should proceed as usual, in which case using Messages and FaceTime should work without incident.
Removing iCloud Configuration Files
This is unverified but some users in our comments report it can work to resolve iCloud connection issues in Mac OS. Be sure you backup your Mac before attempting this procedure:
- From the Finder, choose the “Go” menu and select “Go To Folder” and then enter the following path:
- Copy the files found in this location to the desktop or elsewhere that can be easily recovered if desired
- Remove the files from the ~/Library/Application Support/iCloud/Accounts/ folder so that it is empty
- Reboot the Mac
~/Library/Application Support/iCloud/Accounts/
You will likely need to re-login to iCloud when the Mac reboots. You can also log out and back into iCloud if things are still not functioning correctly to regenerate new Account data files.
Log out and Back in to iCloud
If you know iCloud is online, you quit all iCloud apps and rebooted, and you are still having difficulties, you’ll want to log out of iCloud, reboot, and then log back in.
Go to the Apple menu and open System Preferences, then choose iCloud. Select to “Sign Out”.
Reboot the Mac as usual.
Once the Mac has booted back up again, return to the iCloud preference panel, and login to the Apple ID as usual.
Removing Keychain Data, Rebooting
If you use iCloud Keychain, then you may find that removing local keychain data can resolve this issue.
- From Finder, select the “Go” menu and choose “Go To Folder”, and then enter the following path:
- Copy all files found in this user Keychains folder to the desktop, or to a backup folder called “Keychains backup” so that you can restore these files manually easily if you need to
- Now remove all files from ~/Library/Keychains/ so this folder is empty
- Restart the Mac
~/Library/Keychains/
The iCloud errors should now be gone, and the Keychains data should recover itself from iCloud Keychain.
Note if you simply trash these files without having a backup of them, and without using iCloud Keychain, you will lose your keychains data, which is not a desirable outcome. Thus it’s important to backup the keychain files before trying this trick out.
This particular trick was left in our comments by Gunnar and confirmed by several others to have resolved the problem for them.
–
That should be enough to fix the iCloud “Unknown error occurred” problem and the pop-up message stating the Mac can’t connect to iCloud because of a problem with the Apple ID.
Did a particular method work to resolve the unknown iCloud error for you? Do you have another solution? Let us know in the comments.
Here’s what fixed it for me and might help others:
1. Open App Store and sign in via the Store menu. With two factor turned on it seems to work more reliably here than in the iCloud System Preferences panel.
2. Once logged in there, return to System Preferences, open the iCloud panel and attempt to log in again. Since you have already authenticated using two factor shortly before it should allow you to log in here as well.
Good luck!
I’ve tried this about 12 times now with no luck at all – I get the verification code sent to my phone, but after I put it into the MacBook Air, it just goes straight back to the error message… Any idea’s how to work this out? I’ve just got this laptop (second hand), and it’s not logged into any accounts, and I’m not able to log it into anything because it just keeps coming up with the error code…
In my instance I found that I had two issues with iCloud and they had to be addressed in one particular sequence.
I had two iCloud-related messages:
Setup two factor authentication
Accept revised terms and conditions
When I tried to setup the two factor authentication first, it continued to fail with the unhelpful “An unknown error occurred”. But when I proceeded to accept the revised terms and conditions (for iCloud) that was successful, and after that finished, then I was able to setup two factor authentication.
Issue resolved Thankyou so much :) Closed all apps, restart and it let me sign in.
Thanks a lot, issue fixed after reboot.
Thanks so much! I simply rebooted my Macbook Air and logged in and then it was fixed.
Life saver, after many weeks this finally worked.
Using Safari on OS X I was getting “Connection Error – iCloud encountered an error while trying to connect to the server.” I tried again, with internet connection via my iPhone. Still the same problem.
After several wasted hours, I found I could connect using Firefox. The problem seems to be (yet another) Safari issue.
I have this same issue with Safari. All other browsers are okay – Chrome, Firefox, Opera. Using Safari, I can’t log into the Apple store to make purchases, I just get a spinning wheel and the login fields never show. Similar, I try to use iCloud.com and I get a the connection error message and never get the login fields.
Strange that the other browsers work and Safari does not. I have deleted the safari plist file, rebooted, used private connections: All failed to fix the issue.
I face this problem about a moth and none of aboe and elsewhere on the internet helps. I have reached “semisuccess” today:
1. signing out + rebooting
2. adding the required password to iMessage (don’t know why it’s required. I have never used this app)
3. opening iMAC system preferences and logged in to iCLoud. (semed to work) + Reboot
4. opening system preferences + tying to open Account details.
Result:
“Account Details could not be opened because of an error connecting to iCloud.”
I am pretty afraid that OSX slowly reaches the reliability level of Windows 95. Pretty annoying.
I am signed into iCloud but can not access it. I get a “Connection Error – iCloud encountered an error while trying to connect to the server.” message. Neither can I sign into Apples support forums. With this I get a “Sarari Can’t Open the Page … because Safari can’t establish a secure connection to the server dims.apple.com” I’ve tried the things mentioned above to the best of my ability. Using a late 09 iMac. Same problem is on my late 2011 MBA. When asking for the support page it does not let me sign in but will give me a phone number. What else can I do?
Removing everything under cd ~/Library/Keychains/
and rebooting finally fixed my long standing issue.
Before doing that I backed up that keychain folder content to a local folder but did not need that later.
keychain data was automatically recovered from iCloud after logging in to iCloud after the reboot.
you just save my life
it worked
Where do I find this cd~/Library/Keychains/
This surprisingly worked.
Amazing. Thanks a lot
This worked for me too. After months of not being able to sign in.
Thanks sm. I just restarted my mac after clearing keychain.
o.m.g. tried everything. will sleep for the first time in a year. thank you! :)
THIS IS THE ANSWER I’VE BEEN SEARCHING FOR!
This worked great!! Thanks
Thank you so much! It solved like a charme :)
OSX Daily please update the main article with this tip. I have tried everything from multiple websites and this finally solved the problem. I was SO CLOSE to completely erasing the computer and starting over because of this annoyance. But this saved the day!
We added this particular troubleshooting method to the article.
Glad to hear it worked to resolve the issues for you and so many others, thanks for the tip gunnar!
Can any1 help. I’m unable to do any of this as I’m unable 2 access anything.i have forgot my password to sign in2 my MacBook just to access the home page so the only option available seems to be signing in using icloud. It gives the option to reset main password by signing in using apple id. So when I punch in id and password it eventually comes up unable to connect to icloud. I know it’s the correct details because I even just changed it again on a different device. The trouble is 4 me that I can’t even get in2 the laptop to disable the icloud related as as suggested in this man’s blog. Please some1 help. Most of my life is on this dam thing haha
Hello, please I have the same problem. Were you able to resolve the issue?
Only thing that worked for me after hours/days of attempts and getting frustrated was typing “Apple ID” in keychain under “login” and “passwords” and deleting anything that said Apple ID or .apple anything. Restarted it and signed in. FINALLYYYYYYYYY.
Hallelujah
This trick worked for me. Thanks a lot
This trick worked for me! Thx
This worked for me, thanks for that.
I was having the same issue after I upgraded to Catalina. I managed to sign in using the app store which kinda forced the system preferences to sign in as well but after, the terms and conditions popup appeared but the window is so damn small that I can only see half the text. I am able to click on the “I hace read the terms and conditions” but I cannot click the agree button cause I can’t see it. I don’t know what else to do.
Logged back in to iCloud and my folder is not there.
Nothing worked for me and I did not want to even attempt to create a throwaway iCloud account. It seems the cause of the problem is that something in the keychain is corrupted.
It may be possible to fix this by selectively removing only the iCloud key from the keychain. I would strongly suggest doing that before attempting the following.
Note: The following workaround will remove all your locally saved passwords. You will have to enter all your passwords manually again. Do not do this if you have some valuable passwords stored locally that you rely on!
With that said, here is what I did:
1. Make a backup of everything in HOME/Library/Keychains
2. Remove everything in HOME/Library/Keychains
3. Restart
4. Open Settings -> iCloud and sign in
I followed your instructions to clear keychain folder under local Library. Then restart my Mac. It took very long time to login to iCloud, but no more “unknown error”. I think it was syncing all my iCloud information. Fortunately, I had my keychain on iCloud, and it seems that all my website login information back live.
By the way, my OS is Catalina 10.15. When I migrated my account information from Time Machine, I encountered unknown error issue. It took me several days to get the issue resolved. Thank you!
TY!!! You saved my life <3 It worked
>>>A NEW SOLUTION<<<
This problem was so maddening, and I *scoured* websites to find a solution. Did the terminal commands to adjust "shared folder access rights", Library tweaks, log out/in, try a fresh/temp iCloud id, restarts, restarts, restarts, blah blah blah. All to little avail.
It seems there are potentially multiple problems that manifest this same error, so there's not much of a one-size fits all, except perhaps the combo I stumbled upon…
FIRST: I couldn't log out of iCloud, got caught in the 'login/logout loop" that always gave the "unknown error" message. Seemed like it would always get stuck trying to sign out of "Find my mac". So to force it to let go, I **reset the nvram** per https://support.apple.com/en-us/HT204063
That made it able for me to successful log out of iCloud. But then nothing would log back in, as I then got the "verification failed there was a problem connecting to the server" error.
SECOND: I restored the OS, which if you simply do this without reformatting drive or anything, will update/reset/overwrite the iCloud defaults and that allowed me to then login. See this: https://support.apple.com/en-us/HT204904
After that, VIOLÁ! I could login to iCloud and all was right with the world (well, with my Mac anyway).
Note: when one resets NVRAM (first step above) it will "disable" any Find My Mac setting (unless you have a firmware password), so be sure to turn this back on once you reestablish your iCloud login, etc.
God bless i was finally able to resolve this by reinstalling my macOS. Shut down my computer and turned it back and held Command and R at the same time before the Apple symbol came on. Then followed the instructions to reinstall it. Took about 30 minutes to reinstall, and when it finished, it still said this mac cannot connect to iCloud, go to iCloud preferences. i thought i was still screwed, but i simply logged in and it finally went through, and same with iMessages
Another trick is to remove the mac account on ‘other devices’ on your phone’s icloud account. Worked for me.
Thank you SO much!
I restarted the computer and it helped. Furthermore, my other accounts are working too now.
Thanks!
I did the “shut down” and restart method. I was then able to login to the iCloud on my Mac. Photos taken on my iPhone are now updating on my computer.
Thanks, the quit-and-restart method worked!
Nearly two years later, and still relevant.
Thank you!!
Thank you!!!! Rebooting fixed the problem, very helpful
I’ve had this issue for six months and Apples tier 3 support doesn’t have a clue. It affects everything on my Mac including the App Store. Everything works on my iPhone though so I’m waiting on Apple to come up with a fix. Thx
If someone has a Gmail account, why is iCloud naming that as the problem? You don’t have to go thru iCloud to use Gmail do you? It’s configured as iMap on MacAir in the Mail.app
Removing documents from folder, signing out of iCloud, plus a reboot worked for me! Thanks for the help!
I used the “Quit All iCloud Apps, Reboot the Mac” and it solved my problem of my iCloud account password not being recognized and getting an error message of “An unknown error”. Be sure to follow all the directions and close all apps that use iCloud like Mail, Messages, etc before restarting.
Well latest news. I was on MacOS Sierra, 10.13.2 and was not wanting to go to HIGH Sierra 10.13.3. A friend of mine who is a BigAppleFanBoy, was convinced that after trying everything else that upgrading the OS would fix it. Once again, after getting ER ALL DONE, and re-booting, etc. it looked like MAYBE, but again again after being SHUT DOWN all night and just re-booting, IT’S BAAAAAAAAAAAACK.
My friend at first thought that something had changed with my MacID sign on ID, which I use a Gmail addy for that, but I feel it is an Apple issue not a Gmail issue, that appears to be even beyond Apple’s Tech Support expertise. From what I have read on other sites, they have NO CLUE.
Incidentally, my friend does not have this issue on his MacPro. Mine happens to be a MacMini.
Thank you so much it worked!
Let us know tomorrow morning if it STILL works. I went through that three days in a row, and after testing, by RESTARTING several times, and on day two and three, doing several full SHUT DOWNS, and re-boots, thought it was solved each time. But then after the MAC was SHUT down all night, upon its’ morning re-boot, guess what, it was BAAAAAAAAAAACK, LOL.
So I have given up. It is some sort of PHONY issue, since I can access my ICloud, folders & all files, just fine from this MAC as well as a NON MAC machine.
See what happens tomorrow morning Mar 7th :-)
Samo Samo this morning. I wonder if moving up from MacOS Sierra to High Sierra, may solve this, since Apple appears to not to care???!!!
Bless you this worked!
Hi Merf,
Nice to read from you “Bless you this worked!” My question is: I read al couple of solutions for “This mac cannot connect to iCloud because of a problem with..”
You wrote: “Bless you this worked!” What solution worked for you?
Logging out of iCloud and restarting worked for me!
Probably came back the NEXT Morning, right??? That is what has happened to me, three days in a row, after the Sign Out of ICloud thing appeared to work, each time :-)
I give up. It is not affecting my accessing ICloud’s files, folders, etc. on THIS MAC, or a NON Mac machine too.
A False Positive of some kind, IMO.
“Log out and Back in to iCloud” worked for me! Man, I was struggling with this all day.
Not only was iCloud breaking on me, but all my connected internet accounts (Google, Facebook, etc.) and all apps that use those APIs were breaking. Fantastical, Messages, Calendar, Reminders, everything was broken.
Thanks for the article!
OK, I yet SIGNED OUT of ICloud AGAIN, third day, this time clicking on SAVE my stuff, to be able to Continue, I immediately hit CANCEL, then CONTINUE, since I already had it all archived at ICloud’s>>Go>>Home.
This time I also set up that 6 digits security code for Keychain, even though I will probably never use that, know what it really is, or care, LOL, and had to provide a CELL # for SMS verification if needed. Used an spare cell we have, used to be my Wife’s before she got an IPhone on our son’s Verizon Family plan. I have SMS shut off on MY CELL.
Anyway, SHUT DOWN, turned it back up. and it did not come back.
Probably will tomorrow morning for whatever reason :-). Maybe cause I use CCleaner each evening before shutting down, but have all along and never has been an issue, until just a few days ago.
All these solutions are a bunch of bolony, IMO. I did the, “Library,” thing, never worked. I did the Sign out three days in a row. Appeared to work at the time, testing it with several RESTARTS, and even several, total SHUT DOWNS, then re-boots. and it doesn’t re-occur UNTIL THE NEXT MORNING, just now, today, IT’S BAAAAAAAAAAAACK. IMO this is an APPLE problem AND NEEDS TO BE ADDRESSED, maybe with some sort of update.
iCloud has been around for a while, it was first rolled out with OSX 10.7 in 2011. It has now been 6 years and Apple still hasn’t gotten it right. iCloud has always been a headache, through every update, and barely worth using. I wish the geniuses at Apple would erase iCloud and invent a system that actually works.
I tried all of these fixes
What DID work for me was:
1. Making sure I was signed out of iCloud, iTunes store, and App Store.
2. THEN I logged in with a totally separate iCloud ID that I created for temporary use.
3. Then I signed out of iCloud and signed back in with my ORIGINAL, preferred iCloud ID. Worked like a charm.
This looks promising. I am in my primary profile which has the subject problem. iCloud seems to be fine from any web browser, from a Test profile on this laptop, and from my phone.
I am concerned about my local keychain in this profile that can’t connect to iCloud. If I do your steps above, do I stand to lose one or the other keychain?
Thank you! This worked for me: logged out of icloud and logged back in. What a relief!
Tried this. Eventually got the msg that it could not log me out.
Since then, I HAVE LOST ALL THE ENTRIES in Calendar!!! All my appointments, etc.
What a f..@! suggestion! A real piece of sh*i*t!
Just because a suggestion may work for someone else it doesn’t guarantee that its going to work for you? Also if you are that concerned about calendar appointments you should have backed up first.
Worked. Thanks!
Tom
none of these worked for me. I can sign in to icloud fine on my iphone and apad and at icloud.com, but can’t on my mac since upgrading to high Sierra. no access from my mac to my calendar events, but they show up fine on iphone. I have deleted icloud plists several times, changed password several times, turned off 2 step verification, booted in safe mode and tried to sign out and in again, but nothing works. Apple doesn’t know how to solve it.
Hi All,
I was having same issue and i noticed my date and time was not up to date..i set it and evry thing working fine now.
cheers….. :)
Removing files from “~/Library/Application Support/iCloud/Accounts/” solves my problem. Thanks a lot.
Tried this, they were all in Trash. Did a full shut down, back up. Problem persists.
I tried all that Sign out of ICloud stuff two days in a row, yesterday the second time, saving (COPYING) all my ICloud stuff to ICloud’s>>GO>>HOME. Appeared to work yesterday, after several SHUT DOWNS & reboots. But then after being down all night & rebooting this morning, IT’S BAAAAAAAAAAACK, but I no longer care, because it is some sort of phony whatever, because I have NO PROBLEM access ICloud on this MAC or a non MAC machine, either, a FALSE POSTIVE, some sort of Apple issue, IMO, that they need to resolve with some sort of update!!
Hi all,
I discovered the same problem yesterday and none of the above tips helped. So this was my solution:
I checked the console (type “Console” in your dashboard) and cleaned up the logs. Afterwards I tried to logout of the icloud account (or re-enter the password, it doesn’t matter). Then I finally saw the problem: the logs said, that the sqlite database in ~/Library/Accounts/Accounts4.sqlite was corrupt!
This error message didn’t help me much with google, but then I took the same files from my timemachine backup one month ago and replaced them. I restarted the laptop (it didn’t switch off, hang at a black screen, so I forced it to). After restarting, the error came once more, but then all mail-accounts, calendar entries, reminders etc. were back again! I also could re-type my passwort for the icloud account and everything is working now!
I am so happy, I thought I have to re-install my whole laptop…
Hope that helps someone having the same problems.
Best, Jule
How do you clean up the logs. When I go into Dashboard, there isn’t a place to type “console” … it’s just the calculator etc.
I’m having the same problem, but it extends to my connected iOS devices. (iPad Air 2 and iPhone 7s)
How do I “clean up the logs” in console?
I constantly have to reconnect and re-set up iMessage across my devices. It used to only happen when I updated os and iOS. Now I get the error message multiple times a day and have to re-set up connectivity between devices.
Very frustrating. I’ve tried every other fix.
Thanks,
Terri
This is the message I am getting if I close iCloud:
“If you turn off iCloud Drive, all documents stored in iCloud will be deleted from this Mac.
Your documents will still be available on other devices using iCloud.”
Does this mean information in Numbers and Pages will no longer be on my computer? I am reluctant to do this.
Thanks
This post was a life saver.
I came across this problem when I changed the password of my apple ID. I could no longer sign in to my icloud account through my computer nor with my iphone.
In the end “Removing iCloud Configuration Files” worked perfectly for me.
I still have no idea on why I wasnt able to sign in nor sign out from my icloud account. So weird…
None of this has worked for me. Running Sierra 10.12.2. Changed iCloud pw when I dropped 2 factor auth. Now on every boot, I get this “can’t connect” message. Signed out of iCloud then back in and it duplicated every calendar entry. It all seems like lousy QA of Sierra and Support has no clue.
biggg problem with sierra and iCloud I’m frozen been rebooting and trying to delete iCloud all day on MacBook air 13′ with absolutely no luck on anything
Mine does not let me log out
I’m having the same problem. It’s telling me that I have to log in, which I can’t do, to then log out.
Signed out and rebooted over 20 times, with no joy.
Apple help chat was, as expected, ZERO help.
I can access from iPads, phone, MacBook, but not the iMac.
This is exactly the difficulty I am experiencing. I have tried all the above several times without success. I believe the issue is related to our having to changed our primary e-mail address. The system constantly refers to an e-mail address that has not existed for a year or more. I have changed every reference to this “bad” address I can find. But, I am still on this endless loop of can’t connect pop-ups. Pretty much at the point of having to bring system down to Apple and pay for a fix.
That’s the exact same problem I am having. I have a gmail email now instead of earthlink. I have changed it everywhere I can think of, but the system on my MacBook Air always refers to the old earthlink email. Did you ever find out how to fix that?
In my experience was the “two factor authentication” for AppleID access to cause the problem.
I turned off and everything is back to work perfectly!
Now I log regularly in with user and password.
Thank you so much! It worked
Logging out of ICloud worked for me. The password thing was no big deal, the warning was just a bark, not a bite. I was able to still put in the same exact password that I use for my MAC itself, but then the next day it came back, so did it again. This time the procedure was different. I had the option to save (Copy), not lose all my stuff. So it was archived into IClouds>>GO>>>HOME. And I tested it by SHUTTING down, not just RESTARTING, because that made me think it worked the previous day. So anyway, shut down a few times. Then shut down, went to lunch with my Wife, came back, booting it back up, Problem gone. BUT>>LOL>>Once again, being shut down all night, last night (Why would that be different), I booted up this morning, and it was baaaaaaaaaack. I give up, DON’T CARE, because it is some sort of FALSE POSITIVE, because I have zero problem getting into ICloud from my MAC or a Non MAC machine. I believe that it is an Apple issue, that they need to resolve with some sort of update!!!
I have been extremely reluctant to log out of iCloud as you say because when I try to do so I get the alert: If you sign out of iCloud, you will need to create a separate password for this Mac.
What? Another password to remember and for no good reason whatsoever? Why will Apple not let you simply log out and log back in using your Apple ID.
Totally ridiculous.
Totally agree Bob Gerard… in fact I’d rather not use iCloud at all for any of my computers or devices… how can I get rid of that?
The only way to get rid of iCloud is to never use iCloud, and then log out of iCloud. Your Mac will be missing many abilities by doing so. Or you can try to use Mac OS Snow Leopard which did not have iCloud. Sierra is full of iCloud so the new versions are reliant on it.