6.0.0-beta1
7/6/25

[#10277] ActiveSync Calendar and Tasks not working
Summary ActiveSync Calendar and Tasks not working
Queue Horde Base
Queue Version 4.0.6
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester p.gruber (at) aon (dot) at
Created 06/26/2011 (5124 days ago)
Due
Updated 06/29/2011 (5121 days ago)
Assigned 06/27/2011 (5123 days ago)
Resolved 06/29/2011 (5121 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/29/2011 03:45:40 PM Michael Rubinsky Comment #10
State ⇒ Resolved
Reply to this comment
Resolving this, as the only remaining issue I see in this report is 
due to the PHP timezone issues.
06/29/2011 03:44:39 PM Michael Rubinsky Comment #9 Reply to this comment
Alright. After working with the dev of Touchdown for a few days, he 
has acknowledged that it does not follow the protocol for version 2.5 
servers. It is unlikely that he will fix this anytime soon as he 
doesn't want to "rock the boat in that section of code to avoid 
causing stability issues".

I refactored the way PING requests are handled a bit in our code to be 
a little friendlier to broken clients. There were also some places in 
the rpc layer that weren't properly catching exceptions etc...

This should fix the issues with at least the TouchDown client.
06/27/2011 01:21:00 AM Michael Rubinsky Comment #8
State ⇒ Feedback
Reply to this comment
Ok. Here is what's happening with TouchDown:

Since it is sending an incorrect command order, the data needed to 
*properly* execute a sync is missing.

Normally, a SYNC is issued that polls for events within the device's 
configured time window. The time this sync is performed is persisted 
so that subsequent PING requests poll for changes only since this last 
sync time. Since the SYNC is never performed, there is no previous 
sync time - so ALL events must be polled. For me, this is close to 
2000 events, so this takes quite some time. When the server timed out, 
it was usually involved in timezone computation since this is also a 
relatively long operation. This led to weird output over wire.  Not 
sure if this is also what is happening to the reporter of the other 
bug or not...

Anyway, with current Git code, sync continues to work perfectly on iOS 
devices, native android, and (if the server does not timeout) with 
TouchDown. Once NitroDesk fixes this issue, this should no longer 
happen.

The result of this is that *all* events for a user are polled during 
the PING (normally, this is limited to polling for changes since the 
last sync/ping time).
06/27/2011 12:55:30 AM Michael Rubinsky Comment #7 Reply to this comment
On further inspection I'm *not* getting the same timezone issue from 
the other bug. I was hitting a timeout since I had over 1000 events 
that needed to be sync'd. Once I raised the timeout limit, things 
started working normally.
06/26/2011 11:15:53 PM Michael Rubinsky Comment #6 Reply to this comment
The Touchdown Client has a auto-detect feature at setup-time. 
(Activesync Only, exchange 2003 and exchange 2007). Probably this is 
the cause of the PING before SYNC issue.
No. Version detection for AS is done via the http headers. This is 
caused by the client getting back what is essentially garbage from the 
server when it issues the SETTINGS request. I've cleaned up the code a 
bit to make it fail a little bit cleaner, but it still fails. I'm 
working with NitroDesk, trying a number of different builds they are 
providing trying to help them narrow down the problem.
Another possibility is: i did not check whether the other Android 
Client (native) was still active when provisioning the Touchdown 
client.
It was, but I can tell which request came from which client in the logs.
The good thing (but even bad for me): i could reproduce the timezone 
issue in Bug 10194.
When i commented out the line in kronolith/lib/Event.php
Yes, I am having a similar issue now as well - but *only* when using 
TouchDown - not the native android app. Since this code contains 
*nothing* obtained directly from the client, I'm led to believe that 
something else earlier in the request is corrupting something in PHP 
to cause this issue.

06/26/2011 07:58:26 PM p (dot) gruber (at) aon (dot) at Comment #5 Reply to this comment
The Touchdown Client has a auto-detect feature at setup-time. 
(Activesync Only, exchange 2003 and exchange 2007). Probably this is 
the cause of the PING before SYNC issue.
Another possibility is: i did not check whether the other Android 
Client (native) was still active when provisioning the Touchdown client.

The good thing (but even bad for me): i could reproduce the timezone 
issue in Bug 10194.
When i commented out the line in kronolith/lib/Event.php

// $message->setTimezone($this->start);

calender synced well as expected.
So this is not a horde bug.
I also use Debian and the php/pear packages from debian.

Tasks are also affected:
- setup seems to work fine
- Tasks on the device remains empty (Task created on WebInterface before)
- no suspect logs (apache, horde, activesync)

Thank you for your fast help.
06/26/2011 05:47:41 PM Michael Rubinsky Comment #4 Reply to this comment
I have contacted TouchDown support and am awaiting a reply.
06/26/2011 05:13:25 PM Michael Rubinsky Comment #3
State ⇒ Assigned
Reply to this comment
Actually, it looks like the first issue (issuing a PING before SYNC) 
is due to TouchDown incorrectly sending a SETTINGS request for 
activesync version 2.5 clients. This command is only supported in AS   
version 12.0, 12.1, and 14.0

Will see if there is a way to work around this, but I don't think so.
06/26/2011 04:13:31 PM Michael Rubinsky Comment #2
Assigned to Michael Rubinsky
State ⇒ Duplicate
Reply to this comment
At first glance it looks like whatever device you are provisioning 
first in the log is broken. It is sending a PING request *before* it 
issues a SYNC request which is against the specification. From 
MS_ASCMD section 2.2.1.11:

"The server uses the last <SyncKey> returned to the client when 
determining to report in the Ping response. Therefore the client MUST 
have received the response to its last Sync request and successfully 
applied the changes sent by the server, prior to issuing a Ping 
request."

That being said, this *should* still work because the code is smart 
enough to know that if there was no previous SYNC, then we are looking 
for *all* changes (that's why the '0' values are in the getChanges 
call in the log).

I think the main problem here is a duplicate of  Bug: 10194

You also might be being bit by another bug that a recent comment (also 
described in the Bug comments of 10194) has fixed.
06/26/2011 08:43:18 AM p (dot) gruber (at) aon (dot) at Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
New Attachment: activesync_android.log Download
Milestone ⇒
Queue ⇒ Horde Base
Summary ⇒ ActiveSync Calendar and Tasks not working
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
in Horde 4.0.6, when provisioning a device, only Contacts will 
synchronize. I tried iPhone4 (4.3.1), Samsung Galaxy2 native(Android 
2.3.3) and Touchdown Client on Android.
in the activesync.log attached you will find the Provision of the 
Touchdown Client, where Contacts work, but Calendar and Tasks remain 
empty on the device.
I also noticed in the DB-Table horde_activesync_state that only the 
records for the folders 'folersync' and 'contacts' have values in the 
fields sync_time and sync_data. records for folders 'calendar' and 
'tasks' exist, but have empty values in sync_time and sync_data.

probably i only have a missconfigured horde-setup. But this behavior i 
also had with Horde v4 Beta1.
Actual Install is from the scratch, no old Modules are present. i also 
checked the rcp.php against the patch of Bug #9733.
please tell me, if i can provide you more information/logs, etc.

Saved Queries