Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0002609SOGoActiveSyncpublic2014-03-05 14:08
Reportervinyard Assigned Toludovic  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSCentOSOS Version6.5
Product Versionnightly v2 
Fixed in Version2.2.1 
Summary0002609: Exception when using ActiveSync with Android 4.4.2 (Email)
Description

Hi,

I receive the following in sogo.log when attempting to sync email from and android device:
EXCEPTION: <NSException: 0x7f8984890068> NAME:NSInvalidArgumentException REASON:-[NGImap4Client fetchModseqForUid:]: unrecognized selector sent to instance 0x7f89847cd2c8 INFO:(null)

I've attached a full backtrace. Let me know if I can provide more info.

Thanks.

Steps To Reproduce

Try to sync email with activesync on android device.

Additional Information

sogo-2.2.0.20140220-1.centos6.x86_64
sogo-activesync-2.2.0.20140220-1.centos6.x86_64

TagsNo tags attached.

Relationships

related to 0002589 closedludovic Crash when using ActiveSync with Outlook 2013 

Activities

vinyard

vinyard

2014-02-20 22:00

reporter  

sogo.txt (14,774 bytes)   
#0  -[NSException raise] (self=0x7ffff89432e8, _cmd=0x7ffff569fd60) at NSException.m:956
No locals.
#1  0x00007ffff51beb82 in +[NSException raise:format:arguments:] (self=0x7ffff569f980, _cmd=0x7ffff569fd30, 
    name=0x7ffff569f3a0, format=0x7ffff571ed20, argList=0x7fffffffcd80) at NSException.m:849
        reason = 0x7ffff8943258
        except = 0x7ffff89432e8
#2  0x00007ffff51beac9 in +[NSException raise:format:] (self=0x7ffff569f980, _cmd=0x7ffff571f190, name=0x7ffff569f3a0, 
    format=0x7ffff571ed20) at NSException.m:835
        args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffffffce70, reg_save_area = 0x7fffffffcda0}}
#3  0x00007ffff52d7187 in gs_objc_msg_forward2 (receiver=0x7ffff885a2d8, sel=0x7fffe7aa0b40) at GSFFIInvocation.m:193
        c = 0x7ffff68dc1e0
        frame = 0x7ffff885a370
        cframe = 0x0
        cclosure = 0x7ffff7de4725
        sig = 0x0
        memory = 0x7ffff56815c0
        types = 0x0
#4  0x00007ffff4b8e165 in __objc_get_forward_imp (rcv=<value optimized out>, sel=0x7fffe7aa0b40)
    at /usr/src/debug/gcc-4.4.7-20120601/libobjc/sendmsg.c:103
        result = <value optimized out>
#5  0x00007fffe7879460 in -[SOGoMailFolder davCollectionTagFromId:] (self=0x7ffff88740e8, _cmd=0x7fffe6740c30, 
    theId=0x7ffff88def98) at SOGoMailFolder.m:1940
        result = 0x7ffff880ef78
        modseq = 0
        uid = 384
        tag = 0x7fffe7a9ecc0
#6  0x00007fffe652cb57 in -[SOGoActiveSyncDispatcher(Sync) processSyncCollection:inBuffer:changeDetected:] (
    self=0x7ffff88232b8, _cmd=0x7fffe6740c70, theDocumentElement=0x7ffff87aed08, theBuffer=0x7ffff8785c28, 
    changeDetected=0x7fffffffd0df "") at SOGoActiveSyncDispatcher+Sync.m:823
        collectionId = 0x7ffff8840688
        realCollectionId = 0x7ffff880edc8
        syncKey = 0x7ffff8877078
        davCollectionTag = 0x7ffff8877078
        bodyPreferenceType = 0x7ffff8877b78
        lastServerKey = 0x7ffff88def98
        folderType = ActiveSyncMailFolder
        collection = 0x7ffff88740e8
        value = 0x7ffff8877538
        changeBuffer = 0x7ffff880f078
        commandsBuffer = 0x7ffff880ef78
        getChanges = 1 '\001'
        first_sync = 0 '\000'
        windowSize = 10
#7  0x00007fffe652d109 in -[SOGoActiveSyncDispatcher(Sync) processSync:inResponse:] (self=0x7ffff88232b8, 
    _cmd=0x7ffff87ebf10, theDocumentElement=0x7ffff87f69c8, theResponse=0x7ffff87913f8)
    at SOGoActiveSyncDispatcher+Sync.m:995
        defaults = 0x7ffff83f9958
        aCollection = 0x7ffff87aed08
        output = 0x7ffff8837128
        s = 0x7ffff8785c28
        allCollections = 0x7ffff880b6f8
        d = 0x7ffff4b8d599
        i = 0
        j = 0
        defaultInterval = 30
        heartbeatInterval = 30
        internalInterval = 10
        changeDetected = 0 '\000'
