iOS Notes app stored on Gmail/Notes => rabbit-like propagation of redundant versions

The Apple iOS Notes app has the option of storing items in Gmail. They appear under the Gmail “Notes” label.

This works fine on iPhone/Notes_app, fine on iPhone/Gmail_app, fine on Windows/Chrome_browser/Gmail

But… in eM Client on my Windows PC, what are two items in the Gmail Notes label/folder appears as 72 items in the eMclient “Notes” folder. 2 versions of one item, 70 versions of the other, timestamped circa every 15 seconds. It looks as if eMclient has instantiated every different saved version of the same item in the eMclient folder view. I.e. as if eMclient is not aware that they are versions of the same object, and only the most recent should be displayed.

Here is a clip of a few of the redundant copies, as displayed by eMclient.

Those aren’t Notes. Maybe messages? Whatever app/device is creating them is saving them in All Mail with the Notes tag. So we display that.

We don’t support Notes on Google. Only Exchange, Office365 and IceWarp

These are items created by the iOS Notes app. These items can be stored in different folders in an iCloud account, or in the “Notes” foldeer/label in a Google/Gmail account.

No, they are not eMclient’s notion of Notes. Unfortunately, the term “notes” is used by lots of different people for slightly different things. "There are more things [like Notes] in heaven and earth, Horatio, than are dreamt of in your philosophy.”

Here is a collage of screen-clippings made on my iPhone showing how the iOS Notes app and be configured to store iOS Notes in Gmail, how they appear in the iOS notes app, and how they appear as messages in the Gmail app on the iPhone.

Note, however, that there is a 1:1 correspondence between these items appearance in the iOS notes app and as messages in the Gmail app.

i.e. note that there are only two differejnt items, not the 72 versions that appeared in the eMclient screen-clipping I pasted on the first page

That folder is just a tag (label) on messages in the Google All Mail folder.

The server says there are 72 messages in All Mail with that tag, so we display that.

But they are not Notes.

But now it gets more fun. When I first switched to my Windows PC to see how these iOS notes appear in Gmail in the chrome web browser, all was well: there were only the two items that appeared in iOS notes.

Darn, I wish I had screen-clipped that.

unfortunately, I did not capture that screen-clip before I opened eMclient.

as soon as I opened eMclient I saw the 72+ versions in the eMclient folder list, but I still saw only the two items in the Gmail/Chrome and Gmail/iPhone folder list.

however, circa 15 minutes later (after I refreshed eMclient), the 72 versions appeared in Gmail/Chrome/PC.


I may go ahead disconnect eMclient, and repeat so that you can see that the behavior is well-defined, no redundant copies, when only the iOS Notes app, the iOS Gmail app, and the PC/Chrome/Gmail web app are involved. and then I will reconnect eMclient, so that you can see that it is eMclient that is causing the redundant copies.

for good measure I may try Outlook and Thunderbird

note that I say “may”, i.e. in my copious spare time

iOS notes synced to Gmail via your mobile app doesn’t work in eM Client “Notes section” and looks like you just have a “folder of mail” notes.

The proper Google Notes (Keep) doesn’t work in eM Client Notes, as Google as yet don’t have the API available to be added into eM Client.

So if you want Google iOS mobile Keep notes, you have to use the “Google Keep app” on your iOS device or use the http://keep.google.com on computer.

Here is a screen-clipping, where I describe the first of the experiments I mentioned in a previous post.

Briefly: when eMclient is not running, the iOS notes app, the iOS Gmail app, and the Gmail app in chrome web browser on a PC are consistent, no redundant copies. (Actually the redundant copies briefly appear in the iOS Gmail app, but disappear soon, probably after a scan detects appropriate versions/UIDs/…)

when I activate eMclient, and I’m not doing anything in the notes app, eMclient sees a consistent view.

but when I start editing in the iOS notes app, eMclient sees a new version or item of the iOS note/Gmail message in the Notes label every 15 seconds or so, undoubtedly as autosave goes on.

The iOS notes app, the iOS Gmail app, and Gmail in the chrome web browser all have a consistent view. No redundancy. but eMclient is inconsistent, showing these redundant copies.

Screen clipping:

eMclient’s redundant inconsistent version/copies of the same item do NOT get propagated to Gmail. at least as long as there is no status change.

when I saw the back propagation, it occurred after I had marked the messages unread in eMclient, so that the count of unread messages would appear next to the notes folder and I could report to you that there were 69 redundant copies/versions.

