6.0.0-alpha14
7/2/25

[#12531] Loopping sync when using ActiveSync
Summary Loopping sync when using ActiveSync
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester leena.heino (at) uta (dot) fi
Created 08/03/2013 (4351 days ago)
Due
Updated 08/08/2013 (4346 days ago)
Assigned 08/03/2013 (4351 days ago)
Resolved 08/03/2013 (4351 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/08/2013 02:58:20 PM ivan (at) kouvykov (dot) com Comment #12 Reply to this comment
Fixed, both android and Outlook connected successfully on a clean 
installation.
08/07/2013 11:27:53 PM Michael Rubinsky Comment #11 Reply to this comment
I can't reproduce this.
I did, however, find an issue that would occur on pristine new 
installs (no history data available). It doesn't look like your issue 
based on your logs though (unless you removed some parts of the log 
from earlier).

Anyway, see if your issue is fixed now?
08/07/2013 11:26:02 PM Git Commit Comment #10 Reply to this comment
Changes have been made in Git (master):

commit 1b5bbeee8be65df2c3b1256b528a069c28035a6a
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Wed Aug 7 19:23:06 2013 -0400

     Fix sync loop when no history exists yet.

     History returns a boolean when no history at all is found (
     as would be the case on a new install). Need to cast $modseq to int
     to avoid the activesync server thinking it's a loss of state or
     change from timestamps to modseq.

     Related to Bug: 12531

  .../Core/lib/Horde/Core/ActiveSync/Driver.php      |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/1b5bbeee8be65df2c3b1256b528a069c28035a6a
08/07/2013 11:03:17 PM Michael Rubinsky Comment #9 Reply to this comment
I can't reproduce this.

Your logs show this occurs during a FOLDERSYNC. During a FOLDERSYNC, 
$_thisSyncStamp will NEVER be false. It should ALWAYS be a timestamp. 
The code in question is Horde_ActiveSync_State_Sql::getChanges(). 
$this->_collection is empty for FOLDERSYNC requests, so null will be 
passed as the first parameter to ::getSyncStamp(). You will see in 
Horde_Core_ActiveSync_Driver::getSyncStamp() that this will lead to 
time() being the returned value in this case.

You will need to find out why a FOLDERSYNC leads to some value in 
$collection['id'] for your situation. This should not happen in normal 
usage.
08/07/2013 10:14:39 AM ivan (at) kouvykov (dot) com Comment #8
New Attachment: 3D4801C2DCD74FE0934855F205B13021.txt Download
Reply to this comment
Log for Outlook 2013 ARM
08/07/2013 10:13:45 AM ivan (at) kouvykov (dot) com Comment #7
New Attachment: HTC775b17693f2a82d3f9648b65928a8.txt Download
Reply to this comment
After applying fix to ActiveSync/State/Sql.php new devices are unable 
to connect (logs attached for HTC One X and Outlook 2013 ARM)
08/03/2013 11:56:07 PM Michael Rubinsky Comment #6
Assigned to Michael Rubinsky
State ⇒ Resolved
Reply to this comment
08/03/2013 11:48:00 PM Michael Rubinsky Comment #5 Reply to this comment
Nevermind, found the issue.
08/03/2013 11:45:22 PM Michael Rubinsky Comment #4 Reply to this comment
I could not attach the sync log file because the log file is still 
growing and the sync has not yet ended. The sync has now lasted for 
over 55 minutes.
That's fine. Just attach what you have. I need to see what data is 
being used for the timestamps/modseq values.
08/03/2013 11:44:31 PM Michael Rubinsky Comment #3
State ⇒ Feedback
Reply to this comment
Did you by any chance delete entries from horde_histories?

08/03/2013 06:40:00 PM leena (dot) heino (at) uta (dot) fi Comment #2 Reply to this comment

[Show Quoted Text - 23 lines]
ActiveSync settings in the client: sync only addresses and calendar
ActiveSync settings in the server: Email support is disabled
Email message delete mode in the server: Move to folder Trash

08/03/2013 06:32:45 PM leena (dot) heino (at) uta (dot) fi Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Loopping sync when using ActiveSync
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
ActiveSync seems to get stuck in a loop when syncing contacts. This 
line appears in the sync log file again and again:
2013-08-03T20:34:00+03:00 INFO: [7450] Using MODSEQ 0 for @Contacts@.
2013-08-03T20:34:00+03:00 ERR: [7450] Force restting of state for 
@Contacts@: Detecting a change in timestamp or modification sequence. 
Reseting state.
2013-08-03T20:34:00+03:00 NOTICE: [7450] 
Horde_ActiveSync_State_Sql::loadState: clearing folder state.
2013-08-03T20:34:00+03:00 INFO: [7450] Resetting device state for 
device: APPLXXXX, user: a1234, and collection: @Contacts@.
...
2013-08-03T21:29:23+03:00 INFO: [7448] Using MODSEQ 0 for @Contacts@.
2013-08-03T21:29:23+03:00 ERR: [7448] Force restting of state for 
@Contacts@: Detecting a change in timestamp or modification sequence. 
Reseting state.
2013-08-03T21:29:23+03:00 NOTICE: [7448] 
Horde_ActiveSync_State_Sql::loadState: clearing folder state.
2013-08-03T21:29:23+03:00 INFO: [7448] Resetting device state for 
device: APPLXXXX, user: a1234, and collection: @Contacts@.

I could not attach the sync log file because the log file is still 
growing and the sync has not yet ended. The sync has now lasted for 
over 55 minutes.

Saved Queries