#8  0x00007ffff52113e9 in -[NSObject performSelector:withObject:withObject:] (self=0x7ffff88232b8, 
    _cmd=0x7fffe673f250, aSelector=0x7ffff87ebf10, object1=0x7ffff87f69c8, object2=0x7ffff87913f8) at NSObject.m:2038
        msg = 0x7fffe652cdfe <-[SOGoActiveSyncDispatcher(Sync) processSync:inResponse:]>
#9  0x00007fffe6529fd9 in -[SOGoActiveSyncDispatcher dispatchRequest:inResponse:context:] (self=0x7ffff88232b8, 
    _cmd=0x7fffe73f95e0, theRequest=0x7ffff87842d8, theResponse=0x7ffff87913f8, theContext=0x7ffff87bb4b8)
    at SOGoActiveSyncDispatcher.m:1560
        documentElement = 0x7ffff87f69c8
        builder = 0x7ffff87f9bf8
        dom = 0x7ffff87b24d8
        aSelector = 0x7ffff87ebf10
        cmdName = 0x7ffff88371f8
        deviceId = 0x7ffff87ede18
        d = 0x7ffff87f99d8
#10 0x00007fffe71f29f2 in -[SOGoMicrosoftActiveSyncActions microsoftServerActiveSyncAction] (self=0x7ffff880a8b8, 
    _cmd=0x7ffff87ebf50) at SOGoMicrosoftActiveSyncActions.m:55
        response = 0x7ffff87913f8
        request = 0x7ffff87842d8
        bundle = 0x7ffff8533dc8
        ex = 0x7fffffffd250
        dispatcher = 0x7ffff88232b8
        clazz = 0x7fffe673e8c0
#11 0x00007ffff5211186 in -[NSObject performSelector:] (self=0x7ffff880a8b8, _cmd=0x7ffff6d787e0, 
    aSelector=0x7ffff87ebf50) at NSObject.m:1985
        msg = 0x7fffe71f2874 <-[SOGoMicrosoftActiveSyncActions microsoftServerActiveSyncAction]>
#12 0x00007ffff6a40c50 in -[WODirectAction performActionNamed:] (self=0x7ffff880a8b8, _cmd=0x7ffff6e025b0, 
    _actionName=0x7ffff87f9ab8) at WODirectAction.m:97
        actionSel = 0x7ffff87ebf50
        rng = {location = 2147483647, length = 0}
#13 0x00007ffff6ad006f in -[SoActionInvocation callOnObject:withPositionalParametersWhenNotNil:inContext:] (
    self=0x7ffff880a048, _cmd=0x7ffff6e025e0, _client=0x7ffff837f528, _positionalArgs=0x0, _ctx=0x7ffff87bb4b8)
    at SoActionInvocation.m:300
        method = 0x7ffff880a8b8
        result = 0x0
#14 0x00007ffff6ad01b5 in -[SoActionInvocation callOnObject:inContext:] (self=0x7ffff880a048, _cmd=0x7ffff6dfead0, 
    _client=0x7ffff837f528, _ctx=0x7ffff87bb4b8) at SoActionInvocation.m:316
No locals.
#15 0x00007ffff6ac9fda in -[SoObjectMethodDispatcher dispatchInContext:] (self=0x7ffff8823298, _cmd=0x7ffff6e001d0, 
    _ctx=0x7ffff87bb4b8) at SoObjectMethodDispatcher.m:191
        pool = 0x7ffff877e938
        rq = 0x7ffff87842d8
        httpMethod = 0x7ffff6d9a8e0
        clientObject = 0x7ffff837f528
        methodObject = 0x7ffff880a048
        resultObject = 0x7ffff87bb4b8
#16 0x00007ffff6acc763 in -[SoObjectRequestHandler handleRequest:inContext:session:application:] (self=0x7ffff8501ca8, 
    _cmd=0x7ffff6d87c80, _rq=0x7ffff87842d8, _ctx=0x7ffff87bb4b8, _sn=0x0, app=0x7ffff837f528)
    at SoObjectRequestHandler.m:584
        dispatcher = 0x7ffff8823298
        r = 0x0
        object = 0x7ffff880a048
        authenticator = 0x7ffff87c8848
        doDispatch = 1 '\001'
#17 0x00007ffff6a53f88 in -[WORequestHandler handleRequest:] (self=0x7ffff8501ca8, _cmd=0x7ffff6d52b80, 
    _request=0x7ffff87842d8) at WORequestHandler.m:237
        startHandling = 0
        app = 0x7ffff837f528
        response = 0x0
        context = 0x7ffff87bb4b8
        thread = 0x7ffff82fcd68
        sessionId = 0x0
        session = 0x0
        uri = 0x7ffff8810518
