art1c0 / mooha

Automatically exported from code.google.com/p/mooha
0 stars 0 forks source link

Samsung phone cannot sync width "Decoding failed" #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. setup a server
2. try to sync with a samsung wave (other samsungs also seem to have problems)
3. you get a "decoding failed" message.

What is the expected output? What do you see instead?
normal sync.
instead, the sync does not work at all.

What version of the product are you using? On what operating system?
v 0.3b under linux

Please provide any additional information below.
it seems that mooha is working OK but samsung phones have problems with other 
sync softwares. this might not be fixable within mooha.

Original issue reported on code.google.com by squa...@gmail.com on 14 Dec 2010 at 4:27

GoogleCodeExporter commented 9 years ago
ok, i found out solution :) 
so please add this to the code.
I'm using libwbxml2 ... so, in file: incl/WbxmlHeper.php in line: 201, when 
invoking xml2wbxml command add -n parameter if samsung wave (probably will also 
fix problem with all samsung phones), this option is : do NOT generate String 
Table (Default: generate).
after i changed that i can sync phone with server. 

p.s.
sorry for not sending diff, and not even checking sync in other direction, but 
i don't have much time right now.. :)

Original comment by szalony...@gmail.com on 10 Jan 2011 at 10:04

GoogleCodeExporter commented 9 years ago
The positive point is that the wbxml output now looks like the same format as 
the input, but I still get the decoding error.

My config uses WBXML_VERSION = 1.2 and WBXML_USE_EXTERNAL = TRUE
I also use the debug server to get log messages.

user authentication is successful, and I see a successful request in the 
contact db

Do you have time to review the log if I send it to you?

Original comment by squa...@gmail.com on 11 Jan 2011 at 8:32

GoogleCodeExporter commented 9 years ago
I have the same problem with Samsung Star, -n parameter does not help...

Original comment by alecques on 20 Jan 2011 at 5:18

GoogleCodeExporter commented 9 years ago
Oh! I found the solution!!!

I made a small change in MoohaServer.php, line 1222:
if ($this->_getDatabaseAnchor($_SESSION['moohaUserId'], 
$dbId)) $alert->Item->Meta->Anchor->addChild('Last', 
$this->_getDatabaseAnchor($_SESSION['moohaUserId'], $dbId));

I don't know why, but Samsung does not want the empty Last in anchors meta.

After this change all synchronisation gone absolutely success!

Original comment by alecques on 20 Jan 2011 at 6:44

GoogleCodeExporter commented 9 years ago
Nice find.

There are two places where this is required:
-the one you spotted
-one another just before, the test must be 
if(!empty($bodyItem->Item->Meta->Anchor->Last)) {...}

With this change, I could sync... ONCE!

Now I also get decoding errors, but <Last> is not empty anymore.

This fix was an important step on the road to success, thanks.

Original comment by squa...@gmail.com on 20 Jan 2011 at 9:57

GoogleCodeExporter commented 9 years ago
Hmm, I tested some different models of samsung, all of them passed the sync 
successfully, in all ways: initial sync, changes from the phone, changes from 
the server...
All works fine now.

Original comment by alecques on 21 Jan 2011 at 5:11

GoogleCodeExporter commented 9 years ago
1 - did you test with a samsung wave ? (bada 1.0.2, not wave II with bada 1.2.x 
...)

2 - did you make any other change to your mooha setup?

Original comment by squa...@gmail.com on 21 Jan 2011 at 2:00

GoogleCodeExporter commented 9 years ago
1 - Samsung Wave, I did not test it, but I can give you temporary login and 
password on my test service to test it. (I have sent the auth data to your 
gmail)

2 - Any change at all.

Original comment by alecques on 24 Jan 2011 at 8:48

GoogleCodeExporter commented 9 years ago
Hey,

thanks for the proposal, but I'm not really OK to send you both my IMEI and all 
my contacts and calendar entries, I think you will understand me ;-)

Can you send me a link to download the php code you're using instead? thanks.

PS: BTW a git repository would be useful for this project.

Original comment by squa...@gmail.com on 24 Jan 2011 at 8:55

GoogleCodeExporter commented 9 years ago
I really don't have any interest in your contacts or IMEI :) But it's ok, I 
understand.

As for the code, by the moment of now I use the code downloaded from this 
project, only change I did is editing the line 1222 the way I mentioned above, 
nothing more...

Original comment by alecques on 24 Jan 2011 at 9:37

GoogleCodeExporter commented 9 years ago
Hello,
I am a total newcomer to mooha since I was looking for a solution to my 
Funambol problems. I just installed a mooha 0.3b server (using system on a 
Debian machine.
I get the same "decoding failed" error. 
I tried adding the -n parameter to the xml2wbxml invoking command xml2wbxml, 
then changing line 1222 as explained, but still no change.
Any help would be much appreciated :)

Original comment by antoine....@gmail.com on 6 Jan 2012 at 10:20

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I have tried changes from comment 4/5 but still getting "decoding failed" error.

Please help if there is a fix for this.

Cheers.

software: using moohav0.3b on drupal.

config:
'WBXML_VERSION' = '1.0'
'WBXML_USE_EXTERNAL' = FALSE

device: Samsung Corby Wifi GT-S3653W

Original comment by rscata...@gmail.com on 6 Aug 2012 at 5:14