View Issue Details

IDProjectCategoryView StatusLast Update
0005598SOGoActiveSyncpublic2022-12-22 11:10
Reporterplantroon Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformGoogleOSAndroidOS Version6.0-12.0
Product Version5.7.1 
Summary0005598: EAS Calendar does not sync more than 1 last month of events
Description

Any Android calendar app won't sync more than 1 month of events over EAS. I tried on multiple phones.

A bit of a speculation, but this could be connected to another issue where random mails start going missing on Android EAS clients (IMAP and sogo webUI are unaffected).

Steps To Reproduce

On any Android phone add an EAS account which has more than one month of events going into the past. Try viewing those events in a Calendar app. I tried Google Calendar but remember the same happening with other apps.

Tagsactive sync, android, calendar

Activities

Christian Mack

Christian Mack

2022-09-09 09:54

developer   ~0016213

As far as I know, that is a limitation of the calendar apps on android.
They always will only sync recurring events, that are still active and events back to 1 month.

Nothing SOGo can change.

plantroon

plantroon

2022-09-12 16:07

reporter   ~0016219

I tried this with a random EAS provider I found - mailo.com, and it syncs more than 1 month in the past (non-recurring of course). I am not using EAS on Android with SOGo since I couldn't find multiple events and e-mails and some contact details due to it. Of course I understand its limitations but some seem like bugs, like the one being reported. I have another one where e-mails randomly go missing but I have no way at all to reproduce it reliably. It is extremely random and affects all Android EAS clients I tried (Samsung Mail and Gmail) - they probably use the same backend (don't take my word for it though)

plantroon

plantroon

2022-11-18 16:43

reporter   ~0016398

I learned that Z-Push (another implementation of ActiveSync) has an option where one can limit how many months backwards the Calendar syncs - maybe Sogo implicitly limits this to 1 month?

tfu

tfu

2022-11-18 18:28

reporter   ~0016400

Can you please set SOGoEASDebugEnabled = YES and check sogo.log for the FilterType value is included in the requests?

e.g.
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/&quot;>
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>1667208225</SyncKey>
<CollectionId>vevent%2Fpersonal</CollectionId>
<GetChanges/>
<WindowSize>25</WindowSize>
<Options>
<FilterType>7</FilterType> <<<<<<<<<<<<<<<<<<<<<<<<<<<<
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>

plantroon

plantroon

2022-11-19 18:24

reporter   ~0016402

<Collections>
<Collection>
<SyncKey>-1</SyncKey>
<CollectionId>vevent%2Fpersonal</CollectionId>
<DeletesAsMoves/>
<GetChanges/>
<WindowSize>10</WindowSize>
<Options>
<FilterType>4</FilterType>
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>
<TruncationSize>200000</TruncationSize>
</BodyPreference>
</Options>
</Collection>
</Collections>

tfu

tfu

2022-11-20 18:16

reporter   ~0016405

<FilterType>4</FilterType> means that the device requests objects that are dated within the time window of 2 weeks.
See https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-ascmd/de626aea-ce53-40c2-abcf-19eb8213ea6c

plantroon

plantroon

2022-11-20 20:24

reporter   ~0016407

Is this entirely under the client's control though? As I said before, I tried mailo.com and it synced further back over EAS. On the calendar side, there is no way to set this in any of the calendar apps, yet only Sogo syncs up to last month (or even 2 weeks apparently).

I am going to clean out my little testing environment and check again, if the setting in gmail/samsung mail app affects calendar syncing too as that is the only place where I can set how far back I want the sync to go - no calendar has such options, in fact calendar apps on Android don't seem to have their own accounts, the calendar apps only read what is "already" on the phone synced via other means (davxdroid caldav, gmail eas, samsung mail eas..)

plantroon

plantroon

2022-12-22 11:10

reporter   ~0016509

I tested mailo.com and tine groupware for a longer period of time. They exhibit the same behavior. The old events are viewable for some period of time, then they disappear from the Calendar. Not after the sync period, but in a few hours or even immediately. Like I can see a June 2022 event, then I resync and it's gone with no way of getting it back other than readding the account. When using Samsung Email's EAS feature, this does not happen. I always set everything to sync all events, but the Gmail app (in combination with Android's calendar system) is not capable of this and I do not see any way to set the Calendar's sync period. The Samsung Email app has this and works flawlessly (more or less).

Therefore, I consider this a client-side problem - the Gmail app is bugged, as always. Since EAS does not allow me to use all my calendars in the way I want anyway, I'll just continue with CalDAV. I sent feedback from within the Gmail app and Google's Calendar app, but I doubt that anyone cares :(

Just to reduce possible confusion - by Gmail app I mean the Android's EAS functionality, it has scope outside Gmail's app, it may have separate services/apps that take care of this. Even on my old Nexus 5 with Android 6, the behavior is the same as on my Galaxy S10e with Android 12.

For reference, the Gmail app's filter type seems to always be set to the 2 weeks for Calendar (mail is respecting the in-app setting at 0 - no filtering, only calendar is the problem with no way to change it):

Gmail app:

<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/&quot;>
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>1668975241</SyncKey>
<CollectionId>vevent%2Fpersonal</CollectionId>
<DeletesAsMoves/>
<GetChanges/>
<WindowSize>10</WindowSize>
<Options>
<FilterType>4</FilterType>
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>
<TruncationSize>200000</TruncationSize>
</BodyPreference>
</Options>
</Collection>
</Collections>
</Sync>

Samsung Mail has an option to change Calendar sync period and works correctly:

<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/&quot;>
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>1670931799</SyncKey>
<CollectionId>vevent%2Fpersonal</CollectionId>
<DeletesAsMoves/>
<GetChanges/>
<WindowSize>25</WindowSize>
<Options>
<FilterType>0</FilterType>
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>
<TruncationSize>400000</TruncationSize>
</BodyPreference>
</Options>
</Collection>
</Collections>
</Sync>

Issue History

Date Modified Username Field Change
2022-09-07 22:18 plantroon New Issue
2022-09-07 22:18 plantroon Tag Attached: active sync
2022-09-07 22:18 plantroon Tag Attached: android
2022-09-07 22:18 plantroon Tag Attached: calendar
2022-09-09 09:54 Christian Mack Note Added: 0016213
2022-09-12 16:07 plantroon Note Added: 0016219
2022-11-18 16:43 plantroon Note Added: 0016398
2022-11-18 18:28 tfu Note Added: 0016400
2022-11-19 18:24 plantroon Note Added: 0016402
2022-11-20 18:16 tfu Note Added: 0016405
2022-11-20 20:24 plantroon Note Added: 0016407
2022-12-22 11:10 plantroon Note Added: 0016509