#18 0x00007ffff6a0f9dc in -[WOCoreApplication dispatchRequest:usingHandler:] (self=0x7ffff837f528, 
    _cmd=0x7ffff6d52be0, _request=0x7ffff87842d8, handler=0x7ffff8501ca8) at WOCoreApplication.m:712
        startDispatch = 0
        response = 0x0
        startDispatch = 0
#19 0x00007ffff6a0fd38 in -[WOCoreApplication dispatchRequest:] (self=0x7ffff837f528, _cmd=0x7ffff8201160, 
    _request=0x7ffff87842d8) at WOCoreApplication.m:752
        handler = 0x7ffff8501ca8
#20 0x00007ffff7ff98a9 in -[SOGo dispatchRequest:] (self=0x7ffff837f528, _cmd=0x7ffff6de90d0, _request=0x7ffff87842d8)
    at SOGo.m:453
        runLoopModes = 0x7ffff882da38
        debugOn = 0 '\000'
        resp = 0x7ffff87a8888
        startDate = 0x7fffffffd770
        timeDelta = 6.953349573345124e-310
        objc_super = {self = 0x7ffff837f528, super_class = 0x7ffff6df8aa0}
#21 0x00007ffff6ab9770 in -[WOHttpTransaction _run] (self=0x7ffff87edc58, _cmd=0x7ffff6de9100)
    at WOHttpTransaction.m:596
No locals.
#22 0x00007ffff6ab9b42 in -[WOHttpTransaction run] (self=0x7ffff87edc58, _cmd=0x7ffff6de6d80)
    at WOHttpTransaction.m:649
        ok = 1 '\001'
#23 0x00007ffff6ab501f in -[WOHttpAdaptor runConnection:] (self=0x7ffff872e528, _cmd=0x7ffff6de6e20, 
    _socket=0x7ffff87aefc8) at WOHttpAdaptor.m:367
        tx = 0x7ffff87edc58
#24 0x00007ffff6ab5273 in -[WOHttpAdaptor _handleAcceptedConnection:] (self=0x7ffff872e528, _cmd=0x7ffff6de6e30, 
    _connection=0x7ffff87aefc8) at WOHttpAdaptor.m:401
        t = 6.9533467970025645e-310
#25 0x00007ffff6ab56d8 in -[WOHttpAdaptor _handleConnection:] (self=0x7ffff872e528, _cmd=0x7ffff6de6ee0, 
    connection=0x7ffff87aefc8) at WOHttpAdaptor.m:460
No locals.
#26 0x00007ffff6ab5bc8 in -[WOHttpAdaptor acceptConnection:] (self=0x7ffff872e528, _cmd=0x7ffff6de6d40, 
    _notification=0x7ffff8837568) at WOHttpAdaptor.m:521
