art1c0 / mooha

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

Data transfer not possible #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Start Synchronization from Nokia 6500c, Nokia 6700.
Phone view Dialog "Data transfer not possible" and Synchronization stoping.
I am using Standalone MoohaServer 1.02b.

Original issue reported on code.google.com by and...@hisinfo.org on 15 Mar 2010 at 6:20

GoogleCodeExporter commented 9 years ago
This problem is on mooha_server0.2b too! =( 

Original comment by pavelkar...@gmail.com on 15 Mar 2010 at 7:32

GoogleCodeExporter commented 9 years ago
Please make sync with the Demo on mooha.net - I will capture the dialog with 
your
devices and will fix the issue!

Original comment by artico.b...@gmail.com on 17 Mar 2010 at 7:04

GoogleCodeExporter commented 9 years ago
I made a request, but your server return HTTP 500 Internal Sever Error

Original comment by and...@hisinfo.org on 17 Mar 2010 at 11:48

GoogleCodeExporter commented 9 years ago
Please do following:
0. Add a key into $config array at the end of config.php: "'forceFormat' => 
'WBXML'"
- may be this will solve your problem cause that Nokia maybe doesn't send a 
correct
header. If problem is not solved do the next:
1. Add directory named "data" into your "mooha" folder and add write 
permissions to
it for your webserver.
2. Change your index.php file: instead of string "$mooha->process();" insert
following code. Then when you sync you will have complete log into the "data" 
folder.
Please send me that log on email.

///////////////////////////// insert this code instead of "$mooha->process();"
// incremental log
$n = 0;
foreach (scandir('data') as $file) {
  if ($file == '.' || $file == '..' || strpos($file, 'client_') !== 0) {
    continue;
  }
  $fp = explode('.', $file);
  $fp = explode('_', $fp[0]);
  $fn = (int)$fp[1];
  if ($fn > $n) {
    $n = $fn;
  }
}
$n++;

// do all tasks separately
$mooha->request();
file_put_contents('data/client_' . $n . '.xml', $mooha->getRequest()->asXML());

$mooha->response();
file_put_contents('data/server_' . $n . '.xml', $mooha->getResponse()->asXML());

$mooha->headers();

print $mooha->getOutput();

// get headers
ob_end_flush();
$header = "---request\n";
foreach ($mooha->getRequestHeaders() as $key => $value) {
    $header .= $key . ': ' . $value . "\n";
}
$header .= "\n\n---response\n";
foreach ($mooha->getResponseHeaders() as $key => $value) {
    $header .= $key . ': ' . $value . "\n";
}
file_put_contents('data/header_' . $n . '.txt', $header);

Original comment by artico.b...@gmail.com on 17 Mar 2010 at 4:26

GoogleCodeExporter commented 9 years ago
Please give me your email, i send you my logs

Original comment by and...@hisinfo.org on 18 Mar 2010 at 1:23

GoogleCodeExporter commented 9 years ago
As I see from the logs you sent to me, syncronisation was successfully prepared 
for
the data transfer, but as you say error was "Data transfer not possible".
It's strange that your device even didn't try to send something.
May be it's because of an empty Last Anchor sent by the server. It is normal for
other devices, but may be these phones has not such a good SyncML client.

So try to do following:
1. Update the latest version from SVN (rev.41)
2. Open file MoohaServer.php and go to line 1172.
3. Replace the string:

$alert->Item->Meta->Anchor->addChild('Last',
$this->_getDatabaseAnchor($_SESSION['moohaUserId'], $alertDatabase));

with two these strings:

$dbAnchor = $this->_getDatabaseAnchor($_SESSION['moohaUserId'], $alertDatabase);
$alert->Item->Meta->Anchor->addChild('Last', empty($dbAnchor) ? 0 : $dbAnchor);

4. Try to do sync and send logs to me again.
I hope it will help!

Original comment by artico.b...@gmail.com on 19 Mar 2010 at 10:11

GoogleCodeExporter commented 9 years ago

Original comment by artico.b...@gmail.com on 21 May 2010 at 7:03