9

After updating to macOS Mojave 10.14.4 two days ago and still, I have an issue with taking online Google accounts in Apple Mail.app.

This problem appeared immediately after the update, although it wasn't there before. Also after this update, Apple Mail requested to re-login through Safari and it was simple authentication.

Nimesh Neema
  • 48,747
  • 19
  • 143
  • 197
Peter Samokhin
  • 265
  • 2
  • 3
  • 7

6 Answers6

4

No.

The update broke access to some Library configs that are under control of System Integrity Protection(SIP).

Boot to the recover console, disable SIP with 'csrutil disable' in the terminal, then boot into the OS, go into Internet Accounts and select Google as normal.

After following the steps to give your Mac permissions to your Google objects(mail, calendar, etc.), boot back into the recovery console and re-enable SIP by running 'csrutil enable'. Boot back into the OS and compute on.

I got the hint to do this by looking into the console logs in the console utility, but I have no idea which log I searched for 'google' or 'accounts' in, but I found a problem mentions an error with a 'file-write-xattr', so that gave me the idea that SIP was involved.

Someone should be able to track down the issue and get the errant permissions logged with Apple so the fix can go out with the next patch, or set a sticky here with a more detailed explanation and fix, and not just a work-around.

bentaisan
  • 141
  • 1
  • @bentaisan That worked...and then it didn't. Perhaps I don't understand what you mean by "...After following the steps to give your Mac permissions to your Google objects (mail, calendar, etc.)" After I disabled SIP with "csrutil disable" in the Recovery environment Terminal, and then rebooted into regular macOS, Google reconnected itself with no actions by me; I didn't have to follow any steps. What do you mean by "following the steps?" – DavidSupportsMonica May 04 '19 at 23:05
  • The Internet Accounts dialog should open Safari and the Google login dialog. After logging in, a dialog will ask if you want to grant permissions to Internet Accounts. After accepting these Gmail, et al, should be setup. You can test here, then go into the recovery console to re-enable SIP. – bentaisan May 06 '19 at 00:22
  • It did open Safari, and required me to login to Google, which I did. But no request for permissions was presented. Can that setting be accessed elsewhere? I looked for it in Preferences > Security & Privacy but didn't see it. – DavidSupportsMonica May 06 '19 at 14:15
  • I left our a step. I don’t recall where in Google, but I removed the existing permissions first, then I did the rest. – bentaisan May 07 '19 at 19:32
  • @bentaisan I'm sorry, but somewhere "in Google" doesn't give much guidance. I just wandered through my Gmail's settings pages, but saw nothing about permissions. Somewhere else? – DavidSupportsMonica May 08 '19 at 03:51
  • @bentaisan Update: I think I've now seen what you experienced. have two computers. I signed in to my Google account on one, and was presented with a full-screen Google dialog/request for access to macOS. I granted the request. Since then, mail.app on macOS has connected correctly to gmail. The other computer has identical software, but logging into my Google account does not generate the request for access. – DavidSupportsMonica May 08 '19 at 14:10
  • @bentaisan Further Update: after one computer first connected correctly, both computers now periodically require me to push the "Login Failed" button, as I describe in my Answer above. Logging into my Google account (not the gmail account) on either computer doesn't generate the dialog asking me to grant Google access to macOS, and I don't know where else to find the dialog. Both computers share Keychain data via iCloud. Removing and re-adding Gmail to the computers makes no difference. It's a mystery – DavidSupportsMonica May 10 '19 at 14:48
3

A quick Google search reveals that it's a bug in Mail.app in macOS Mojave 10.14.4 update.

From this post on MacRumors, a popular independent Apple news blog:

Apple earlier this week released macOS Mojave 10.14.4, which has had the unfortunate side effect of rendering the Mail app unusable for some who use Gmail services for their email addresses.

After installing the macOS 10.14.4 update and opening the Mail app, Gmail users are asked to authenticate their email addresses using a Google web login form.

Unfortunately, the authentication process does not stick, and shortly after authenticating, the Mail app asks for authentication once again or refuses to work, listing all Gmail accounts as offline.

Additionally,

Some users have had success setting up their email accounts using IMAP as a workaround. Those who have contacted Apple support have been told that a fix is in the works, so the bug could be addressed in the near future.

Appears that the issue has been acknowledged and the fix is a work in progress.

Some other links worth checking which points to possible resolution:

Nimesh Neema
  • 48,747
  • 19
  • 143
  • 197
  • Okay, thanks! I think my quick SO search was worse than your quick google search ;) – Peter Samokhin Apr 01 '19 at 07:40
  • @PeterSamokhin Possibly the question isn't on SO yet (also because it isn't a programming issue). Web search likely always yields more relevant results that searching SE. – Nimesh Neema Apr 01 '19 at 07:42
  • I meant AskDifferent subsite and SO as a synonym for entire SE :) – Peter Samokhin Apr 01 '19 at 07:43
  • If it's a bug in the OS - why would a subset of people be affected? Apple doesn't ship a different group of software - so wouldn't this show that a subset of google users have a setting or are hosted out of servers that are failing? I don't doubt Apple shipped a feature to be more secure or not trust older SSL certs or something around 10.14.4 - but to call that a bug in Mojave seems a roundabout way to get to who constrols what needs to change or be fixed. Maybe I'm missing something, though. – bmike Apr 01 '19 at 11:45
  • The link you provide reports that the issue should be fixed / have disappeared by now: https://www.macobserver.com/analysis/apple-gmail-gsuite-10-14-4-mail-fixed/ You may want to update the answer. – n1000 Apr 01 '19 at 11:58
  • 1
    @bmike well in my case, two of my accounts are likely failing since I've originally had to create them as `@googlemail.com` instead of `@gmail.com`, due to [a very localized issue](https://www.cnet.com/news/germanys-googlemail-finally-becomes-gmail/). Since I always migrated my macOS, it's likely now expecting a `@googlemail` response where it's now getting `@gmail` instead. [Here is a potential solution](https://forums.macrumors.com/threads/mac-mail-app-broken-for-some-gmail-users-in-macos-mojave-10-14-4.2175312/page-4#post-27232575), which I haven't verified yet. – Asmus Apr 03 '19 at 15:33
  • That deserves an answer @Asmus - super helpful detail – bmike Apr 03 '19 at 16:43
  • 1
    Thanks @bmike Since the given solution is actually working, I've reproduced it as an answer below. – Asmus Apr 04 '19 at 10:24
3

The issue:

As an update to what I've commented above, I had exactly this issue with accounts which were originally created as username@googlemail.com instead of username@gmail.com. Since I always migrated my macOS, it is likely now expecting a @googlemail response during verification, but Google is returning the @gmail instead.

The solution:

To everyone that is still having issues, this solution simply overwrites the response that Google's servers are issuing. I'm reproducing the following how-to posted by Gannet on the MacRumours Forums:

  1. Download, install and run the app Charles. If this is your first time using Charles it should prompt you to authorize automatic proxy configuration. Do this. (Otherwise just make sure the macOS proxy is enabled and working)
  2. From the "Help" menu choose "SSL Proxying" > "Install Charles Root Certificate". Once the certificate is installed, find it in your keychain (type Charles into the search), open it, expand the Trust section and set to Always Trust. You will be prompted for your password when closing it.
  3. Back in Charles, select "SSL Proxying Settings..." from the "Proxy" menu .
  4. Add a new location with Host: people.googleapis.com .
  5. From the Tools menu choose "Rewrite…", enable Rewrite, and click the "Add" button.
  6. Add a new location with Host: people.googleapis.com. Add a new action with the following details:

    • Type: Body
    • Where: Response
    • Replace Value: {"names":[{"metadata":{"primary":true},"displayName":"User Name}],"emailAddresses":[{"value":"user.name@gmail.com"}]} where of course you put in your actual User Name and user.name@gmail.com values. In the end, it should look similar to this:

Adding the rewrite rule editing the rewrite rule

  1. Once you "apply" this, you're all set. Open "Internet Accounts" in the system preferences (or open Mail.app), and follow the authorisation procedure.
  2. Once everything is working, you can either repeat the steps for each of your problematic accounts, or Quit Charles and feel free to delete the rewrite rules as well as the certificate from your Keychain.
Asmus
  • 7,385
  • 1
  • 32
  • 40
0

Open "Internet Accounts" in "System Preferences" and click on every Google account so that it will prompt you to authenticate via Safari.


After updating, it prompted me to open Safari to authenticate one of my emails - resulting in that email working. Connection doctor showed all the other emails as offline, so I deduced that I needed to follow the same flow for all of them.

JBallin
  • 9,512
  • 9
  • 37
  • 73
0

When gmail fails to remain connected on my iMac and MacBook Air running Mojave (which seems to happen after a few hours of inactivity on the account), Mail's window shows an error icon at the account listing (on the left), and a notation "Login Failed" (on the right):

enter image description here

If I put the cursor on the "Login Failed" words, the words turn into a button. Clicking on the button restores the connection. The restoration isn't permanent, but it's easy to restore when the connection fails again, and is much less trouble than the other suggestions for remediation...until Apple or Google update the software to take care of this issue permanently.

DavidSupportsMonica
  • 2,437
  • 1
  • 13
  • 33
-1

I retried today (2019-04-01) and despite the date g-suite accounts are now working.

I don't think this is a bug that affects everyone on 10.14.4 and uses gsuite.

bmike
  • 226,393
  • 78
  • 398
  • 871
shaun
  • 1