No locals.
#27 0x00007ffff5202e2f in -[NSNotificationCenter _postAndRelease:] (self=0x7ffff8300ae8, _cmd=0x7ffff56bea50, 
    notification=0x7ffff8837568) at NSNotificationCenter.m:1223
        o = 0x7ffff8303910
        count = 0
        name = 0x7ffff60c74e0
        object = 0x7ffff86bc429
        n = 0x0
        m = 0x7ffff86773f0
        i = {{addr = 140737357297936, ext = 0x7ffff8303910}, {addr = 140737305969364, ext = 0x7ffff52102d4}, {
            addr = 140737310561968, ext = 0x7ffff56716b0}, {addr = 140737362752920, ext = 0x7ffff8837598}, {
            addr = 140737488345600, ext = 0x7fffffffda00}, {addr = 140737305097481, ext = 0x7ffff513b509}, {addr = 0, 
            ext = 0x0}, {addr = 140737362753016, ext = 0x7ffff88375f8}, {addr = 140737310919728, 
            ext = 0x7ffff56c8c30}, {addr = 140737362752920, ext = 0x7ffff8837598}, {addr = 140737362752920, 
            ext = 0x7ffff8837598}, {addr = 4117690784, ext = 0xf56ef9a0}, {addr = 140737362752920, 
            ext = 0x7ffff8837598}, {addr = 140737358305624, ext = 0x7ffff83f9958}, {addr = 140737362752360, 
            ext = 0x7ffff8837368}, {addr = 140737362752360, ext = 0x7ffff8837368}, {addr = 140737488345664, 
            ext = 0x7fffffffda40}, {addr = 140737358305624, ext = 0x7ffff83f9958}, {addr = 140737306457361, 
            ext = 0x7ffff5287511}, {addr = 0, ext = 0x0}, {addr = 0, ext = 0x0}, {addr = 140737306685138, 
            ext = 0x7ffff52beed2}, {addr = 140737362752352, ext = 0x7ffff8837360}, {addr = 140737311241856, 
            ext = 0x7ffff5717680}, {addr = 140737488345696, ext = 0x7fffffffda60}, {addr = 140737306697344, 
            ext = 0x7ffff52c1e80}, {addr = 140737362752352, ext = 0x7ffff8837360}, {addr = 140737311241856, 
            ext = 0x7ffff5717680}, {addr = 140737488345760, ext = 0x7fffffffdaa0}, {addr = 140737305967575, 
            ext = 0x7ffff520fbd7}, {addr = 140737488345744, ext = 0x7fffffffda90}, {addr = 140737362752360, 
            ext = 0x7ffff8837368}, {addr = 38654705666, ext = 0x900000002}, {addr = 140737311241856, 
            ext = 0x7ffff5717680}, {addr = 140737362752352, ext = 0x7ffff8837360}, {addr = 140737310493376, 
            ext = 0x7ffff5660ac0}, {addr = 140737488345792, ext = 0x7fffffffdac0}, {addr = 140737305969364, 
            ext = 0x7ffff52102d4}, {addr = 140737310494336, ext = 0x7ffff5660e80}, {addr = 4169364328, 
            ext = 0xf8837368}, {addr = 140737488345840, ext = 0x7fffffffdaf0}, {addr = 4111472672, ext = 0xf5101820}, {
            addr = 140737362246920, ext = 0x7ffff87bbd08}, {addr = 140737362246920, ext = 0x7ffff87bbd08}, {
            addr = 140737488345888, ext = 0x7fffffffdb20}, {addr = 140737357286120, ext = 0x7ffff8300ae8}, {addr = 40, 
            ext = 0x28}, {addr = 140737294233216, ext = 0x7ffff46dee80}, {addr = 140737306457361, 
            ext = 0x7ffff5287511}, {addr = 0, ext = 0x0}, {addr = 0, ext = 0x0}, {addr = 140737291000209, 
            ext = 0x7ffff43c9991}, {addr = 140737362752872, ext = 0x7ffff8837568}, {addr = 140737310877760, 
            ext = 0x7ffff56be840}, {addr = 140737357286120, ext = 0x7ffff8300ae8}, {addr = 140737488345952, 
            ext = 0x7fffffffdb60}, {addr = 140737358305624, ext = 0x7ffff83f9958}, {addr = 140737306793272, 
            ext = 0x7ffff52d9538}, {addr = 140737357172832, ext = 0x7ffff82e5060}, {addr = 140737310877760, 
            ext = 0x7ffff56be840}, {addr = 140737488346000, ext = 0x7fffffffdb90}, {addr = 140737305966538, 
            ext = 0x7ffff520f7ca}, {addr = 140737362752872, ext = 0x7ffff8837568}, {addr = 140737310877760, 
            ext = 0x7ffff56be840}}
        b = {ptr = 0x7fffffffd980, count = 1, cap = 64, old = 0, zone = 0x7ffff5717680}
        a = 0x7fffffffdb80
#28 0x00007ffff5203152 in -[NSNotificationCenter postNotificationName:object:userInfo:] (self=0x7ffff8300ae8, 
    _cmd=0x7ffff56bea60, name=0x7ffff60c74e0, object=0x7ffff86bc428, info=0x0) at NSNotificationCenter.m:1282
        notification = 0x7ffff8837568
#29 0x00007ffff5202fe1 in -[NSNotificationCenter postNotificationName:object:] (self=0x7ffff8300ae8, 
    _cmd=0x7ffff60c76d0, name=0x7ffff60c74e0, object=0x7ffff86bc428) at NSNotificationCenter.m:1262
No locals.
#30 0x00007ffff5e7cea2 in -[NSObject(FileObjectWatcher) receivedEvent:type:extra:forMode:] (self=0x7ffff86bc428, 
    _cmd=0x7ffff57455d0, _fdData=0x7, _type=ET_RDESC, _extra=0x7, _mode=0x7ffff56e0fa0) at NSRunLoop+FileObjects.m:57
        nc = 0x7ffff8300ae8
