Results 1 to 9 of 9

Thread: Nexus 5 Android 4.4 Kit Kat <--> Zimbra Active Sync Bug

  1. #1
    JpMaxMan is offline Active Member
    Join Date
    Sep 2007
    Location
    Brookly, NY
    Posts
    47
    Rep Power
    7

    Default Nexus 5 Android 4.4 Kit Kat <--> Zimbra Active Sync Bug

    Just wanted to let the community know that there appears to be a bug with the Active Sync protocol in the latest Android 4.4 released on the Nexus 5. It is being reported here:

    https://productforums.google.com/d/m...k/4GpCX-KHrA4J

    https://code.google.com/p/android/is...sort=&id=61785

    I am experiencing the same problem. The symptoms are roughly:

    1. Setup a "corporate" account using the native client
    2. Enter all relevant details which are confirmed
    3. First batch of e-mails, contacts and calendar come down fine
    4. The device will no longer receive new e-mail messages
    5. Upon further inspection the device is stuck in a continual sync loop
    6. This not only stops it from receiving e-mails but also drains the battery

    Hope this helps someone from banging their head against the wall!

  2. #2
    psurana is offline Zimbra Employee
    Join Date
    May 2013
    Posts
    1
    Rep Power
    2

    Default

    Hello,
    It looks like people are experiencing the issue with Microsoft exchange server too.

    Can you please provide debug logs?
    Please follow the steps below to capture the log.

    1. Add zimbra sync log level to TRACE
    zmprov aal <account name> zimbra.sync trace

    2. re-configure/setup the account on device.

    3. Follow the steps as described and capture the /opt/zimbra/log/sync.log {Please do not grep the log by user/account name as it will not provide xml dump of requests and responses.}

    4. You can open product bug and attach log file.

  3. #3
    jojolafleur is offline Starter Member
    Join Date
    Nov 2013
    Posts
    1
    Rep Power
    1

    Default

    Hello,

    I''ve have exaclty the same issue... Any Solutions ?

    thank you

  4. #4
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,470
    Rep Power
    56

    Default

    Quote Originally Posted by jojolafleur View Post
    I''ve have exaclty the same issue... Any Solutions ?
    How about reading the post above yours and providing the information that's been requested?
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  5. #5
    JpMaxMan is offline Active Member
    Join Date
    Sep 2007
    Location
    Brookly, NY
    Posts
    47
    Rep Power
    7

    Default

    Quote Originally Posted by psurana View Post
    Hello,
    It looks like people are experiencing the issue with Microsoft exchange server too.

    Can you please provide debug logs?
    Please follow the steps below to capture the log.

    1. Add zimbra sync log level to TRACE
    zmprov aal <account name> zimbra.sync trace

    2. re-configure/setup the account on device.

    3. Follow the steps as described and capture the /opt/zimbra/log/sync.log {Please do not grep the log by user/account name as it will not provide xml dump of requests and responses.}

    4. You can open product bug and attach log file.
    Yes, considering it is across the board with active sync providers including lotus - I don't think it is a problem on Zimbra's end.

    However, as I might have some time I will try to get this info and I will also send it to Google.

  6. #6
    Klug's Avatar
    Klug is offline Moderator
    Join Date
    Mar 2006
    Location
    Beaucaire, France
    Posts
    2,316
    Rep Power
    13

    Default

    The Zimbra bug is here: https://bugzilla.zimbra.com/show_bug.cgi?id=85070

    A client-side fix (for the smartphones and tablets) should be pushed by Google in the next OTA update of the device.

  7. #7
    techman83 is offline New Member
    Join Date
    Feb 2013
    Posts
    4
    Rep Power
    2

    Default

    For those needing a fix sooner you can do some magic with apache. (If someone knows how to do this with Nginx, I'd love to hear it).

    You need to set up a reverse proxy in the usual manner.

    Download Cmake,make,make install the latest version of libwbxml2 - Available here: libwbxml | Free software downloads at SourceForge.net

    Then add the following to your reverse proxy virtual host
    Code:
            RewriteEngine On
            RewriteCond %{QUERY_STRING} ^(?:.*&)?Cmd=(Sync).*$
            RewriteRule ^ - [env=sync]
    
            ExtFilterDefine decode enableenv=sync mode=input cmd="/bin/wbxml2xml -l ACTIVESYNC - -o -"
            ExtFilterDefine fixandroid enableenv=sync mode=input cmd="/bin/sed 's/<WindowSize>0</<WindowSize>10</i'"
            ExtFilterDefine encode enableenv=sync mode=input cmd="/bin/xml2wbxml -a - -o -"
            
            <LocationMatch "^/Microsoft-Server-ActiveSync">
                  SetInputFilter encode;fixandroid;decode
                  ExtFilterOptions LogStderr 
            </LocationMatch>
    Note, I did this on an ubuntu 12.04 install and I had to upgrade to a really modern version of Apache via this ppa:
    https://launchpad.net/~nightuser/+archive/apache2

    If nginx can do it, It would be dead trivial to add if you were running a Zimbra proxy server.

    It would be just adding this line here
    Code:
    if ($args ~ "^Cmd=(Sync)") {
        run external script here eg "/bin/wbxml2xml -l ACTIVESYNC - -o - | /bin/sed 's/<WindowSize>0</<WindowSize>10</i | /bin/xml2wbxml -a - -o"
    }
    What is going on is the devices are sending a window size of 0, essentially asking for no data

    Code:
    <?xml version="1.0"?>
    <!DOCTYPE AirSync PUBLIC "-//AIRSYNC//DTD AirSync//EN" "http://www.microsoft.com/">
    <Sync xmlns="http://synce.org/formats/airsync_wm5/airsync">
     <Collections>
      <Collection>
       <SyncKey></SyncKey>
       <CollectionId>2</CollectionId>
       <DeletesAsMoves>1</DeletesAsMoves>
       <GetChanges/>
       <WindowSize>0</WindowSize>
       <Options>
        <FilterType>1</FilterType>
        <BodyPreference xmlns="http://synce.org/formats/airsync_wm5/airsyncbase">
         <Type>2</Type>
         <TruncationSize>200000</TruncationSize>
        </BodyPreference>
       </Options>
      </Collection>
     </Collections>
    </Sync>
    Unfortunately it's binary encoded, so a simple subfilter isn't up to the task. It has to be decoded, window size changed and then re-encoded.

    The fix will also be in the next release of Zimbra according to support.

    Leon

  8. #8
    liverpoolfcfan's Avatar
    liverpoolfcfan is offline Outstanding Member
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    710
    Rep Power
    6

    Default

    Quote Originally Posted by techman83 View Post
    What is going on is the devices are sending a window size of 0, essentially asking for no data
    It is not actually asking for no data. According the the latest ActiveSync specs (regarding WindowSize)

    The WindowSize element appears only in requests that are sent to the server from the client. If the WindowSize element is omitted, the server behaves as if a WindowSize element with a value of 100 were submitted. The server interprets the value 0 (zero) and values above 512 as 512.
    The problem is that the zimbra ActiveSync implementation appears to be treating the 0 as ZERO - instead of treating it as 512 which is what it should do.

  9. #9
    techman83 is offline New Member
    Join Date
    Feb 2013
    Posts
    4
    Rep Power
    2

    Default

    Quote Originally Posted by liverpoolfcfan View Post
    It is not actually asking for no data. According the the latest ActiveSync specs (regarding WindowSize)



    The problem is that the zimbra ActiveSync implementation appears to be treating the 0 as ZERO - instead of treating it as 512 which is what it should do.
    My mistake, I shouldn't pretend that I understand ActiveSync fully, I only learnt enough to work around the problem!

    Though It would seem our exchange/groupwise bretheren were not immune to the issue. One of those occaisions where what the specs say and how people implement them are 2 very different things!

    Leon

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. "Active-Sync" and Android?
    By jfmoore in forum Zimbra Mobile
    Replies: 8
    Last Post: 06-25-2014, 05:34 AM
  2. Zimbra OSS to Android sync
    By bjquinn in forum Mobility
    Replies: 25
    Last Post: 01-07-2014, 02:00 PM
  3. Zimbra 7 does not sync new Android Tablet
    By gizmoza in forum Mobility
    Replies: 1
    Last Post: 06-16-2011, 12:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •