fmbiete / Z-Push-contrib

Z-Push fork with changes that I will try to contrib
GNU Affero General Public License v3.0
134 stars 62 forks source link

can't synchonize cal dav entries with my phone #228

Closed vgeannin closed 9 years ago

vgeannin commented 9 years ago

Hi all,

I'm trying to configure the caldav backend with Oracle Communication Suite caldav server. I can create a new entry from my device to the caldav server but I can't synchronise the event that are present in the caldav server to my device (when I create the entry from my device, it'll disappear after the synchronization).
My server is a centos 6.7,with php 5.3.3 testing-caldav.php give me that : [root@moblabdmzp001 z-push]# php testing/testing-caldav.php Connected 1 Array ( [ACL] => 0 [DELETE] => 1 [GET] => 2 [HEAD] => 3 [MKCALENDAR] => 4 [MKCOL] => 5 [MOVE] => 6 [OPTIONS] => 7 [PROPFIND] => 8 [PROPPATCH] => 9 [PUT] => 10 [REPORT] => 11 ) PHP Notice: Use of undefined constant LOGFILE - assumed 'LOGFILE' in /usr/share/z-push/lib/core/zlog.php on line 120 Array ( [0] => CalendarInfo Object ( [url] => /davserver/dav/home/mgean@ucspreview.com/calendar/ [displayname] => M gean [getctag] => "1442320404000.8" [id] => calendar )

) CalendarInfo Object ( [url] => /davserver/dav/home/msepre/calendar/ [displayname] => M gean [getctag] => "1442320404000.8" [id] => /davserver/dav/home/mgean/calendar ) Array ( [0] => Array ( [href] => calendar )

) Array ( [0] => Array ( [href] => 20150914T142609Z-906e468a3aefa9e6442cb74019d4e58c.ics [etag] => 1442240777000.1 [getlastmodified] => Mon, 14 Sep 2015 14:26:17 GMT )

[1] => Array
    (
        [href] => 20150914T143914Z-4a926ace5c3e6a9c07684d44054b4b8b.ics
        [etag] => 1442241562000.1
        [getlastmodified] => Mon, 14 Sep 2015 14:39:22 GMT
    )

[2] => Array
    (
        [href] => 20150914T144344Z-54edccc51992917e43a147cca65edd1b.ics
        [etag] => 1442241832000.1
        [getlastmodified] => Mon, 14 Sep 2015 14:43:52 GMT
    )

[3] => Array
    (
        [href] => wc-1442311263987-10-.ics
        [etag] => 1442311264000.1
        [getlastmodified] => Tue, 15 Sep 2015 10:01:04 GMT
    )

[4] => Array
    (
        [href] => 20150915T120158Z-88cf5cb2c0cb267b6ee16a0b6ba4a24d.ics
        [etag] => 1442318529000.1
        [getlastmodified] => Tue, 15 Sep 2015 12:02:09 GMT
    )

[5] => Array
    (
        [href] => 20150915T122023Z-287fa34f6312f6f482af2ffa3c583846.ics
        [etag] => 1442319633000.1
        [getlastmodified] => Tue, 15 Sep 2015 12:20:33 GMT
    )

[6] => Array
    (
        [href] => 20150915T123314Z-91050399fa0a6af4fdcf4998b59b571a.ics
        [etag] => 1442320404000.1
        [getlastmodified] => Tue, 15 Sep 2015 12:33:24 GMT
    )

) Array ( [0] => Array ( [href] => 20150914T142609Z-906e468a3aefa9e6442cb74019d4e58c.ics [etag] => 1442240777000.1 [getlastmodified] => Mon, 14 Sep 2015 14:26:17 GMT )

[1] => Array
    (
        [href] => 20150914T143914Z-4a926ace5c3e6a9c07684d44054b4b8b.ics
        [etag] => 1442241562000.1
        [getlastmodified] => Mon, 14 Sep 2015 14:39:22 GMT
    )

[2] => Array
    (
        [href] => 20150914T144344Z-54edccc51992917e43a147cca65edd1b.ics
        [etag] => 1442241832000.1
        [getlastmodified] => Mon, 14 Sep 2015 14:43:52 GMT
    )

[3] => Array
    (
        [href] => wc-1442311263987-10-.ics
        [etag] => 1442311264000.1
        [getlastmodified] => Tue, 15 Sep 2015 10:01:04 GMT
    )

[4] => Array
    (
        [href] => 20150915T120158Z-88cf5cb2c0cb267b6ee16a0b6ba4a24d.ics
        [etag] => 1442318529000.1
        [getlastmodified] => Tue, 15 Sep 2015 12:02:09 GMT
    )

[5] => Array
    (
        [href] => 20150915T122023Z-287fa34f6312f6f482af2ffa3c583846.ics
        [etag] => 1442319633000.1
        [getlastmodified] => Tue, 15 Sep 2015 12:20:33 GMT
    )

[6] => Array
    (
        [href] => 20150915T123314Z-91050399fa0a6af4fdcf4998b59b571a.ics
        [etag] => 1442320404000.1
        [getlastmodified] => Tue, 15 Sep 2015 12:33:24 GMT
    )

) Any idea