#31 0x00007ffff5320635 in -[GSRunLoopCtxt pollUntil:within:] (self=0x7ffff85648c8, _cmd=0x7ffff56e2160, 
    milliseconds=8527, contexts=0x7ffff8578a68) at GSRunLoopCtxt.m:632
        fd = 7
        watcher = 0x7ffff85e9388
        found = 0 '\000'
        threadInfo = 0x7ffff85ce008
        poll_return = 1
        fdEnd = 2
        fdIndex = 1
        fdFinish = 0
        count = 4294967295
        i = 4294967295
        immediate = 0 '\000'
        __PRETTY_FUNCTION__ = "-[GSRunLoopCtxt pollUntil:within:]"
#32 0x00007ffff525078a in -[NSRunLoop acceptInputForMode:beforeDate:] (self=0x7ffff84a6858, _cmd=0x7ffff56e21a0, 
    mode=0x7ffff56e0fa0, limit_date=0x7ffff8780148) at NSRunLoop.m:1198
        context = 0x7ffff85648c8
        ti = 8.5275760293006897
        timeout_ms = 8527
        savedMode = 0x0
        arp = 0x7ffff877e7c8
        __PRETTY_FUNCTION__ = "-[NSRunLoop acceptInputForMode:beforeDate:]"
#33 0x00007ffff5250b99 in -[NSRunLoop runMode:beforeDate:] (self=0x7ffff84a6858, _cmd=0x7ffff6d52a70, 
    mode=0x7ffff56e0fa0, date=0x7ffff8564f28) at NSRunLoop.m:1266
        arp = 0x7ffff85e93c8
        d = 0x7ffff8564f28
#34 0x00007ffff6a0f170 in -[WOCoreApplication run] (self=0x7ffff837f528, _cmd=0x7ffff8200f80)
    at WOCoreApplication.m:584
        loop = 0x7ffff84a6858
        limitDate = 0x7ffff8564f28
        pool = 0x7ffff85e9568
#35 0x00007ffff7ff8f1d in -[SOGo run] (self=0x7ffff837f528, _cmd=0x7ffff6d74000) at SOGo.m:277
        objc_super = {self = 0x7ffff837f528, super_class = 0x7ffff6df8aa0}
#36 0x00007ffff6a3cb3e in WOApplicationMain (_appClassName=0x7ffff81ff4c0, argc=13, argv=0x7fffffffe5d8)
    at WOApplicationMain.m:42
        app = 0x7ffff837f528
        pool = 0x7ffff8499918
#37 0x00007ffff6a6059d in WOWatchDogApplicationMain (appName=0x7ffff81ff4c0, argc=13, argv=0x7fffffffe5d8)
    at WOWatchDogApplicationMain.m:1048
        pool = 0x7ffff83651c8
        ud = 0x7ffff8363cf8
        logFile = 0x7ffff83a3b98
        nsPidFile = 0x7ffff83a42e8
        rc = 0
        i = 2
        childPid = 0
        processInfo = 0x7ffff825b3d8
        WOAppClass = 0x7ffff8200be0
#38 0x00007ffff7ff80ed in main (argc=13, argv=0x7fffffffe5d8, env=0x7fffffffe648) at sogod.m:53
        pool = 0x7ffff832eb68
        sd = 0x7ffff83f9958
        rc = 0
sogo.txt (14,774 bytes)   
ludovic

ludovic

2014-02-25 18:11

administrator   ~0006565

You've upgraded SOGo but not SOPE - that's your problem.

vinyard

vinyard

2014-02-25 19:09

reporter   ~0006566

I'm not so sure how much more up-to-date I can get:

sogo-2.2.0.20140225-1.centos6
sogo-activesync-2.2.0.20140225-1.centos6
sogo-debuginfo-2.2.0.20140225-1.centos6
sogo-openchange-backend-2.2.0.20140225-1.centos6
sogo-tool-2.2.0.20140225-1.centos6
sope49-appserver-4.9-20140225_1664.el6.1
sope49-cards-2.2.0.20140225-1.centos6
sope49-core-4.9-20140225_1664.el6.1
sope49-debuginfo-4.9-20140225_1664.el6.1
sope49-gdl1-4.9-20140225_1664.el6.1
sope49-gdl1-contentstore-2.2.0.20140225-1.centos6
sope49-gdl1-postgresql-4.9-20140225_1664.el6.1
sope49-ldap-4.9-20140225_1664.el6.1
sope49-mime-4.9-20140225_1664.el6.1
sope49-sbjson-2.3.1-20140225_1664.el6.1
sope49-xml-4.9-20140225_1664.el6.1

Above is what I've installed on my system currently, still get the same outcome. Am I missing something?

ludovic

ludovic

2014-02-25 19:57

administrator   ~0006567

Actually you are right - a commit was missing (and was just pushed). Expect updated packages soon.

vinyard

vinyard

2014-02-25 19:58

reporter   ~0006568

Last edited: 2014-02-25 20:00

I can see that the missing method has been added a few minutes ago.

