[sync] Latest Findings: Root cause for interop isssue Funambol 6.5 vs Horde 4 found, but how to fix?

Christian Bomhardt horde at bomhardt.de
Thu Nov 10 16:18:39 UTC 2011


On 09.11.2011 19:59, Christian Bomhardt wrote:
> On 09.11.2011 19:07, Jan Schneider wrote:
>> Please don't top-post.
>>
>> Zitat von Christian Bomhardt <horde at bomhardt.de>:
>>
>>> On 09.11.2011 12:31, Jan Schneider wrote:
>>>>
>>>> Zitat von Christian Bomhardt <horde at bomhardt.de>:
>>>>
>>>>> On 09.11.2011 12:02, Jan Schneider wrote:
>>>>>>
>>>>>> Zitat von lst_hoe02 at kwsoft.de:
>>>>>>
>>>>>>> Zitat von Christian Bomhardt <horde at bomhardt.de>:
>>>>>>>
>>>>>>>> Hi experts,
>>>>>>>>
>>>>>>>> now, I managed to find the root cause why syncing of Horde 4 with
>>>>>>>> my Funambol 6.5.18 (Windows Mobile) doesn't work (with old Horde
>>>>>>>> Webmail it worked fine)
>>>>>>>>
>>>>>>>> The APIs do (no longer?) support the desired content types:
>>>>>>>> (see below error output after I added according logging (seems 
>>>>>>>> that
>>>>>>>> the exception currently thrown in export messages of API is not
>>>>>>>> logged accordingly or I have overseen it):
>>>>>>>>
>>>>>>>> 2011-11-08T21:38:49+00:00 ERR: HORDE [kronolith] Kronolith
>>>>>>>> unspported content type text/x-s4j-sife [pid 19212 on line 794 of
>>>>>>>> "/kronolith/lib/API.php
>>>>>>>> 2011-11-08T21:38:49+00:00 ERR: HORDE [nag] Unsupported Content
>>>>>>>> text/x-s4j-sift [pid 19212 on line 1061 of "/nag/lib/API.php
>>>>>>>> 2011-11-08T21:38:49+00:00 ERR: HORDE [mnemo] Mnemo Export
>>>>>>>> unsupported Content Type text/x-s4j-sifn [pid 19212 on line 276 of
>>>>>>>> "/mnemo/lib/API.php"
>>>>>>>>
>>>>>>>> Is it a bug that these content types are (no longer) supported? 
>>>>>>>> Any
>>>>>>>> hints how to best include it again?
>>>>>>>
>>>>>>> The SIF-X content types are a invention of Funambol and they have
>>>>>>> ceased using it since Version 8 as far as i remember. So this
>>>>>>> content type is dead and i doubt it will be included in Horde4.
>>>>>>> Your only chance is to get a newer than 8 Funambol client.
>>>>>>
>>>>>> They are still supported by Horde. It looks like your client is not
>>>>>> detected as a Funambol/Sync4j client though.
>>>>>>
>>>>>> Jan.
>>>>>>
>>>>> Hi Jan,
>>>>>
>>>>> thanks for the info. During my debugging I found out that coding in
>>>>> ../PEAR/Horde/SyncMl/Device/Sync4j is executed. Is in that case your
>>>>> assumption still true?
>>>>>
>>>>> How/where can I trace to get it fixed?
>>>>
>>>> See the wiki for how to create syncml logs.
>>>>
>>> Hi,
>>>
>>> pls find attached the logs from /tmp/sync. For simplicity, I only 
>>> synced notes.
>>>
>>> Horde Version: 4.0.11
>>> Funambol: 6.5.18 (HTC Touch 3g)
>>> No PHP errors showed up in the PHP error log
>>
>> This doesn't look like a correct log. It's from synchronizing from 
>> server to client, but your problem was when synchronizing from client 
>> to server, right?
>>
>> Jan.
>>
> Hi Jan,
>
> it is the correct log. I am synchronizing from server to client. I 
> setup funambol to only "sync"/copy from server to phone as I never 
> maintain entries on the mobile (too difficult) and I only sync 
> occasionally. (to be honest: I do not fully trust these syncs - so I 
> prefer having valid data on horde and maybe partially 
> invalid/incomplete data on my phone instead of messing all up for the 
> very very rare use case to adjust anything directly on the mobile...
>
> Anything else I can do to help analyzing?
>
> By the way - does anybody know where to find valid x-s4j-sif* sync 
> samples? I could maybe hack it into the existing code, but I don't 
> find out how it should look like to work...
>
> thanks, Christian

Hi,

pls find below my latest findings why syncing out of the box doesn't work:

Client request somehow calls into ../SyncMl/Sync.php, method 
createSyncOutput

Here, below /* Handle additions */ (in my modified file row 485)
$c = $backend->retrieveEntry(.,ct$,..) is called

with $ct=Funambol Content types, e.g. text/x-s4j-sife

This ends up in corresponding Application/lib/Api.php =>export method

All my export methods do not return anything for the funambol content 
types but throw an exception

Potential ways to fix as of my impression:
a)Adjust API export methods to return valid funambol data (e.g. 
text/x-s4j-sife) and everything should be fine
b)Adjust Sync to call retrieveEntry with content types supported by the 
API->export and then run through the content type conversion as already 
implemented
c)Different approach I have not yet considered

If I would only fix it for myself, I would probably pick approach A as 
this looks easier for me - but will get broken with next upgrade. 
Approach B looks more like a generic, solid patch.

Pls advice.
Any comments or remarks?

Thanks,
Christian





More information about the sync mailing list