vgeannin commented 9 years ago

below the z-push log : 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] -------- Start 15/09/2015 15:42:32 [20169] [ INFO] [mgean] Version='SVN-trunk-r1981' method='POST' from='2.12.49.185' cmd='FolderSync' getUser='mgean' devId='kesui6t2e97kt148e4m44phha4' devType='iPhone' 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] Used timezone 'Europe/Paris' 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] Including backend file: '/usr/share/z-push/backend/caldav/caldav.php' 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] Request::ProcessHeaders() ASVersion: 14.0 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] ZPush::CommandNeedsProvisioning(9): true 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] FileStateMachine->GetState() on file: '/var/lib/z-push/4/a/kesui6t2e97kt148e4m44phha4-devicedata' 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] ASDevice data loaded for user: 'mgean' 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] TopCollector(): Initialized mutexid Resource id #19 and memid Resource id #20. 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] LoopDetection(): Initialized mutexid Resource id #22 and memid Resource id #23. 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] ZPush::HierarchyCommand(9): true 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] DeviceManager->ProvisioningRequired('226349297') saved device key '226349297': false 15/09/2015 15:42:32 [20169] [DEBUG] [mgean] ZPush::CommandNeedsAuthentication(9): true 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] BackendCalDAV->Logon(): User 'mgean' is authenticated on CalDAV 'http://commsuite.ucspreview.com:8080/davserver/dav/home/mgean/' 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] ZPush::CommandNeedsPlainInput(9): false 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] StringStreamWrapper::Open(): len = 0 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] StringStreamWrapper::Open(): Using php://temp 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] StringStreamWrapper::Open(): len = 0 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] StringStreamWrapper::Open(): Using php://temp 15/09/2015 15:42:34 [20169] [WBXML] [mgean] I FolderHierarchy:FolderSync 15/09/2015 15:42:34 [20169] [WBXML] [mgean] I FolderHierarchy:SyncKey 15/09/2015 15:42:34 [20169] [WBXML] [mgean] I {307f937a-7f36-4a98-8762-c97262923e60}2 15/09/2015 15:42:34 [20169] [WBXML] [mgean] I /FolderHierarchy:SyncKey 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] StateManager->loadHierarchyCache(): 'kesui6t2e97kt148e4m44phha4-307f937a-7f36-4a98-8762-c97262923e60-hc-2' 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] FileStateMachine->GetState() on file: '/var/lib/z-push/4/a/kesui6t2e97kt148e4m44phha4-307f937a-7f36-4a98-8762-c97262923e60-hc-2' 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] FileStateMachine->GetState() on file: '/var/lib/z-push/4/a/kesui6t2e97kt148e4m44phha4-307f937a-7f36-4a98-8762-c97262923e60-2' 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] ASDevice->GetHierarchyCache(): HierarchyCache is up - Cached objects: 2 15/09/2015 15:42:34 [20169] [WBXML] [mgean] I /FolderHierarchy:FolderSync 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] WBXMLEncoder->startWBXML() type: vnd.ms-sync.wbxml 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] Initializing folder diff engine 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] ExportChangesDiff->InitializeExporter(): Initializing folder diff engine 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] BackendCalDAV->GetFolderList(): Getting all folders. 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] xmltags[DAV::principal] or xmltags[DAV::principal][0] is not set. 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] BackendCalDAV->StatFolder('Ccalendar') 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] BackendCalDAV->GetFolder('Ccalendar') 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] BackendCalDAV->StatFolder('Tcalendar') 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] BackendCalDAV->GetFolder('Tcalendar') 15/09/2015 15:42:34 [20169] [ INFO] [mgean] ExportChangesDiff->InitializeExporter(): Found '0' changes for 'hierarchy' 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O FolderHierarchy:FolderSync 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O FolderHierarchy:Status 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O 1 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O /FolderHierarchy:Status 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O FolderHierarchy:SyncKey 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O {307f937a-7f36-4a98-8762-c97262923e60}2 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O /FolderHierarchy:SyncKey 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O FolderHierarchy:Changes 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O FolderHierarchy:Count 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O 0 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O /FolderHierarchy:Count 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O /FolderHierarchy:Changes 15/09/2015 15:42:34 [20169] [WBXML] [mgean] O /FolderHierarchy:FolderSync 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] WBXMLEncoder->endTag() WBXML output completed 15/09/2015 15:42:34 [20169] [WBXML] [mgean] WBXML-OUT: AwFqAAAHVkwDMQABUgN7MzA3ZjkzN2EtN2YzNi00YTk4LTg3NjItYzk3MjYyOTIzZTYwfTIAAU5XAzAAAQEB 15/09/2015 15:42:34 [20169] [WBXML] [mgean] WBXML-IN : AwFqAAc= 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] Flushing 63, headers already sent? no 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] BackendCalDAV->Logoff(): disconnected from CALDAV server 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] LoopDetection->ProcessLoopDetectionTerminate() 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] Memory usage information: 3762400/4194304 - Execution time: 2.0000 - HTTP responde code: 200 15/09/2015 15:42:34 [20169] [DEBUG] [mgean] -------- End 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] -------- Start 15/09/2015 15:42:35 [20170] [ INFO] [mgean] Version='SVN-trunk-r1981' method='POST' from='2.12.49.185' cmd='Sync' getUser='mgean' devId='kesui6t2e97kt148e4m44phha4' devType='iPhone' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] Used timezone 'Europe/Paris' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] Including backend file: '/usr/share/z-push/backend/caldav/caldav.php' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] Request::ProcessHeaders() ASVersion: 14.0 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] ZPush::CommandNeedsProvisioning(0): true 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] FileStateMachine->GetState() on file: '/var/lib/z-push/4/a/kesui6t2e97kt148e4m44phha4-devicedata' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] ASDevice data loaded for user: 'mgean' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] TopCollector(): Initialized mutexid Resource id #19 and memid Resource id #20. 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] LoopDetection(): Initialized mutexid Resource id #22 and memid Resource id #23. 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] ZPush::HierarchyCommand(0): false 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] DeviceManager->ProvisioningRequired('226349297') saved device key '226349297': false 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] ZPush::CommandNeedsAuthentication(0): true 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] BackendCalDAV->Logon(): User 'mgean' is authenticated on CalDAV 'http://commsuite.ucspreview.com:8080/davserver/dav/home/mgean/' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] ZPush::CommandNeedsPlainInput(0): false 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] StringStreamWrapper::Open(): len = 0 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] StringStreamWrapper::Open(): Using php://temp 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] StringStreamWrapper::Open(): len = 0 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] StringStreamWrapper::Open(): Using php://temp 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I {da9f7080-f061-400e-8ca4-c13cfb52868a}5 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I Ccalendar 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] FileStateMachine->GetState() on file: '/var/lib/z-push/4/a/kesui6t2e97kt148e4m44phha4-da9f7080-f061-400e-8ca4-c13cfb52868a-fd' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] SyncParameters->UseCPO('DEFAULT') 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] SyncCollections->AddCollection(): Folder id 'Ccalendar' : ref. PolicyKey '226349297', ref. Lifetime '900', last sync at '1442322649' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] SyncCollections->AddCollection(): Updated reference PolicyKey '226349297', reference Lifetime '900', Last sync at '1442322649' 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 25 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] SyncParameters->UseCPO('DEFAULT') 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 5 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I AirSyncBase:BodyPreference 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I AirSyncBase:Type 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 1 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I /AirSyncBase:Type 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I AirSyncBase:TruncationSize 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 32768 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I /AirSyncBase:TruncationSize 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I /AirSyncBase:BodyPreference 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [WBXML] [mgean] I 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] HandleSync(): Start Output 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] WBXMLEncoder->startWBXML() type: vnd.ms-sync.wbxml 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] Sync->loadStates(): loading states for folder 'Ccalendar' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] FileStateMachine->GetState() on file: '/var/lib/z-push/4/a/kesui6t2e97kt148e4m44phha4-da9f7080-f061-400e-8ca4-c13cfb52868a-5' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] ZPush::GetAdditionalSyncFolderStore('Ccalendar'): 'false' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] ZPush::GetAdditionalSyncFolderStore('Ccalendar'): 'false' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] ExportChangesDiff->InitializeExporter(): Initializing message diff engine. '0' messages in state 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] BackendCalDAV->GetMessageList('Ccalendar','1439646155') 15/09/2015 15:42:35 [20170] [ WARN] [mgean] /usr/share/z-push/include/z_caldav.php:783 Undefined property: CalDAVClient::$xmlnodes (8) 15/09/2015 15:42:35 [20170] [ WARN] [mgean] /usr/share/z-push/include/z_caldav.php:783 Invalid argument supplied for foreach() (2) 15/09/2015 15:42:35 [20170] [ INFO] [mgean] ExportChangesDiff->InitializeExporter(): Found '0' changes for 'Ccalendar' 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] Folder type: Calendar 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O {da9f7080-f061-400e-8ca4-c13cfb52868a}5 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O Ccalendar 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 1 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [WBXML] [mgean] O 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] WBXMLEncoder->endTag() WBXML output completed 15/09/2015 15:42:35 [20170] [WBXML] [mgean] WBXML-OUT: AwFqAEVcT0sDe2RhOWY3MDgwLWYwNjEtNDAwZS04Y2E0LWMxM2NmYjUyODY4YX01AAFSA0NjYWxlbmRhcgABTgMxAAEBAQE= 15/09/2015 15:42:35 [20170] [WBXML] [mgean] WBXML-IN : AwFqABE= 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] Flushing 71, headers already sent? no 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] BackendCalDAV->Logoff(): disconnected from CALDAV server 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] LoopDetection->ProcessLoopDetectionTerminate() 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] Memory usage information: 3771432/4194304 - Execution time: 0.0000 - HTTP responde code: 200 15/09/2015 15:42:35 [20170] [DEBUG] [mgean] -------- End

vgeannin commented 9 years ago

Ok I find the error, the caldav server only allow the 10 year of synchronization and the caldav backend want to synchronize more than 23 year. can you add a parameter in the conf file to set the finish time instead of use the hardcode value "2147483647"

Vincent

fmbiete commented 9 years ago

Hi @vgeannin That should do the trick. Thanks!!