View Issue Details

IDProjectCategoryView StatusLast Update
0002972SOGoActiveSyncpublic2014-11-14 10:44
ReporterRaido Assigned Toludovic  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Platform[Client] MicrosoftOSWindowsOS Version7
Product Version2.2.9a 
Target Version2.2.10Fixed in Version2.2.10 
Summary0002972: Outlook 2013 ActiveSync stuck on Waiting for server response
Description

Hello,

My customer has quite large inbox (0002405:0006000 emails). He have't used activesync for 2 weeks. Now when he opened, Outlook won't sync emails. It will stuck on "Waiting for server response". Synced only email that was sent when outlook was open, not older ones.

TagsNo tags attached.

Activities

tfu

tfu

2014-10-31 09:53

reporter   ~0007645

Do you get old emails when you do some changes on them? >mark them as unread/read

Raido

Raido

2014-10-31 10:03

reporter   ~0007646

I set up a fresh profile. It synced all emails.

tfu

tfu

2014-10-31 10:32

reporter   ~0007647

Without the steps to reproduce I just can do some guessing.
I assume that it happens that outlook send a sync request with getChanges=fales and if that is the first call after a long "break" it currently set the syncKey to the latest value and this ignores all previous emails on the next sync request.

The attached patch should fix that. Due to lake of time it is not tested. Maybe somebody can do some testing with it and provide feedback.

tfu

tfu

2014-10-31 10:32

reporter  

0001-getChanges-syncKey.patch (1,192 bytes)   
From 134bc3fc24cd43279e8ab48ab018896a659beff3 Mon Sep 17 00:00:00 2001
From: root <root@poldi.hopto.org>
Date: Fri, 31 Oct 2014 15:11:53 +0100
Subject: [PATCH] getChanges - syncKey

---
 ActiveSync/SOGoActiveSyncDispatcher+Sync.m |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m
index 86a2e5c..0b90a2e 100644
--- a/ActiveSync/SOGoActiveSyncDispatcher+Sync.m
+++ b/ActiveSync/SOGoActiveSyncDispatcher+Sync.m
@@ -1071,7 +1071,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
           else 
             nameInCache = [collection nameInContainer];
           
-          if (![[self _folderMetadataForKey: nameInCache]  objectForKey: @"MoreAvailable"])
+          // use the SyncKey saved by processSyncGetChanges - if processSyncGetChanges is not called (because of getChanges=false) SyncKey has the value of the previous sync.
+          davCollectionTag = [[self _folderMetadataForKey: nameInCache]  objectForKey: @"SyncKey"];
+
+          if (davCollectionTag)
             davCollectionTag = [collection davCollectionTag];
         }
       
-- 
1.7.10.4

0001-getChanges-syncKey.patch (1,192 bytes)   
tfu

tfu

2014-11-01 16:04

reporter   ~0007649

I found some time to do some tests... There is some more work needed to fix the issue. Although the patch is working for email folders there will be an issue that dup events will be created on the client sending new events.
-> syncCache is needed for calendar and contacts folder.

Raido

Raido

2014-11-04 10:46

reporter   ~0007653

Can you specify dup events part?
Does it mean that duplicate events are created when client creates new event?

tfu

tfu

2014-11-04 11:51

reporter   ~0007654

Yes, this can happen with the patch. If there is no change on the server the event will sent to the client as an addition on each sync since the serverKey doesn't change. -> more work is needed to fix this...

ludovic

ludovic

2014-11-14 10:44

administrator   ~0007680

Fixed with:

https://github.com/inverse-inc/sogo/commit/b3cd609ae76414237db120fd76545afe11f6346b

and:

https://github.com/inverse-inc/sogo/commit/3872341a85c4e54a5671bde5e414c58c1ebca19e

Please try the upcoming nightly builds.

Issue History

Date Modified Username Field Change
2014-10-29 07:48 Raido New Issue
2014-10-31 09:53 tfu Note Added: 0007645
2014-10-31 10:03 Raido Note Added: 0007646
2014-10-31 10:32 tfu Note Added: 0007647
2014-10-31 10:32 tfu File Added: 0001-getChanges-syncKey.patch
2014-11-01 16:04 tfu Note Added: 0007649
2014-11-04 10:46 Raido Note Added: 0007653
2014-11-04 11:51 tfu Note Added: 0007654
2014-11-07 15:42 ludovic Target Version => 2.2.10
2014-11-14 10:44 ludovic Note Added: 0007680
2014-11-14 10:44 ludovic Status new => resolved
2014-11-14 10:44 ludovic Fixed in Version => 2.2.10
2014-11-14 10:44 ludovic Resolution open => fixed
2014-11-14 10:44 ludovic Assigned To => ludovic