https://github.com/inverse-inc/sope/commit/ab13ed37694d3dd18d4e8b69973b1d71ab00a5fd

I'll test when a new build becomes available.

Thanks.

vinyard

vinyard

2014-02-25 20:00

reporter   ~0006569

Beat me to it. :)

vinyard

vinyard

2014-02-26 19:52

reporter  

android_exchange.txt (1,790 bytes)   
02-26 11:24:29.978 I/ActivityManager(456): Start proc com.google.android.exchange for service com.google.android.exchange/com.android.exchange.service.EmailSyncAdapterService: pid=18081 uid=10038 gids={50038, 3003, 1028, 1015}
02-26 11:24:53.236 E/AndroidRuntime(18081): Process: com.google.android.exchange, PID: 18081
02-26 11:24:53.236 E/AndroidRuntime(18081): 	at com.android.exchange.adapter.EmailSyncParser.addData(EmailSyncParser.java:140)
02-26 11:24:53.236 E/AndroidRuntime(18081): 	at com.android.exchange.adapter.EmailSyncParser.addParser(EmailSyncParser.java:343)
02-26 11:24:53.236 E/AndroidRuntime(18081): 	at com.android.exchange.adapter.EmailSyncParser.commandsParser(EmailSyncParser.java:657)
02-26 11:24:53.236 E/AndroidRuntime(18081): 	at com.android.exchange.adapter.AbstractSyncParser.parse(AbstractSyncParser.java:177)
02-26 11:24:53.236 E/AndroidRuntime(18081): 	at com.android.exchange.adapter.EmailSyncParser.parse(EmailSyncParser.java:741)
02-26 11:24:53.236 E/AndroidRuntime(18081): 	at com.android.exchange.service.EasSyncHandler.parse(EasSyncHandler.java:302)
02-26 11:24:53.236 E/AndroidRuntime(18081): 	at com.android.exchange.service.EasSyncHandler.performOneSync(EasSyncHandler.java:363)
02-26 11:24:53.236 E/AndroidRuntime(18081): 	at com.android.exchange.service.EasSyncHandler.performSync(EasSyncHandler.java:428)
02-26 11:24:53.236 E/AndroidRuntime(18081): 	at com.android.exchange.service.EmailSyncAdapterService$SyncAdapterImpl.syncMailbox(EmailSyncAdapterService.java:866)
02-26 11:24:53.236 E/AndroidRuntime(18081): 	at com.android.exchange.service.EmailSyncAdapterService$SyncAdapterImpl.onPerformSync(EmailSyncAdapterService.java:781)
02-26 11:25:17.603 I/ActivityManager(456): Process com.google.android.exchange (pid 18081) has died.
android_exchange.txt (1,790 bytes)   
vinyard

vinyard

2014-02-26 19:52

reporter   ~0006573

With today's update I no longer receive the exception but exchange services on android just crash so email fails to sync. This is on Android 4.4.2, I won't be able to test it on older versions until later tonight. I've attached exchange android log although it really doesn't seem to show much.

ludovic

ludovic

2014-02-26 19:57

administrator   ~0006574

If you look at the code on Android:

            case Tags.EMAIL_DATE_RECEIVED:
                msg.mTimeStamp = Utility.parseEmailDateTimeToMillis(getValue());
                break;

Is it possible you have a mail in your mailbox with no Date field?

IIRC, the Date field is mandatory in the AS response, but we add it conditionally in our code:

// DateReceived
value = [self date];
if (value)
[s appendFormat: @"<DateReceived xmlns=\"Email:\">%@</DateReceived>", [value activeSyncRepresentationWithoutSeparatorsInContext: context]];

vinyard

vinyard

2014-02-26 20:37

reporter  

email-test.txt (2,012 bytes)   
Return-Path: <username@gmail.com>
Delivered-To: johndoe@domainname.net
Received: from dc.vnet.internal (dc.vnet.internal [10.8.27.3])
        by mx.vnet.internal (Postfix) with ESMTP id C7DB67D0
        for <johndoe@domainname.net>; Wed, 26 Feb 2014 12:14:09 -0800 (PST)
Received: from mail-ve0-f195.google.com (mail-ve0-f195.google.com [209.85.128.195])
        by dc.vnet.internal (Postfix) with ESMTP id 9AAC8120258
        for <johndoe@domainname.net>; Wed, 26 Feb 2014 12:14:08 -0800 (PST)