later I went and read some messages in eMclient, messages that had not been marked read or unread, messages that had not previously been accessed anywhere except when they were originally created

this also caused the back propagation of redundant copy/versions.

Undoubtedly because eMclient is trying to propagate the “read” status back to Gmail. I do not know if eMclient is reviving a version which Gmail has already stored but suppressed, or if eMclient is propagating the entire version message content back if Gmail thinks it is already suppressed it.

As you have a Pro License, please open a support ticket with use. I will give you instructions to generate specific logs, and we can show you were the duplicate messages come from.

I am NOT talking about the Google Keep app.

These items were created by the iOS Notes app, and were stored in Gmail with the label “Notes”. They are visible to the iOS Notes app, the iOS Gmail app, and to Gmail elsewhere.

They are not visible to the iOS Google keep app on my iPhone.

People have been storing non-message data in Gmail for a very long time. The Gmail APIs to do this have been available for a very long time.

Now I’m sure that eMclient does not care about the Linux FUSE file system interface to Gmail data. But Apple Notes might be big enough to care about.

These items work created by the iOS Notes app, and were stored in Gmail with the label “Notes”. They are visible to the iOS Notes app, the iOS Gmail app, and to Gmail elsewhere

Ok I see, so just notes as a “mail folder” label.

BTW, if you look at the headers, as reported by eMclient, they are

For the first version in eMclient:

Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
From: xxx <xxx @ gmail.com>
X-Uniform-Type-Identifier: com.apple.mail-note
Mime-Version: 1.0 (iOS/15.5 (19F77) dataaccessd/1.0)
Date: Tue, 07 Jun 2022 14:10:44 -0700
X-Mail-Created-Date: Tue, 07 Jun 2022 13:59:52 -0700
Subject: #3 Item created on iOS notes app
X-Universally-Unique-Identifier: F6B0E46A-371C-4F60-90BB-73E44031C268
Message-Id: <4700D9B5-F9F5-4929-A334-F235ED94273F @ gmail.com>

For a later version:

Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
From: xxx <xxx @ gmail.com>
X-Uniform-Type-Identifier: com .apple.mail-note
Mime-Version: 1.0 (iOS/15.5 (19F77) dataaccessd/1.0)
Date: Tue, 07 Jun 2022 14:15:52 -0700
X-Mail-Created-Date: Tue, 07 Jun 2022 13:59:52 -0700
Subject: #3 Item created on iOS notes app
X-Universally-Unique-Identifier: F6B0E46A-371C-4F60-90BB-73E44031C268
Message-Id: <6D317F3E-3D0A-40FD-86A8-39529A03DB40 @ gmail.com>

where you can see that the Message-IDs and Dates are different, but the X-Mail-Created-Date and X-Universally-Unique-Identifier are the same.

Now, you are probably like me and dislike using non-standard X- headers. But Apple seems to make heavy use of these headers, in OS/X Mail as well as Notes, and Google/Gmail seem to understand them, or the equivalent.

… or the equivalent: usually when I see this sort of bug in a mail app it is due to not properly using IMAP’s UIDs and UIDVALIDITY. many developers cannot imagine that UIDs might change across session boundaries. worse, if you have an IMAP-to-IMAP proxy along the way, the pre-proxy session may stop/restart, UIDs may change, but the proxy may not expose it to the post-proxy client - or the client may not be looking for session changes. for that matter, IMAP session changes may be totally hidden from the client within a library.

Perhaps more relevant is Gmail’s

h t t p s: // IMAP Extensions  |  IMAP for Gmail  |  Google Developers

Access to the Gmail unique message ID: X-GM-MSGID

Gmail provides a unique message ID for each email so that a unique message may be identified across multiple folders. Retrieval of this message ID is supported via the X-GM-MSGID attribute on the FETCH command. The message ID is a 64-bit unsigned integer and is the decimal equivalent for the ID hex string used in the web interface and the Gmail API

I have not checked whether these redundant copies have the same X-GM-MSGID, or whether these also differ between versions, and only X-Universally-Unique-Identifier and be used to detect the redundant versions.

In any case, Google is handling it properly.

Sorry about all of the separate posts, but this forum software would not let me put the two or three previous in a single reply. “Not allowed more than two links”, Although for the life of me I couldn’t find the links. the text that I just posted is a bit munched by my attempts to make the links not be identified

How about you try reproducing it yourself, surely somebody in eMclient has both an iPhone and Gmail?

I have spent enough time on this.