CardDAV-Server XML-Response is malformed. Synchronization aborted! #28

Open
guenneguezt opened this Issue Aug 1, 2012 · 6 comments

Comments

Projects
None yet
6 participants
@guenneguezt

When I delete a card, I have the following error in log :
CardDAV-Server XML-Response is malformed. Synchronization aborted!
The card is deleted on carddav serveur.

@ghost

This comment has been minimized.

Show comment Hide comment
@ghost

ghost Sep 3, 2012

Hi,
Same problem on Roundcube 8.1 with Davical server v9.9.3 on Debian 6.
I modify the cardav_adressbook.php to have some more information (line 481)

catch (Exception $e)
{
self::write_log('CardDAV-Server XML-Response is malformed. Synchronization aborted!');
++ self::write_log($elements);
++ self::write_log($e);
return false;
}

Here the result :

[02-Sep-2012 01:53:59 +0200]: v0.5.1 | carddav_server_id: 1 | Starting CardDAV-Addressbook synchronization
[02-Sep-2012 01:54:01 +0200]: v0.5.1 | carddav_server_id: 1 | Connected to the CardDAV-Server https://xxx.domaine.tld/davical/caldav.php//
[02-Sep-2012 01:54:02 +0200]: v0.5.1 | carddav_server_id: 1 | CardDAV-Server XML-Response is malformed. Synchronization aborted!
[02-Sep-2012 01:54:02 +0200]: v0.5.1 | carddav_server_id: 1 |
[02-Sep-2012 01:54:02 +0200]: v0.5.1 | carddav_server_id: 1 | exception 'Exception' with message 'String could not be parsed as XML' in //roundcube/plugins/carddav/carddav_addressbook.php:401
Stack trace:
#0 //roundcube/plugins/carddav/carddav_addressbook.php(401): SimpleXMLElement->__construct('')
#1 //roundcube/plugins/carddav/carddav.php(305): carddav_addressbook->carddav_addressbook_sync(Array)
#2 [internal function]: carddav->carddav_addressbook_sync()
#3 //roundcube/program/include/rcube_plugin_api.php(316): call_user_func(Array)
#4 //roundcube/index.php(279): rcube_plugin_api->exec_action('plugin.carddav-...')
#5 {main}

I will investigate for more informations

ghost commented Sep 3, 2012

Hi,
Same problem on Roundcube 8.1 with Davical server v9.9.3 on Debian 6.
I modify the cardav_adressbook.php to have some more information (line 481)

catch (Exception $e)
{
self::write_log('CardDAV-Server XML-Response is malformed. Synchronization aborted!');
++ self::write_log($elements);
++ self::write_log($e);
return false;
}

Here the result :

[02-Sep-2012 01:53:59 +0200]: v0.5.1 | carddav_server_id: 1 | Starting CardDAV-Addressbook synchronization
[02-Sep-2012 01:54:01 +0200]: v0.5.1 | carddav_server_id: 1 | Connected to the CardDAV-Server https://xxx.domaine.tld/davical/caldav.php//
[02-Sep-2012 01:54:02 +0200]: v0.5.1 | carddav_server_id: 1 | CardDAV-Server XML-Response is malformed. Synchronization aborted!
[02-Sep-2012 01:54:02 +0200]: v0.5.1 | carddav_server_id: 1 |
[02-Sep-2012 01:54:02 +0200]: v0.5.1 | carddav_server_id: 1 | exception 'Exception' with message 'String could not be parsed as XML' in //roundcube/plugins/carddav/carddav_addressbook.php:401
Stack trace:
#0 //roundcube/plugins/carddav/carddav_addressbook.php(401): SimpleXMLElement->__construct('')
#1 //roundcube/plugins/carddav/carddav.php(305): carddav_addressbook->carddav_addressbook_sync(Array)
#2 [internal function]: carddav->carddav_addressbook_sync()
#3 //roundcube/program/include/rcube_plugin_api.php(316): call_user_func(Array)
#4 //roundcube/index.php(279): rcube_plugin_api->exec_action('plugin.carddav-...')
#5 {main}

I will investigate for more informations

@earendilfr

This comment has been minimized.

Show comment Hide comment
@earendilfr

earendilfr Sep 15, 2012

