View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003518 | SOGo | ActiveSync | public | 2016-02-11 15:07 | 2016-05-06 12:04 |
| Reporter | McMichaeli | Assigned To | ludovic | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Platform | Client | OS | Google Android | OS Version | 6.0.1 |
| Product Version | 3.0.1 | ||||
| Fixed in Version | 3.1.0 | ||||
| Summary | 0003518: vCard birthday (BDAY) field incremented by one day after ActiveSync with Android | ||||
| Description | When a contact (vCard) is synchronised to Android via EAS the BDAY field is incremented by one day. This was verified on a Google Nexus 5 running Android 6.0.1 (Marshmallow). | ||||
| Steps To Reproduce | Log into the SOGo web interface and create a new contact in your personal address book. For example (viewed in raw source): BEGIN:VCARD Wait for ActiveSync to detect the changes and propagate the record to the Contacts app in Android. View the contact and observe that the birthday is incremented by a day (in this case 12 February 2000). Export the Android contacts to a .vcf (in the Contacts app menu) and view the file created to show the error in the file: BEGIN:VCARD | ||||
| Tags | No tags attached. | ||||
|
Fixed in 3.0.2 and 2.3.9. |
|
|
Sorry, just had a chance to test against v3.0.2 with exactly the same client and server platforms as the original report. Before testing a "sogo-tool manage-eas resetdevice" was carried out and the account settings removed from the Android device. It was then re-configured, left to sync and the following record added via webmail: BEGIN:VCARD Exporting it to a .vcf from the Nexus 5 after ActiveSync results in: BEGIN:VCARD Both client and server are set to London, England timezone. Is there anything else I can provide to help track this down? |
|
|
I cannot reproduce the problem. |
|
|
This also happens on IOS9 |
|
|
A raw vcard + a sogo.log with SOGoEASDebugEnabled = YES should help to understand the problem. |
|
|
Can you please test with latest code and if it is still not working for you provide following infos: |
|
|
Am I correct in thinking I also need to test on a system with bug 0003579 fixed and create a fresh vCard for this patch to take effect? If this is the case, as I am using SOGo v3, is the http://inverse.ca/ubuntu-nightly-v3 repository all up and running now? |
|
|
Please test with latest nightly, it contains a fix (3579) which might be related. |
|
|
Just checked this fix against the nightly build 3.0.2.20160428-1. If I try today's date (2016-04-28) then the BDAY field syncs correctly via ActiveSync. However, if I use the data from the original bug report (2000-02-11) then it is displayed as 12th February after ActiveSync. Here is the entire record I tested with, viewed as raw source from the web interface: BEGIN:VCARD Short of trying every date between today and 11th February 2000 to find where it begins to break, what else can I do to help you debug this further? |
|
|
Please provide the infos requested some time ago: |
|
|
sogo.log (11,758 bytes)
May 05 16:21:03 sogod [10692]: 192.0.2.111 "POST /SOGo/so/usera@example.net/Contacts/personal/29C4-572B6480-1-4F5AF180.vcf/saveAsContact HTTP/1.1" 200 57/185 0.013 - - 4K
May 05 16:21:03 sogod [10692]: 192.0.2.111 "GET /SOGo/so/usera@example.net/Contacts/personal/29C4-572B6480-1-4F5AF180.vcf/view HTTP/1.1" 200 321/0 0.014 - - 64K
May 05 16:21:03 sogod [10696]: 192.0.2.111 "GET /SOGo/so/usera@example.net/Contacts/personal/view?asc=1&partial=1&search=name_or_address&sort=c_cn&value= HTTP/1.1" 200 32646/0 0.054 - - 256K
May 05 16:21:05 sogod [10697]: <0x0x7f45456638b8[SOGoActiveSyncDispatcher]> Sleeping 20 seconds while detecting changes in Ping...
May 05 16:21:05 sogod [10698]: <0x0x7f45456641a8[SOGoActiveSyncDispatcher]> Sleeping 20 seconds while detecting changes in Ping...
May 05 16:21:10 sogod [10697]: <0x0x7f45456638b8[SOGoActiveSyncDispatcher]> Sleeping 15 seconds while detecting changes in Ping...
May 05 16:21:10 sogod [10698]: <0x0x7f45456641a8[SOGoActiveSyncDispatcher]> Sleeping 15 seconds while detecting changes in Ping...
May 05 16:21:15 sogod [10697]: <0x0x7f45456638b8[SOGoActiveSyncDispatcher]> Sleeping 10 seconds while detecting changes in Ping...
May 05 16:21:15 sogod [10698]: <0x0x7f45456641a8[SOGoActiveSyncDispatcher]> Sleeping 10 seconds while detecting changes in Ping...
May 05 16:21:20 sogod [10697]: <0x0x7f45456638b8[SOGoActiveSyncDispatcher]> Sleeping 5 seconds while detecting changes in Ping...
May 05 16:21:20 sogod [10698]: <0x0x7f45456641a8[SOGoActiveSyncDispatcher]> Sleeping 5 seconds while detecting changes in Ping...
May 05 16:21:25 sogod [10697]: <0x0x7f45456638b8[SOGoActiveSyncDispatcher]> Sleeping 30 seconds while detecting changes in Ping...
May 05 16:21:25 sogod [10698]: <0x0x7f45456641a8[SOGoActiveSyncDispatcher]> Change detected using Ping, we let the EAS client know to send a Sync.
May 05 16:21:25 sogod [10698]: <0x0x7f45456641a8[SOGoActiveSyncDispatcher]> EAS - response for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Ping xmlns="Ping:">
<Status>2</Status>
<Folders>
<Folder>vcard%2Fpersonal</Folder>
</Folders>
</Ping>
May 05 16:21:25 sogod [10698]: 192.0.2.118 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Ping&User=usera%40example.net&DeviceId=androidxxxxxx6125&DeviceType=Android HTTP/1.1" 200 35/344 571.067 - - 13M
May 05 16:21:27 sogod [10698]: <0x0x7f4545aed5e8[SOGoActiveSyncDispatcher]> EAS - request for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>1461921924</SyncKey>
<CollectionId>vcard%2Fpersonal</CollectionId>
<DeletesAsMoves/>
<GetChanges/>
<WindowSize>10</WindowSize>
<Options>
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>
<TruncationSize>200000</TruncationSize>
</BodyPreference>
</Options>
</Collection>
</Collections>
</Sync>
May 05 16:21:27 sogod [10698]: <0x0x7f4545aed5e8[SOGoActiveSyncDispatcher]> Change detected during Sync, we push the content.
May 05 16:21:27 sogod [10698]: <0x0x7f4545aed5e8[SOGoActiveSyncDispatcher]> EAS - response for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<Class>Contacts</Class>
<SyncKey>1462461663</SyncKey>
<CollectionId>vcard%2Fpersonal</CollectionId>
<Status>1</Status>
<Commands>
<Add>
<ServerId>29C4-572B6480-1-4F5AF180.vcf</ServerId>
<ApplicationData>
<LastName xmlns="Contacts:">Doe</LastName>
<FirstName xmlns="Contacts:">John</FirstName>
<Department xmlns="Contacts:"/>
<IMAddress xmlns="Contacts2:"/>
<NickName xmlns="Contacts2:"/>
<JobTitle xmlns="Contacts:"/>
<Birthday xmlns="Contacts:">2000-02-11T12:00:00.000Z</Birthday>
<Body xmlns="AirSyncBase:">
<Type>1</Type>
<EstimatedDataSize>0</EstimatedDataSize>
<Data/>
</Body>
</ApplicationData>
</Add>
</Commands>
</Collection>
</Collections>
</Sync>
May 05 16:21:27 sogod [10698]: 192.0.2.118 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=usera%40example.net&DeviceId=androidxxxxxx6125&DeviceType=Android HTTP/1.1" 200 167/73 0.023 - - 120K
May 05 16:21:28 sogod [10698]: <0x0x7f4545a91338[SOGoActiveSyncDispatcher]> EAS - request for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<FolderSync xmlns="FolderHierarchy:">
<SyncKey>woody_example_net_6a75_1cc6cad8_8</SyncKey>
</FolderSync>
May 05 16:21:29 sogod [10698]: <0x0x7f4545a91338[SOGoActiveSyncDispatcher]> EAS - response for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<FolderSync xmlns="FolderHierarchy:">
<Status>1</Status>
<SyncKey>woody_example_net_6a75_1cc6cad8_8</SyncKey>
<Changes>
<Count>0</Count>
</Changes>
</FolderSync>
May 05 16:21:29 sogod [10698]: 192.0.2.118 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=FolderSync&User=usera%40example.net&DeviceId=androidxxxxxx6125&DeviceType=Android HTTP/1.1" 200 58/46 0.395 - - 236K
May 05 16:21:29 sogod [10698]: <0x0x7f4545b03668[SOGoActiveSyncDispatcher]> EAS - request for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>1462375475</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>
May 05 16:21:29 sogod [10698]: 192.0.2.118 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=usera%40example.net&DeviceId=androidxxxxxx6125&DeviceType=Android HTTP/1.1" 200 0/79 0.021 - - 0
May 05 16:21:29 sogod [10698]: <0x0x7f4545a9b958[SOGoActiveSyncDispatcher]> EAS - request for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>1462392990</SyncKey>
<CollectionId>vevent%2Fuserb_A_example_D_co_D_uk_personal</CollectionId>
<DeletesAsMoves/>
<GetChanges/>
<WindowSize>10</WindowSize>
<Options>
<FilterType>4</FilterType>
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>
<TruncationSize>200000</TruncationSize>
</BodyPreference>
</Options>
</Collection>
</Collections>
</Sync>
May 05 16:21:29 sogod [10698]: 192.0.2.118 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=usera%40example.net&DeviceId=androidxxxxxx6125&DeviceType=Android HTTP/1.1" 200 0/109 0.028 - - 0
May 05 16:21:29 sogod [10698]: <0x0x7f4545b15338[SOGoActiveSyncDispatcher]> EAS - request for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>1462284690</SyncKey>
<CollectionId>vevent%2Fuserc_A_example_D_co_D_uk_personal</CollectionId>
<DeletesAsMoves/>
<GetChanges/>
<WindowSize>10</WindowSize>
<Options>
<FilterType>4</FilterType>
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>
<TruncationSize>200000</TruncationSize>
</BodyPreference>
</Options>
</Collection>
</Collections>
</Sync>
May 05 16:21:29 sogod [10698]: 192.0.2.118 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=usera%40example.net&DeviceId=androidxxxxxx6125&DeviceType=Android HTTP/1.1" 200 0/109 0.016 - - 0
May 05 16:21:29 sogod [10698]: <0x0x7f4545c34718[SOGoActiveSyncDispatcher]> EAS - request for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>1462458806</SyncKey>
<CollectionId>vevent%2Fuserd_A_example_D_co_D_uk_personal</CollectionId>
<DeletesAsMoves/>
<GetChanges/>
<WindowSize>10</WindowSize>
<Options>
<FilterType>4</FilterType>
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>
<TruncationSize>200000</TruncationSize>
</BodyPreference>
</Options>
</Collection>
</Collections>
</Sync>
May 05 16:21:29 sogod [10698]: 192.0.2.118 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=usera%40example.net&DeviceId=androidxxxxxx6125&DeviceType=Android HTTP/1.1" 200 0/108 0.014 - - 0
May 05 16:21:30 sogod [10698]: <0x0x7f4545afb828[SOGoActiveSyncDispatcher]> EAS - request for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>1462461663</SyncKey>
<CollectionId>vcard%2Fpersonal</CollectionId>
<DeletesAsMoves/>
<GetChanges/>
<WindowSize>10</WindowSize>
<Options>
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>
<TruncationSize>200000</TruncationSize>
</BodyPreference>
</Options>
</Collection>
</Collections>
</Sync>
May 05 16:21:30 sogod [10698]: 192.0.2.118 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=usera%40example.net&DeviceId=androidxxxxxx6125&DeviceType=Android HTTP/1.1" 200 0/73 0.011 - - 0
May 05 16:21:30 sogod [10698]: <0x0x7f4545a4b468[SOGoActiveSyncDispatcher]> EAS - request for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Sync xmlns="AirSync:">
<Collections>
<Collection>
<SyncKey>1462027224</SyncKey>
<CollectionId>vcard%2Fuserc_A_example_D_co_D_uk_personal</CollectionId>
<DeletesAsMoves/>
<GetChanges/>
<WindowSize>10</WindowSize>
<Options>
<BodyPreference xmlns="AirSyncBase:">
<Type>1</Type>
<TruncationSize>200000</TruncationSize>
</BodyPreference>
</Options>
</Collection>
</Collections>
</Sync>
May 05 16:21:30 sogod [10698]: 192.0.2.118 "POST /SOGo/Microsoft-Server-ActiveSync?Cmd=Sync&User=usera%40example.net&DeviceId=androidxxxxxx6125&DeviceType=Android HTTP/1.1" 200 0/103 0.011 - - 0
May 05 16:21:30 sogod [10697]: <0x0x7f45456638b8[SOGoActiveSyncDispatcher]> Sleeping 25 seconds while detecting changes in Ping...
May 05 16:21:30 sogod [10698]: <0x0x7f4545c33d58[SOGoActiveSyncDispatcher]> EAS - request for device androidxxxxxx6125: <?xml version="1.0"?>
<!DOCTYPE ActiveSync PUBLIC "-//MICROSOFT//DTD ActiveSync//EN" "http://www.microsoft.com/">
<Ping xmlns="Ping:">
<HeartbeatInterval>900</HeartbeatInterval>
<Folders>
<Folder>
<Id>vevent%2Fpersonal</Id>
<Class>Calendar</Class>
</Folder>
<Folder>
<Id>vevent%2Fuserb_A_example_D_co_D_uk_personal</Id>
<Class>Calendar</Class>
</Folder>
<Folder>
<Id>vevent%2Fuserc_A_example_D_co_D_uk_personal</Id>
<Class>Calendar</Class>
</Folder>
<Folder>
<Id>vevent%2Fuserd_A_example_D_co_D_uk_personal</Id>
<Class>Calendar</Class>
</Folder>
<Folder>
<Id>vcard%2Fpersonal</Id>
<Class>Contacts</Class>
</Folder>
<Folder>
<Id>vcard%2Fuserc_A_example_D_co_D_uk_personal</Id>
<Class>Contacts</Class>
</Folder>
</Folders>
</Ping>
May 05 16:21:30 sogod [10698]: <0x0x7f4545c33d58[SOGoActiveSyncDispatcher]> Sleeping 30 seconds while detecting changes in Ping...
|
|
|
|
|
|
Sorry, I was unsure if these were still relevant in light of my new discovery that the result varies according to the calendar day selected. I have uploaded an anonymised sogo.log and screenshot of the timezone in my account using nightly build 3.0.2.20160505-1. sogo.conf has: SOGoTimeZone = Europe/London; The source of the vCard (displayed in the web interface) used for this test was: BEGIN:VCARD Although a display name (FN) is shown when the entry is created there appears to be a bug in this nightly build that does not write it to the vCard. This is a different issue, so please let me know if you'd like another bug report for it? Android 6 (same release as the previous tests) on a Nexus 5 still reports the birthday as 12 February 2000. The timezone on the Nexus is set to automatic but reports "GMT+01:00 British Summer Time". Please let me know if you need anything else? |
|
|
Can you please produce another sogo.log with a date which is ok. |
|
|
[NGVCard+SOGo birthday] returns the birthday with a time portion (12:00) I cannot reproduce the issue with tz europe/vienna but when using europe/london the date is off by 1 for dates outside the summer time period. Accoding to https://msdn.microsoft.com/en-us/library/ee203040%28v=exchg.80%29.aspx After removing the time portion the problem doesn't occur, but I've just tested with OL and a HTC desire. Attached patch removes the time portion for EAS. |
|
|
3518.diff (830 bytes)
diff --git a/ActiveSync/NGVCard+ActiveSync.m b/ActiveSync/NGVCard+ActiveSync.m
index 357bc7b..2ccac61 100644
--- a/ActiveSync/NGVCard+ActiveSync.m
+++ b/ActiveSync/NGVCard+ActiveSync.m
@@ -565,13 +565,10 @@ NSLog(@"tfu remove element %@", element);
// Other, less important fields
if ((o = [self birthday]))
{
- NSTimeZone *userTimeZone;
- userTimeZone = [[[context activeUser] userDefaults] timeZone];
-
[s appendFormat: @"<Birthday xmlns=\"Contacts:\">%@</Birthday>",
[[o dateByAddingYears: 0 months: 0 days: 0
- hours: 0 minutes: 0
- seconds: ([userTimeZone secondsFromGMTForDate: o])*-1]
+ hours: -12 minutes: 0
+ seconds: 0]
activeSyncRepresentationInContext: context]];
}
|
|
|
https://github.com/inverse-inc/sogo/commit/8aa452539ad672baa6c023c5f557631893111feb |
|
|
sogo: master 4f1ce3f2 2016-02-11 15:04 Details Diff |
(fix) avoid EAS bday offset (fixes 0003518) + small fix in previous commit |
Affected Issues 0003518 |
|
| mod - ActiveSync/NGVCard+ActiveSync.m | Diff File | ||
| mod - ActiveSync/SOGoActiveSyncDispatcher.m | Diff File | ||
|
sogo: v2 456ff7d5 2016-02-11 15:04 Details Diff |
(fix) avoid EAS bday offset (fixes 0003518) + small fix in previous commit |
Affected Issues 0003518 |
|
| mod - ActiveSync/NGVCard+ActiveSync.m | Diff File | ||
| mod - ActiveSync/SOGoActiveSyncDispatcher.m | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-02-11 15:07 | McMichaeli | New Issue | |
| 2016-02-11 20:05 | ludovic | Changeset attached | => sogo master 4f1ce3f2 |
| 2016-02-11 20:05 | ludovic | Assigned To | => ludovic |
| 2016-02-11 20:05 | ludovic | Resolution | open => fixed |
| 2016-02-11 20:07 | ludovic | Changeset attached | => sogo v2 456ff7d5 |
| 2016-02-11 20:08 | ludovic | Note Added: 0009513 | |
| 2016-02-11 20:08 | ludovic | Status | new => resolved |
| 2016-03-11 16:01 | McMichaeli | Note Added: 0009711 | |
| 2016-03-11 16:01 | McMichaeli | Status | resolved => feedback |
| 2016-03-11 16:01 | McMichaeli | Resolution | fixed => reopened |
| 2016-03-11 21:55 | tfu | Note Added: 0009716 | |
| 2016-03-12 07:48 | rklootwijk | Note Added: 0009720 | |
| 2016-03-12 08:43 | tfu | Note Added: 0009723 | |
| 2016-03-16 20:17 | tfu | Note Added: 0009763 | |
| 2016-03-17 14:58 | McMichaeli | Note Added: 0009782 | |
| 2016-03-17 14:58 | McMichaeli | Status | feedback => assigned |
| 2016-03-17 15:18 | tfu | Note Added: 0009783 | |
| 2016-03-23 13:28 | ludovic | Status | assigned => resolved |
| 2016-03-23 13:28 | ludovic | Fixed in Version | => 3.1.0 |
| 2016-03-23 13:28 | ludovic | Resolution | reopened => fixed |
| 2016-04-28 15:40 | McMichaeli | Note Added: 0010033 | |
| 2016-04-28 15:40 | McMichaeli | Status | resolved => feedback |
| 2016-04-28 15:40 | McMichaeli | Resolution | fixed => reopened |
| 2016-05-05 09:32 | tfu | Note Added: 0010046 | |
| 2016-05-05 15:44 | McMichaeli | File Added: sogo.log | |
| 2016-05-05 15:44 | McMichaeli | File Added: Screenshot from 2016-05-05 16:25:17.png | |
| 2016-05-05 15:55 | McMichaeli | Note Added: 0010047 | |
| 2016-05-05 15:55 | McMichaeli | Status | feedback => assigned |
| 2016-05-05 19:17 | tfu | Note Added: 0010049 | |
| 2016-05-05 20:30 | tfu | Note Added: 0010050 | |
| 2016-05-05 20:31 | tfu | File Added: 3518.diff | |
| 2016-05-06 12:04 | ludovic | Note Added: 0010051 | |
| 2016-05-06 12:04 | ludovic | Status | assigned => resolved |
| 2016-05-06 12:04 | ludovic | Resolution | reopened => fixed |