[sync] [horde] Sync with Funambol

Jan Schneider jan at horde.org
Wed Nov 5 17:59:43 UTC 2008


Zitat von Paul Faure <paul.faure at agr.gc.ca>:

> The error is that any new contact I add on the client does not show up
> on the server. The error I constantly get is "already exists with server
> id 3e37b9140457c0f37039de9227cb4915"
> If I add 5 new contacts on the client, they all give me that error when
> I sync it.

All with the same id?

> I have tried removing all contacts on the client and removing the sync
> data on the server then starting from scratch.
> Server -> Client works fine.
> Client -> Server (update only) works.
> Client -> Server (new contact) always gives me the error above.
>
> The contacts I tested with have had minimal information in them
> (sometimes just a name and a note) or just a name and an email. The
> example below is one of just a name and a note. Yea, not useful but its
> for testing.
>
> I have no idea where the contact ID of
> "3e37b9140457c0f37039de9227cb4915" comes from. It is not sent by the
> client, the logs /tmp/sync/client* dont have any mention of it, and I
> scanned the entire database and could not find it in there either
> (except after the failed sync and it shows up in the sync map table).
>
> I was under the impression that a proper contact ID had the form of
> "20080707114252.193522rqn30xy740 at DOMAIN.COM".

Yes, exactly. What's the client id of the entry in the map table after  
the failed sync? Does it match one of the ids sent from the client?