Received: by mail-ve0-f195.google.com with SMTP id jy13so324633veb.10
        for <johndoe@domainname.net>; Wed, 26 Feb 2014 12:14:07 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:date:message-id:subject:from:to:content-type;
        bh=H+LadAsoM5DzMh04GUJkdOnP1zggMqPzImD9+KwDR0s=;
        b=LuGm4BoTOIpyvMt+uptlaOF14f3m7vs/h7Ea3EKu1WJbkEiYafMIV7H1q6MNI82PGk
         rwueL+mpWwyIONcj7BzNhfGW5hDlvutnjChwkjj/44/TukpVaKyiq4GEthG+aqH283w7
         Rs0Rc7oalCcrAQ+ZPxY1Efg5EV2QzUuXprWSP8Ippxu43xEoKyx5QI97mf4HOTe0i3tW
         +asbMMZEylIL5iKYahsXok5pNWo4cerM3Dkcs9ZA/Zuabk5hbNQP35W4wVnnnbKpuwv4
         yNCQ090cEAdDggxu9Vg14xWqvt3Ku4WCbxKYTf6kI3Dw8ck8v35mkSrmFTinOLwkRu22
         AZlA==
MIME-Version: 1.0
X-Received: by 10.52.29.113 with SMTP id j17mr6189594vdh.22.1393445647891;
 Wed, 26 Feb 2014 12:14:07 -0800 (PST)
Received: by 10.220.227.72 with HTTP; Wed, 26 Feb 2014 12:14:07 -0800 (PST)
Date: Wed, 26 Feb 2014 12:14:07 -0800
Message-ID: <CAMYxiYxfY6Nq7eM4G_ZVzeKMfopKVNHCYyftzBJ1VS=PX0Da0w@mail.gmail.com>
Subject: testing
From: User Name <username@gmail.com>
To: johndoe@domainname.net
Content-Type: multipart/alternative; boundary=20cf3079bf14db437f04f354d885

--20cf3079bf14db437f04f354d885
Content-Type: text/plain; charset=ISO-8859-1

Testing this simple message.

--20cf3079bf14db437f04f354d885
Content-Type: text/html; charset=ISO-8859-1

<div dir="ltr">Testing this simple message.</div>

--20cf3079bf14db437f04f354d885--
email-test.txt (2,012 bytes)   
vinyard

vinyard

2014-02-26 20:37

reporter   ~0006575

I took a quick look at the mailbox and didn't find any emails without a date field. (I'll take a more thorough look in a bit) I did test an empty mailbox which went fine but as soon as I had a message in the mailbox exchange services on android crashed again. I've attached the single email I have in this test mailbox.

ludovic

ludovic

2014-02-26 20:54

administrator   ~0006576

For testing purposes, can you try with an other AS client? Like an iPhone/iPad.

One more thing you could try is to replace, from SOGoMailObject+ActiveSync.m:

value = [self date];
if (value)
[s appendFormat: @"<DateReceived xmlns=\"Email:\">%@</DateReceived>", [value activeSyncRepresentationWithoutSeparatorsInContext: context]];

by:

value = [self date];
if (value)
[s appendFormat: @"<DateReceived xmlns=\"Email:\">%@</DateReceived>", [value activeSyncRepresentationInContext: context]];

This change WILL break other AS clients, but it might work for Android v4.4.

vinyard

vinyard

2014-02-27 17:57

reporter   ~0006580

I've tested ActiveSync with an iPad (iOS 7.0.6) and it was successful with some minor display issues; Displays <null> instead of email address when sender name is not present and receive date for all emails is sync time instead of the correct email received date. I'll create seperate bug reports for these later. It wasn't exactly straight forward building sope & sogo from git on CentOS but I was finally able to get both to build. Once I configure it and get it running I will test the above code.

ludovic

ludovic

2014-02-27 18:34

administrator   ~0006581

That's great, thanks!

Fiddle with the code in SOGoMailObject+ActiveSync.m - activeSyncRepresentationInContext. You should have no problem enabling/disabling some properties until you find the culprit one.

Don't forget to do a make/make install in SOGo/ActiveSync to deploy the bundle and restart sogod.

Thanks!

casastorta

casastorta

2014-03-03 09:12

reporter   ~0006586

Guys,

When Android sync of e-mails doesn't work, then it throws this into the Android's syslog:

I/qtaguid ( 1707): Untagging socket 38 failed errno=-22
W/NetworkManagementSocketTagger( 1707): untagSocket(38) failed with errno -22
E/INBOXtest@**.hr: Uncaught exception in EasSyncServicejava.lang.NumberFormatException: Invalid int: "T2"
E/INBOXtest@**.hr: Sync ended due to an exception.

vinyard

vinyard

2014-03-03 20:25

reporter   ~0006612

Last edited: 2014-03-04 23:01

Thanks to casastorta, I took a closer look at the ReceivedDate format in the XML response.

