[#11232] PHP errors during syncml sync
Summary PHP errors during syncml sync
Queue Turba
Queue Version 3.0.14
Type Bug
State Assigned
Priority 1. Low
Owners jan@horde.org
Requester inform@tiker.net
Created 2012-07-01 (2638 days ago)
Due
Updated 2013-08-27 (2216 days ago)
Assigned 2013-08-27 (2216 days ago)
Resolved
Milestone
Patch No

Comments
inform@tiker.net 2012-07-01 22:52:16
Hi there,

when trying to sync from FunV10 on my Android phone, I get these error 
messages in my log:

Jul  1 15:46:55 buster HORDE: [turba] PHP ERROR: Illegal string offset 
'longitude' [pid 26565 on line 2041 of 
"/web/horde/base/turba/lib/Driver.php"]
Jul  1 15:46:55 buster HORDE: [turba] PHP ERROR: Uninitialized string 
offset: 0 [pid 26565 on line 2041 of 
"/web/horde/base/turba/lib/Driver.php"]

(lots of them, some also with "latitude" instead of longitude)

This message also came up:

Jul  1 15:39:40 buster HORDE: [horde] PHP ERROR: Undefined variable: 
suid [pid 26390 on line 391 of 
"/web/horde/horde-pear/pear/php/Horde/SyncMl/Backend/Horde.php"]

As you can probably imagine, the resulting sync didn't work out...

Thanks,
Andreas

Jan Schneider <jan@horde.org> 2012-07-02 15:14:00
> Hi there,
>
> when trying to sync from FunV10 on my Android phone, I get these 
> error messages in my log:
>
> Jul  1 15:46:55 buster HORDE: [turba] PHP ERROR: Illegal string 
> offset 'longitude' [pid 26565 on line 2041 of 
> "/web/horde/base/turba/lib/Driver.php"]
> Jul  1 15:46:55 buster HORDE: [turba] PHP ERROR: Uninitialized 
> string offset: 0 [pid 26565 on line 2041 of 
> "/web/horde/base/turba/lib/Driver.php"]
>
> (lots of them, some also with "latitude" instead of longitude)

Sounds like your phone is sending corrupt vCard entries. You shouldn't 
use iCalendar/vCard format with the Fun client anyway.

> This message also came up:
>
> Jul  1 15:39:40 buster HORDE: [horde] PHP ERROR: Undefined variable: 
> suid [pid 26390 on line 391 of 
> "/web/horde/horde-pear/pear/php/Horde/SyncMl/Backend/Horde.php"]

Known issue but irrelevant and shouldn't cause any problems during synching.

Please read http://wiki.horde.org/SyncMLProblemReport and follow the 
steps to generate complete SyncML debugging information.

inform@tiker.net 2012-07-02 19:07:30
> Sounds like your phone is sending corrupt vCard entries. You 
> shouldn't use iCalendar/vCard format with the Fun client anyway.

Can you elaborate? Where do I change this? Thanks!

Jan Schneider <jan@horde.org> 2012-07-02 19:30:52
>> Sounds like your phone is sending corrupt vCard entries. You shouldn't
>> use iCalendar/vCard format with the Fun client anyway.
>
> Can you elaborate? Where do I change this? Thanks!

Somewhere in the client settings. You want to use SIF data format.

inform@tiker.net 2012-07-02 19:53:50
I can't seem to find that setting. In any case, I'll produce a 
complete log tonight.

inform@tiker.net 2012-07-03 05:53:16
I'm attaching the sync log generated by horde.

It actually looks like Horde thought everything went swimmingly. The 
Android Funambol client didn't think so:

------------------------------------------------------------------------------------------------------
Mon Jul 02 15:47:22 EDT 2012 [INFO] [SynchronizationController] 
Starting request handler
Mon Jul 02 15:47:34 EDT 2012 [ERROR] [AppInitializer] Exception during 
account creation: (android.accounts.OperationCanceledException)
Mon Jul 02 15:47:34 EDT 2012 [ERROR] 
android.accounts.OperationCanceledException
        at 
android.accounts.AccountManager$AmsTask.internalGetResult(AccountManager.java:1340)
        at 
android.accounts.AccountManager$AmsTask.getResult(AccountManager.java:1368)
        at 
android.accounts.AccountManager$AmsTask.getResult(AccountManager.java:1289)
        at com.funambol.android.AppInitializer$1.run(AppInitializer.java:407)
        at android.accounts.AccountManager$10.run(AccountManager.java:1264)
        at android.os.Handler.handleCallback(Handler.java:605)
        at android.os.Handler.dispatchMessage(Handler.java:92)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:4575)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:511)
        at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
        at dalvik.system.NativeStart.main(Native Method)

Mon Jul 02 15:50:40 EDT 2012 [ERROR] [SyncManager] 
SyncException(com.funambol.sync.SyncException: Controlled interruption)
Mon Jul 02 15:50:40 EDT 2012 [ERROR] com.funambol.sync.SyncException: 
Controlled interruption
        at 
com.funambol.sync.client.ConfigSyncSource.beginSync(ConfigSyncSource.java:85)
        at com.funambol.syncml.spds.SyncManager.sync(SyncManager.java:580)
        at com.funambol.client.engine.SyncEngine.fireSync(SyncEngine.java:510)
        at 
com.funambol.client.engine.SyncEngine$SyncThread.synchronize(SyncEngine.java:436)
        at com.funambol.client.engine.SyncEngine$SyncThread.sync(SyncEngine.java:356)
        at com.funambol.client.engine.SyncEngine$SyncThread.run(SyncEngine.java:334)

Tue Jul 03 01:42:41 EDT 2012 [ERROR] [SyncManager] 
Exception(java.lang.StringIndexOutOfBoundsException: length=0; index=0)
Tue Jul 03 01:42:41 EDT 2012 [ERROR] 
java.lang.StringIndexOutOfBoundsException: length=0; index=0
        at com.funambol.util.Entities.unescape(Entities.java:245)
        at com.funambol.util.XmlUtil.unescapeXml(XmlUtil.java:96)
        at 
com.funambol.syncml.spds.SyncSourceLOHandler.getItem(SyncSourceLOHandler.java:1138)
        at com.funambol.syncml.spds.SyncManager.createSyncItem(SyncManager.java:2281)
        at com.funambol.syncml.spds.SyncManager.processCommand(SyncManager.java:2143)
        at 
com.funambol.syncml.spds.SyncManager.processSyncCommand(SyncManager.java:2201)
        at 
com.funambol.syncml.spds.SyncManager.processModifications(SyncManager.java:1837)
        at com.funambol.syncml.spds.SyncManager.sync(SyncManager.java:647)
        at com.funambol.client.engine.SyncEngine.fireSync(SyncEngine.java:510)
        at 
com.funambol.client.engine.SyncEngine$SyncThread.synchronize(SyncEngine.java:436)
        at com.funambol.client.engine.SyncEngine$SyncThread.sync(SyncEngine.java:356)
        at com.funambol.client.engine.SyncEngine$SyncThread.run(SyncEngine.java:334)

------------------------------------------------------------------------------------------------------

One of the funambol developers said this in response to my query here:
http://sourceforge.net/mailarchive/forum.php?thread_name=87pq8euqq9.fsf%40ding.tiker.net&forum_name=funambol-discussions

------------------------------------------------------------------------------------------------------
Hi Andreas,

  I seem to remember a bug with Horde that caused an invalid XML to be
  generated. In this case the client cannot extract the list of
  commands/items and therefore it cannot continue the sync process.

  HTH,
  Marco
------------------------------------------------------------------------------------------------------

I'd much appreciate any help.

Andreas