> Thanks for forwarding to the sync list... Didnt know one existed.
>
> PS. Sorry if you guys are getting this email a few times, our department
> just changed our email addresses, so I keept getting a bounce back
> saying im not on the sync mailing list.
>
> On Thu, 2008-10-30 at 18:20 +0100, Jan Schneider wrote:
>
>> There is a synchronization mailing list, please use that for follow-ups.
>>
>> Zitat von Paul Faure <faurep at agr.gc.ca>:
>>
>> > Hi All,
>> >
>> > Sync between Outlook and Horde used to work perfectly back with horde
>> > 1.1.
>> > I have recently upgraded to horde 1.2 and now when I create a new
>> > contact on a client and sync, it gives me the error below:
>>
>> Which error? I can't see any error message.
>>
>> > ==> log.txt <==
>> > DEBUG:  Backend of class syncml_backend_horde created
>> > DEBUG:  Started at 2008-10-28 14:00:16. Packet logged
>> > in /tmp/sync/client_25701.xml
>> > DEBUG:  Existing session continued: 3853582193943de92a9c4b7f683a0b8f
>> > DEBUG:  Authenticated: yes; version: 1.1; message ID: 2; source URI:
>> > iph-PpMbXDksxKOlkU0oFXOIjQ==; target URI:
>> > https://HOSTNAME:443/horde/rpc.php; user: USER; charset: UTF-8; wbxml:
>> > no
>> > DEBUG:  Using default device class
>> > DEBUG:  Handling <Add> sent from client
>> > DEBUG:  Using default device class
>> > NOTICE: Adding client entry to server: already exists with server id
>> > 3e37b9140457c0f37039de9227cb4915
>> > DEBUG:  SQL Query by SyncML_Backend_Horde::_getSuid(): SELECT
>> > syncml_suid FROM horde_syncml_map WHERE syncml_syncpartner = ? AND
>> > syncml_db = ? AND syncml_uid = ? AND syncml_cuid = ?, values:
>> > iph-PpMbXDksxKOlkU0oFXOIjQ==, contacts, USER, 571
>> > DEBUG:  SQL Query by SyncML_Backend_Horde::createUidMap(): INSERT INTO
>> > horde_syncml_map (syncml_suid, syncml_timestamp, syncml_syncpartner,
>> > syncml_db, syncml_uid, syncml_cuid) VALUES (?, ?, ?, ?, ?, ?), values:
>> > 3e37b9140457c0f37039de9227cb4915, 0, iph-PpMbXDksxKOlkU0oFXOIjQ==,
>> > contacts, USER, 571
>> > DEBUG:  Added client entry as 3e37b9140457c0f37039de9227cb4915
>> > DEBUG:  Received <Final> from client.
>> > DEBUG:  Handle <Final> for state Sync
>> > DEBUG:  Creating <Sync> output for server changes in database card
>> > DEBUG:  Using default device class
>> > DEBUG:  Compiling server changes from 2008-10-26 23:09:06 to 2008-10-28
>> > 14:00:13
>> > DEBUG:  SQL Query by SyncML_Backend_Horde::_getChangeTS(): SELECT
>> > syncml_timestamp FROM horde_syncml_map WHERE syncml_syncpartner = ? AND
>> > syncml_db = ? AND syncml_uid = ? AND syncml_suid = ?, values:
>> > iph-PpMbXDksxKOlkU0oFXOIjQ==, contacts, USER,
>> > 20080707114252.193522rqn30xy740 at DOMAIN
>> > DEBUG:  SQL Query by SyncML_Backend_Horde::_getCuid(): SELECT
>> > syncml_cuid FROM horde_syncml_map WHERE syncml_syncpartner = ? AND
>> > syncml_db = ? AND syncml_uid = ? AND syncml_suid = ?, values:
>> > iph-PpMbXDksxKOlkU0oFXOIjQ==, contacts, USER,
>> > 20080707114252.193522rqn30xy740 at DOMAIN
>> > DEBUG:  Modifying on client from db contacts, client id 488 -> server id
>> > 20080707114252.193522rqn30xy740 at DOMAIN
>> > DEBUG:  Sending 1 server changes for client URI card
>> > DEBUG:  Sending replace from server:
>> > 20080707114252.193522rqn30xy740 at DOMAIN
>> > DEBUG:  Using default device class
>> > DEBUG:  Sending <Final> to client
>> > DEBUG:  Return message completed
>> > DEBUG:  Finished at 2008-10-28 14:00:16. Packet logged
>> > in /tmp/sync/server_25701.xml
>> >
>> > This happens with both the iPhone and Outlook with the funambol client
>> > (version 6.6 and 7.0).
>> > Updating an entry on the client works well.
>> >
>> > I tracked it down to failing in this section of code:
>> > horde-webmail-1.2/lib/SyncML/Backend/Horde.php:373
>> >
>> >         $suid = $registry->call(
>> >             $database . '/import',
>> >             array($content,
>> >                   $contentType,
>> >                   SyncML_Backend::getParameter($databaseURI, 'source')));
>> >
>> >         if (!is_a($suid, 'PEAR_Error')) {
>> >            ...
>> >         } else {
>> >             // Failed import. Maybe the entry is already there. Check if a
>> >             // guid is returned:
>> >             if ($suid->getDebugInfo()) {
>> >                 $suid = $suid->getDebugInfo();
>> >                 $this->logMessage(
>> >                     'Adding client entry to server: already exists
>> > with server id ' . $suid,
>> >                     __FILE__, __LINE__, PEAR_LOG_NOTICE);
>> >                 ...
>>
>> So? The card that you are trying to add seems to have an id that has
>> been used earlier for a contact that already exists on the server.
>>
>> > /tmp/sync/client_25701.xml:
>> > <?xml version="1.0" encoding="UTF-8"?>
>> > <SyncML>
>> > <SyncHdr><VerDTD>1.1</VerDTD>
>> > <VerProto>SyncML/1.1</VerProto>
>> > <SessionID>1225216800</SessionID>
>> > <MsgID>2</MsgID>
>> > <Target><LocURI>https://HOSTNAME:443/horde/rpc.php</LocURI>
>> > </Target>
>> > <Source><LocURI>iph-PpMbXDksxKOlkU0oFXOIjQ==</LocURI>
>> > </Source>
>> > </SyncHdr>
>> > <SyncBody><Status><CmdID>1</CmdID>
>> > <MsgRef>1</MsgRef>
>> > <CmdRef>0</CmdRef>
>> > <Cmd>SyncHdr</Cmd>
>> > <TargetRef>https://HOSTNAME:443/horde/rpc.php</TargetRef>
>> > <SourceRef>iph-PpMbXDksxKOlkU0oFXOIjQ==</SourceRef>
>> > <Data>200</Data>
>> > </Status>
>> > <Status><CmdID>2</CmdID>
>> > <MsgRef>1</MsgRef>
>> > <CmdRef>3</CmdRef>
>> > <Cmd>Alert</Cmd>
>> > <TargetRef>card</TargetRef>
>> > <SourceRef>addressbook</SourceRef>
>> > <Data>200</Data>
>> > <Item><Data><Anchor xmlns="syncml:metinf"><Next>1225216813</Next>
>> > </Anchor>
>> > </Data>
>> > </Item>
>> > </Status>
>> > <Status><CmdID>4</CmdID>
>> > <MsgRef>1</MsgRef>
>> > <CmdRef>4</CmdRef>
>> > <Cmd>Get</Cmd>
>> > <Data>200</Data>
>> > </Status>
>> > <Results><CmdID>3</CmdID>
>> > <MsgRef>1</MsgRef>
>> > <CmdRef>4</CmdRef>
>> > <Meta><Type xmlns="syncml:metinf">application/vnd.syncml-devinf+xml</Type>
>> > </Meta>
>> > <Item><Source><LocURI>./devinf11</LocURI>
>> > </Source>
>> > <Data><DevInf xmlns="syncml:devinf"><VerDTD>1.1</VerDTD>
>> > <Man>Funambol Inc.</Man>
>> > <Mod>iPhone</Mod>
>> > <OEM>Open Source</OEM>
>> > <SwV>7.0.3</SwV>
>> > <DevID>iph-PpMbXDksxKOlkU0oFXOIjQ==</DevID>
>> > <DevTyp>iPhone</DevTyp>
>> >  
>> <UTC/><SupportNumberOfChanges/><DataStore><SourceRef>addressbook</SourceRef>
>> > <Rx-Pref><CTType>text/x-vcard</CTType>
>> > <VerCT>2.1</VerCT>
>> > </Rx-Pref>
>> > <Rx><CTType>text/x-vcard</CTType>
>> > <VerCT></VerCT>
>> > </Rx>
>> > <Tx-Pref><CTType>text/x-vcard</CTType>
>> > <VerCT>2.1</VerCT>
>> > </Tx-Pref>
>> > <Tx><CTType>text/x-vcard</CTType>
>> > <VerCT></VerCT>
>> > </Tx>
>> > <SyncCap><SyncType>2</SyncType>
>> > <SyncType>1</SyncType>
>> > <SyncType>5</SyncType>
>> > <SyncType>3</SyncType>
>> > </SyncCap>
>> > </DataStore>
>> > </DevInf>
>> > </Data>
>> > </Item>
>> > </Results>
>> > <Sync><CmdID>5</CmdID>
>> > <Target><LocURI>card</LocURI>
>> > </Target>
>> > <Source><LocURI>addressbook</LocURI>
>> > </Source>
>> > <Add><CmdID>6</CmdID>
>> > <Meta><Type xmlns="syncml:metinf">text/x-vcard</Type>
>> > </Meta>
>> > <Item><Source><LocURI>571</LocURI>
>> > </Source>
>> > <Data><![CDATA[BEGIN:VCARD^M
>> > VERSION:2.1^M
>> > N:;Test a;;;^M
>> > BDAY:^M
>> > NOTE:^M
>> > TEL;VOICE;WORK:^M
>> > TEL;WORK;FAX:^M
>> > TEL;WORK;PREF:^M
>> > TEL;VOICE;HOME:^M
>> > TEL;HOME;FAX:^M
>> > TEL;FAX:^M
>> > TEL;CAR:^M
>> > TEL;CELL:^M
>> > TEL;VOICE:^M
>> > TEL;PAGER:^M
>> > TEL;PREF;VOICE:^M
>> > URL;WORK:^M
>> > URL;HOME:^M
>> > URL:^M
>> > EMAIL;INTERNET:^M
>> > EMAIL;INTERNET;HOME:^M
>> > EMAIL;INTERNET;WORK:^M
>> > TITLE:^M
>> > NICKNAME:^M
>> > ORG:;;^M
>> > ADR;HOME:;;;;;;^M
>> > ADR:;;;;;;^M
>> > ADR;WORK:;;;;;;^M
>> > PHOTO:^M
>> > END:VCARD^M
>> > ]]></Data>
>> > </Item>
>> > </Add>
>> > </Sync>
>> > <Final/></SyncBody>
>> > </SyncML>
>>
>> Either not a very useful contact anyway, or your client is broken, or
>> you removed all field values from the logs.
>>
>> Jan.
>>
> --
> sync mailing list - Join the hunt: http://horde.org/bounties/#sync
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: sync-unsubscribe at lists.horde.org
>



Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the sync mailing list