Using the change in SOGoMailObject+ActiveSync.m provided by Ludovic works except there is an extra Hyphen being added in [NSDate activeSyncRepresentationInContext:] in NSDate+ActiveSync.m

This: (Notice the hyphen before T in the calendar format)

  • (NSString ) activeSyncRepresentationInContext: (WOContext ) context
    {
    return [self descriptionWithCalendarFormat: @"%Y-%m-%d-T%H:%M:%S.%FZ" timeZone: [NSTimeZone timeZoneWithName: @"GMT"] locale: nil];
    }

Should be changed to this:

  • (NSString ) activeSyncRepresentationInContext: (WOContext ) context
    {
    return [self descriptionWithCalendarFormat: @"%Y-%m-%dT%H:%M:%S.%FZ" timeZone: [NSTimeZone timeZoneWithName: @"GMT"] locale: nil];
    }

I've made this change and compiled it and now I have android syncing email through activesync.

Edit: attached small patch

vinyard

vinyard

2014-03-04 23:01

reporter  

0001-Fix-date-format-returned-by-activeSyncRepresentation.patch (980 bytes)   
From 144c2326ce0fbc6b0c9688b47b79fa2ac9853d43 Mon Sep 17 00:00:00 2001
From: David Rivera <vinyard@vnetgaming.net>
Date: Tue, 4 Mar 2014 14:42:14 -0800
Subject: [PATCH] Fix date format returned by
 -activeSyncRepresentationInContext in NSDate+activeSync.m

---
 ActiveSync/NSDate+ActiveSync.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ActiveSync/NSDate+ActiveSync.m b/ActiveSync/NSDate+ActiveSync.m
index ed3e98b..bd7035a 100644
--- a/ActiveSync/NSDate+ActiveSync.m
+++ b/ActiveSync/NSDate+ActiveSync.m
@@ -36,7 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 - (NSString *) activeSyncRepresentationInContext: (WOContext *) context
 {
-  return [self descriptionWithCalendarFormat: @"%Y-%m-%d-T%H:%M:%S.%FZ"  timeZone: [NSTimeZone timeZoneWithName: @"GMT"]  locale: nil];
+  return [self descriptionWithCalendarFormat: @"%Y-%m-%dT%H:%M:%S.%FZ"  timeZone: [NSTimeZone timeZoneWithName: @"GMT"]  locale: nil];
 }
 
 
-- 
1.7.12.4

ludovic

ludovic

2014-03-05 14:08

administrator   ~0006634

Nice catch!

https://github.com/inverse-inc/sogo/commit/158af711528027cd63a3c70708fab96eee41dd19

Issue History

Date Modified Username Field Change
2014-02-20 22:00 vinyard New Issue
2014-02-20 22:00 vinyard File Added: sogo.txt
2014-02-25 15:01 Christian Mack Relationship added related to 0002589
2014-02-25 18:11 ludovic Note Added: 0006565
2014-02-25 18:11 ludovic Status new => closed
2014-02-25 18:11 ludovic Assigned To => ludovic
2014-02-25 18:11 ludovic Resolution open => won't fix
2014-02-25 19:09 vinyard Note Added: 0006566
2014-02-25 19:09 vinyard Status closed => feedback
2014-02-25 19:09 vinyard Resolution won't fix => reopened
2014-02-25 19:57 ludovic Note Added: 0006567
2014-02-25 19:58 vinyard Note Added: 0006568
2014-02-25 19:58 vinyard Status feedback => assigned
2014-02-25 20:00 vinyard Note Added: 0006569
2014-02-25 20:00 vinyard Note Edited: 0006568
2014-02-26 19:52 vinyard File Added: android_exchange.txt
2014-02-26 19:52 vinyard Note Added: 0006573
2014-02-26 19:57 ludovic Note Added: 0006574
2014-02-26 20:37 vinyard File Added: email-test.txt
2014-02-26 20:37 vinyard Note Added: 0006575
2014-02-26 20:54 ludovic Note Added: 0006576
2014-02-27 17:57 vinyard Note Added: 0006580
2014-02-27 18:34 ludovic Note Added: 0006581
2014-03-03 09:12 casastorta Note Added: 0006586
2014-03-03 20:25 vinyard Note Added: 0006612
2014-03-04 23:01 vinyard File Added: 0001-Fix-date-format-returned-by-activeSyncRepresentation.patch
2014-03-04 23:01 vinyard Note Edited: 0006612
2014-03-05 14:08 ludovic Note Added: 0006634
2014-03-05 14:08 ludovic Status assigned => closed
2014-03-05 14:08 ludovic Resolution reopened => fixed
2014-03-05 14:08 ludovic Fixed in Version => 2.2.1