Can't create Google internet account

I want Apple Mail to talk to a gmail account. In System Preferences, when I say I want a new Google account, I get a dialog that says

Google requires completing authentication in your web browser

So I click the button and immediately I see another dialog

Failed to authenticate with Google, please try again later

There is no evident communication with the browser, so I can't authenticate. I've also tried creating a normal manual mail account, but no better luck.

I have turned on Less Secure App Access for the account I want to use. I have no difficult logging into this account using the web (gmail.com), but I don't want to handle my mail that way; I need it to be part of my mail.

This has worked fine on other machines. This one is Catalina 10.15.7.


I was able to resolve the same issue by restarting the computer in safe mode and then adding the account as a Google account in the Internet Accounts prefpane. It opened the browser window and allowed me to authenticate.

Now that I've restarted out of safe mode the account is still working, and adding new accounts appears to be working again too. I have no idea why though!


This answer is likely not going to be useful, but the problem just mysteriously fixed itself. In Internet Accounts pref pane, I created a new account with Add Other Account (not Google), entered the information, and the account sprang to life successfully. I have no idea why.

All of this has something to do, I'm pretty sure, with the new use of OAuth by Google. Maybe it sometimes just doesn't work at the server end. I came into the process this time armed with the concept "OAuth" in my head, but unless the computer (or Google) was reading my mind, it was never actually used during setup.

It is interesting that, peeking into Keychain Access, on my Big Sur machine, my google accounts have OAuth entries, but my Catalina keychain has no such entries. This makes me think that Catalina just doesn't really understand OAuth, even when updated to the latest version.