I sync I have found the problem.
In carddav_backend.php file. the funtion get doesn’t initialise the XML request send to the server for the PROPFIND.

You can add the replace the following lines :

211,212c211,224
<   {
<       $response = $this->query($this->url, 'PROPFIND');
---
>     {
>         $xml = new XMLWriter();
>         $xml->openMemory();
>         $xml->setIndent(4);
>         $xml->startDocument('1.0', 'utf-8');
>             $xml->startElement('D:propfind');
>                 $xml->writeAttribute('xmlns:D', 'DAV:');
>                 $xml->startElement('D:prop');
>                         $xml->writeElement('D:resourcetype');
>                 $xml->endElement();
>             $xml->endElement();
>         $xml->endDocument();
> 
>       $response = $this->query($this->url, 'PROPFIND', $xml->outputMemory());

I sync I have found the problem.
In carddav_backend.php file. the funtion get doesn’t initialise the XML request send to the server for the PROPFIND.

You can add the replace the following lines :

211,212c211,224
<   {
<       $response = $this->query($this->url, 'PROPFIND');
---
>     {
>         $xml = new XMLWriter();
>         $xml->openMemory();
>         $xml->setIndent(4);
>         $xml->startDocument('1.0', 'utf-8');
>             $xml->startElement('D:propfind');
>                 $xml->writeAttribute('xmlns:D', 'DAV:');
>                 $xml->startElement('D:prop');
>                         $xml->writeElement('D:resourcetype');
>                 $xml->endElement();
>             $xml->endElement();
>         $xml->endDocument();
> 
>       $response = $this->query($this->url, 'PROPFIND', $xml->outputMemory());
@fmbiete

This comment has been minimized.

Show comment Hide comment
@fmbiete

fmbiete Sep 17, 2012

It's the same problem/solution as issue #29
graviox#29

fmbiete commented Sep 17, 2012

It's the same problem/solution as issue #29
graviox#29

@bryan977

This comment has been minimized.

Show comment Hide comment
@bryan977

bryan977 Feb 1, 2013

Have anyone got this plugin working on Mountain Lion? I've tried the fixes in #29 and #36 (and above); however, I still have problems. I still receive the "ardDAV-Server XML-Response is malformed. Synchronization aborted!" error. Thanks so much!

bryan977 commented Feb 1, 2013

Have anyone got this plugin working on Mountain Lion? I've tried the fixes in #29 and #36 (and above); however, I still have problems. I still receive the "ardDAV-Server XML-Response is malformed. Synchronization aborted!" error. Thanks so much!

@sylvestrerd

This comment has been minimized.

Show comment Hide comment
@sylvestrerd

sylvestrerd Sep 9, 2013

graviox#32 Mountain Lion Contacts cardDAV server sync problems.

graviox#32 Mountain Lion Contacts cardDAV server sync problems.

@cscholz

This comment has been minimized.

Show comment Hide comment
@cscholz

cscholz Jul 15, 2014

I've got the same issue when I try to connect against owncloud 6.

Jul 16 01:23:53 mx02 roundcube: v0.5.1 | carddav_server_id: 1 | Starting CardDAV-Addressbook synchronization
Jul 16 01:23:54 mx02 roundcube: v0.5.1 | carddav_server_id: 1 | Connected to the CardDAV-Server https://.../owncloud/remote.php/carddav/principals/cscholz
Jul 16 01:23:54 mx02 roundcube: v0.5.1 | carddav_server_id: 1 | CardDAV-Server XML-Response is malformed. Synchronization aborted!

I've already modified the carddav_backend.php like described above but the problem is the same.

Exists a fix for this?

cscholz commented Jul 15, 2014

I've got the same issue when I try to connect against owncloud 6.

Jul 16 01:23:53 mx02 roundcube: v0.5.1 | carddav_server_id: 1 | Starting CardDAV-Addressbook synchronization
Jul 16 01:23:54 mx02 roundcube: v0.5.1 | carddav_server_id: 1 | Connected to the CardDAV-Server https://.../owncloud/remote.php/carddav/principals/cscholz
Jul 16 01:23:54 mx02 roundcube: v0.5.1 | carddav_server_id: 1 | CardDAV-Server XML-Response is malformed. Synchronization aborted!

I've already modified the carddav_backend.php like described above but the problem is the same.

Exists a fix for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment