Summary | Kronolith does not sync calendar, contacts work with Android 2.2.1/Motorola Milestone mobile |
Queue | Synchronization |
Queue Version | Git master |
Type | Bug |
State | Not A Bug |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | le-horde (at) biz (dot) h42 (dot) net |
Created | 06/05/2011 (5113 days ago) |
Due | |
Updated | 07/29/2011 (5059 days ago) |
Assigned | 07/05/2011 (5083 days ago) |
Resolved | 07/10/2011 (5078 days ago) |
Milestone | |
Patch | No |
Now latest GIT-MASTER is working without changes.
[request: fixed/closed]
State ⇒ Not A Bug
look into this for an outdated PHP version in an outdated distribution
though.
State ⇒ Assigned
that can be either submitted to PHP as a bug report, or something in
Horde_Date that can get fixed. After some irc debugging with a user
who is experiencing this issue, we have come to the following:
The following *does* experience the issue on a debian lenny server:
$d = new Horde_Date('2011-07-08 15:00:00', 'Europe/Zurich');
$tz = $d->toDateTime()->getTimezone();
var_dump($tz);
var_dump($tz->getName());
var_dump($tz->getTransitions());
echo 'foobar';
The code dies at the $tz->getTransitions() line. In this case, the
getName() call just returned an empty string.
If we break out the lower level code from Horde_Date that is actually
being executed:
$date = new DateTime(null, new DateTimeZone('Europe/Zurich'));
$date->setDate(2011, 07, 08);
$date->setTime(15, 0, 0);
$tz = $date->getTimezone();
var_dump($tz);
var_dump($tz->getName());
var_dump($tz->getTransitions());
echo 'foobar';
*this* code runs without issue. This is the exact same code that is
executed, with (supposedly) the same values, as is run by using
Horde_Date. Something in Horde_Date is causing things to get mucked up.
Both scripts execute fine on a number of local servers, as well as the
reporter's Debian Squeeze server
State ⇒ Not A Bug
framework/Date/lib/Horde/Date.php in the toDateTime method around
line 280? If that is a valid timezone string, then yes, it is not a
bug in Horde.
++++++++++
echo "<hr>".$this->_timezone."<hr>";
++++++++++
and i am getting lots of UTC and a few "Europe/Berlin".
So I guess you can close the ticket resolved, as its an PHP issue.
somehow, somewhere, no idea of fixing this one.
framework/Date/lib/Horde/Date.php in the toDateTime method around line
280? If that is a valid timezone string, then yes, it is not a bug in
Horde.
pecl timezonedb extension, try disabling it. If you are not using
it, try installing it.
I guess this is more a PHP/Debian issue and may not have to do
anything with horde.
should be "Europe/Berlin" but appears to be 'binary' crap from
somewhere in the memory.
pecl timezonedb extension, try disabling it. If you are not using it,
try installing it.
What makes you think it's not used just because you don't see the
property name listed in one method or file? It *is* used, by the
parent class while encoding to the wbxml stream. It's also set by the
parent class while decoding the wbxml stream from the device.
framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php
++++++++++++
157 public function setTimezone($date)
158 {
159 if (!($date instanceof Horde_Date)) {
160 $timezone = new Horde_Date(time(), $date);
161 }
162 $offsets = Horde_ActiveSync_Timezone::getOffsetsFromDate($date);
163 $tz = Horde_ActiveSync_Timezone::getSyncTZFromOffsets($offsets);
164 $this->_properties['timezone'] = $tz;
165 }
++++++++++++
why the hell you set $timezone and not use it anywhere?
I tested a little using the PHP-Shell:
####################
$tz = new DateTimeZone('Europe/Berlin');
var_dump($tz);
$date = new DateTime(null, new DateTimeZone('Europe/Berlin'));
var_dump($date);
$date->setDate(2011, 1, 10);
$date->setTime(18, 30, 0);
var_dump($date->getTimezone()->getName());
echo "<hr>";
$timezone = new DateTimeZone("Europe/London");
var_dump($timezone);
$transitions = $timezone->getTransitions();
print_r(array_slice($transitions, 0, 3));
####################
this script is working well.
Then I added a few lines to
framework/ActiveSync/lib/Horde/ActiveSync/Timezone.php in function
getOffsetsFromDate()
after $timezone = $date->toDateTime()->getTimezone();
####################
echo "<hr>Horde_Date:\n"; var_dump($date);echo "<hr>";
echo "<hr>DateTime:\n"; var_dump($date->toDateTime());echo "<hr>";
echo "<hr>DateTimeZone:\n";
var_dump($date->toDateTime()->getTimeZone());echo "<hr>";
echo "<hr>!!!!!!!!:\n"; var_dump($timezone->getName());echo "<hr>";
####################
The interessting thing is the value of "$timezone->getName()" which
should be "Europe/Berlin" but appears to be 'binary' crap from
somewhere in the memory.
####################
!!!!!!!!:
string(4) "??
"
####################
I set the timezone to Berlin with
$timezone = new DateTimeZone('Europe/Berlin');
and everything works well.
But this is not a 'nice' fix
I also reinstalled the php5 and php5-common packages using debian
aptitude. No changes so far.
I also upgraded the pear packages using pear upgrad-all. no changes either.
What's next?
if this crashes this are wrong in pear.php.net/Date i guess. I
http://www.php.net/manual/en/datetimezone.gettransitions.php
Your PHP is broken if it crashes on that.
I could find out, that the 'script-crash' was due to
framework/ActiveSync/lib/Horde/ActiveSync/Timezone.php
line 148: $transitions =$timezone->getTransitions();
interessting is, that $timezone is an instance of DateTimeZone. So if
this crashes this are wrong in pear.php.net/Date i guess. I
reinstalled it using force flag. No change :(
gonna keep you posted
I got it to work
Bad news:
I had to comment out a line of code:
in "kronolith/lib/Event.php"
in the public method "public function toASAppointment()"
i commented out
// $message->setTimezone($this->start);
When I saw this I remembered that there was something about converting
to UTC in the configs. I ran the convert script provieded in the
kronolith/bin/ folder. I guess it changed some sql values (dont know
for sure), but things didn't work better. So i decided to comment this
line out. Et voila.
Hope I can help you fix the issue.
$event = $registry->calendar->export('kqnpeoc8ti9bhmoph23dei383c@xeroc.org',
'text/x-vcalendar');
var_dump($event);
I get:
++++++++++++
PHP Code
1
2
3
$event = $registry->calendar->export('kqnpeoc8ti9bhmoph23dei383c@xeroc.org',
'text/x-vcalendar');
var_dump($event);
Ergebnisse
string(449) "BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender von XXXXXXXXXXX
PRODID:-//The Horde Project//Horde iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20110110T183000Z
DTEND:20110110T193000Z
DTSTAMP:20110623T101053Z
UID:kqnpeoc8ti9bhmoph23dei383c@xeroc.org
SUMMARY:Chorprobe
ORGANIZER;CN=...........XXXXXBlackedOutXXXXXXX............
CLASS:PUBLIC
STATUS:TENTATIVE
TRANSP:0
RRULE:W1 MO 20160110T225959Z
END:VEVENT
END:VCALENDAR
"
New Attachment: horde.log
Nothing strange either.
I ran the SQL command that hast the event_id manually and there is the
same dataset returned as in the ticket befor
Appended the log
fails - first to be transfered)
$registry->calendar->export('kqnpeoc8ti9bhmoph23dei383c@xeroc.org',
'activesync')
The only reaction is firefox wanting to download a 'phpshell.php' file
which is empty.
To check the shell I tried a single 'echo "foobar";' which was working
as expected.
This is the SQL entry (fetched directly from sql-db):
INSERT INTO `kronolith_events` (`event_id`, `event_uid`,
`calendar_id`, `event_creator_id`, `event_description`,
`event_location`, `event_status`, `event_attendees`, `event_keywords`,
`event_exceptions`, `event_title`, `event_recurtype`,
`event_recurinterval`, `event_recurdays`, `event_recurenddate`,
`event_recurcount`, `event_start`, `event_end`, `event_alarm`,
`event_modified`, `event_private`, `event_allday`,
`event_alarm_methods`, `event_url`, `event_baseid`,
`event_exceptionoriginaldate`, `event_resources`) VALUES
('fiH5UzMRB6ROANTIgXvhIFA', 'kqnpeoc8ti9bhmoph23dei383c@xeroc.org',
'QYe5aTMRB6ROAEpgpqU3pyA', 'mail@xeroc.org', '', '', 1, 'a:0:{}',
NULL, '', 'Chorprobe', 2, 1, 2, '2016-01-09 23:00:00', NULL,
'2011-01-10 18:30:00', '2011-01-10 19:30:00', 0, 1308677318, 0, 0,
'N;', '', '', NULL, 'a:0:{}');
changes, checking for PIM initiated changes.
2011-06-21T18:45:49+02:00 DEBUG: [androidc816936759] No PIM changes
present, returning all messages.
2011-06-21T18:45:49+02:00 DEBUG: Horde::getMessage(Calendar,
20110621181107.emUPWjMRB6ROAMKbWQH30DA@horde.xeroc.org)
#############
try running this (assuming that this event still exists in your
database, if not, use the event_uid from another one of the log
entries like above):
$event =
$registry->calendar->export('20110621181107.emUPWjMRB6ROAMKbWQH30DA@horde.xeroc.org',
'activesync');
var_dump($event);
post back what happens.
Well, not according to the posted log. Regardless, the point is that
something is failing within kronolith's scope, while trying to fetch a
single event.
Bug: 10263Here it is stuck during the very first. Not depending on the event
(tested several different one (generated in google,kronologh,manually))
Bug: 10263New Attachment: activesync[5].log
Anyway. Lots of logslines are produced.
calendar is produced on android. But existing events are not imported.
These lines are produced over and over:
#############
2011-06-21T18:45:49+02:00 DEBUG: [androidc816936759] Found 1 message
changes, checking for PIM initiated changes.
2011-06-21T18:45:49+02:00 DEBUG: [androidc816936759] No PIM changes
present, returning all messages.
2011-06-21T18:45:49+02:00 DEBUG: Horde::getMessage(Calendar,
20110621181107.emUPWjMRB6ROAMKbWQH30DA@horde.xeroc.org)
#############
New Attachment: horde-sync-initial.log
New Attachment: activesync[4].log
Things didn't change though.
Reproduction:
- Use a new mail - user (horde@xeroc.org)
- Setup android to sync with it.
- The initial synclog is attached
- after a few minutes, as there was still no new calendar appearing
in android hit the sync calendar button manually
- log file did not change ( :-( )
- after a few more minutes hit the sync contacts button
- things changed in log file (log attached)
- after a few minutes, hit the sync calendar button manually again
- log file did not change
- calendar still not appearing in android
try a completely fresh sync (new account on phone, clear devices in
Horde etc...).
If still experiencing problems, I will need a dump of the event
database to ensure nothing funny is causing problems there.
Revert "Another small android workaround."
Need to keep this entry, at least temporarily. Otherwise,
initial setup can fail on some android devices that incorrectly
attempt to provision (even though they don't actually support it),
then (again, incorrectly) perform a FOLDERSYNC that is actually
ignored by the client anyway. Yay standards.
Hopefully helps at least some of the issues being reported in
Bug: 10194This reverts commit 736800574f6cc05570266ce8adb8bbbc6aa120fc.
1 files changed, 1 insertions(+), 4 deletions(-)
http://git.horde.org/horde-git/-/commit/7f69397f8b41e1e34334aa92ea9a3d6de81416db
New Attachment: activesync[3].log
- Delete all contact books (one is auto-regenerated empty)
- Delete all calendars (one is auto-regenerated empty)
- Delete all coupled active sync devices in horde
- Delete ActiveSync Source in Android
- StartOver from scratch:
- Reboot Android
- add the ActiveSync Source in Android
- Wait 10 minutes to finish inital sync
- add a contact in addressbook
- add an event in calendar
- press 'sync' in android
- wait
- no changes in calendar
- even no changes in contacts this time (maybe due to this error:
ERR: Ungültiges Adressbuch: NQZXETMRB6RN_kiPCU4AxEA) Where ever it
came from
- full activesync log appended
New Attachment: activesync[2].log
No look with Touchdown either.
I let android it do what ever it was doing the whole night. No
horde-calendar calendar entries synced.
The attached file is the activesync log using touchdown für android 2.x
verweigert" entry in the sync logs. This sounds like an issue with
authentication that was already fixed. Though since you say you are
using git master, this might be a new issue. Probably something to
do with Horde sessions. What authentication backend are you using,
what session backend, and are you using cookie based sessions?
currently working to get the git master to work. I did not use it
before. More info to come.
State ⇒ Feedback
is issuing a PING request immediately after the FOLDERSYNC. This is
incorrect, at least for version 2.5 of ActiveSync. At least one SYNC
request needs to be issued before a PING. This might be a side effect
of some other issue...
The second thing is the "2011-06-20T17:55:24+02:00 ERR: Zugriff
verweigert" entry in the sync logs. This sounds like an issue with
authentication that was already fixed. Though since you say you are
using git master, this might be a new issue. Probably something to do
with Horde sessions. What authentication backend are you using, what
session backend, and are you using cookie based sessions?
New Attachment: activesync[1].log
the small log already posted, it looks like the calendar folder is
properly being initialized.
android. At least one dev is using the Milestone without any issues
as well. Make sure you didn't miss anything in both the sync log
AND the general horde log.
Touchdown application (trial available in Android Market) and see if
calendar sync works better for you. It has a far more complete
calendar implementation then the buggy stock android calendar.
I attached the activesync log that was written while Touchdown syned.
I am going to try the latest git tag maybe the bug is already fixed.
small log already posted, it looks like the calendar folder is
properly being initialized.
I can not reproduce this at all on any of my test devices, including
android. At least one dev is using the Milestone without any issues as
well. Make sure you didn't miss anything in both the sync log AND the
general horde log.
To make sure the server is working correctly, you can try to use the
Touchdown application (trial available in Android Market) and see if
calendar sync works better for you. It has a far more complete
calendar implementation then the buggy stock android calendar.
Horde logs do nothing besides
+++++++++++++++++
2011-06-20T09:28:14+02:00 DEBUG: [androidc816936759] Initializing
message diff engine for Contacts
2011-06-20T09:28:14+02:00 DEBUG:
Horde_ActiveSync_Driver_Horde::getServerChanges(Contacts, 1308554796,
1308554894, 0)
2011-06-20T09:28:14+02:00 DEBUG: [androidc816936759] Found 0 message
changes, checking for PIM initiated changes.
2011-06-20T09:28:14+02:00 DEBUG: [androidc816936759] No PIM changes
present, returning all messages.
+++++++++++++++++
Even if I hit the 'Sync calendar now' button a few times.
If i hit the 'Sync contacts now' lots of lines are logged to the
activesync log.
Anything more i can tell you for bugtracking?
errors. It seems as if something is missing in the initial setup and
later on the android app does not even try to sync the calendar.
I use kronolith 3.0.4 on horde 4.0.6
Assigned to Michael Rubinsky
State ⇒ Feedback
Any errors in the Horde log?
New Attachment: activesync.log
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Kronolith does not sync calendar, contacts work with Android 2.2.1/Motorola Milestone mobile
Queue ⇒ Synchronization
Milestone ⇒
Patch ⇒ No
I have a motorola milestone mobile phone with firmware 2.2.1. I am
trying to setup Horde ActiveSync to synchronize contacts and calendar
entries. I created a corresponding profile on my mobile, setup
completes without errors. Syncing contacts is successful afterwards in
both directions but nothing happens with calendar entries. If I
initiate a manual sync, nothing happens, I don't even see traffic from
the mobile to my server via tcpdump.
I've attached the activesync log of the initial setup. I've reset the
settings several times. No joy...
Cheers,
Lars