owncloud / contacts

:busts_in_silhouette: Manage your CardDAV contacts from a feature-rich web-interface
75 stars 46 forks source link

Error with contacts sync with webdav and contacts 9.0 after upgrade #275

Closed alweiler closed 8 years ago

alweiler commented 8 years ago

After upgrade sync is not working in log

Exception: {"Message":"Invalid Mimedir file. Line starting at 8 did not follow iCalendar\/vCard conventions","Exception":"Sabre\VObject\ParseException","Code":0,"Trace":"#0 \/var\/www\/owncloud\/3rdparty\/sabre\/vobject\/lib\/Parser\/MimeDir.php(189): Sabre\VObject\Parser\MimeDir->readProperty(';UNKNOWN=\"MOBIL...')\n#1 \/var\/www\/owncloud\/3rdparty\/sabre\/vobject\/lib\/Parser\/MimeDir.php(137): Sabre\VObject\Parser\MimeDir->parseLine(';UNKNOWN=\"MOBIL...')\n#2 \/var\/www\/owncloud\/3rdparty\/sabre\/vobject\/lib\/Parser\/MimeDir.php(63): Sabre\VObject\Parser\MimeDir->parseDocument()\n#3 \/var\/www\/owncloud\/3rdparty\/sabre\/vobject\/lib\/Reader.php(44): Sabre\VObject\Parser\MimeDir->parse('BEGIN:VCARD??VE...', 0)\n#4 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/CardDAV\/Plugin.php(477): Sabre\VObject\Reader::read('BEGIN:VCARD??VE...')\n#5 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/CardDAV\/Plugin.php(422): Sabre\CardDAV\Plugin->validateFilters('BEGIN:VCARD??VE...', Array, 'anyof')\n#6 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/CardDAV\/Plugin.php(202): Sabre\CardDAV\Plugin->addressbookQueryReport(Object(Sabre\CardDAV\Xml\Request\AddressBookQueryReport))\n#7 [internal function]: Sabre\CardDAV\Plugin->report('{urn:ietf:param...', Object(Sabre\CardDAV\Xml\Request\AddressBookQueryReport), 'addressbooks\/us...')\n#8 \/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#9 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(718): Sabre\Event\EventEmitter->emit('report', Array)\n#10 [internal function]: Sabre\DAV\CorePlugin->httpReport(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#11 \/var\/www\/owncloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#12 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(459): Sabre\Event\EventEmitter->emit('method:REPORT', Array)\n#13 \/var\/www\/owncloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#14 \/var\/www\/owncloud\/apps\/dav\/lib\/server.php(137): Sabre\DAV\Server->exec()\n#15 \/var\/www\/owncloud\/apps\/dav\/appinfo\/v2\/remote.php(29): OCA\DAV\Server->exec()\n#16 \/var\/www\/owncloud\/remote.php(138): require_once('\/var\/www\/ownclo...')\n#17 {main}","File":"\/var\/www\/owncloud\/3rdparty\/sabre\/vobject\/lib\/Parser\/MimeDir.php","Line":385,"User":"alvar"}

Steps to reproduce

1. 2. 3.

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Server configuration

Operating system:

Web server:

Database:

PHP version:

ownCloud version: (see ownCloud admin page)

Contacts version: (see ownCloud apps page)

Updated from an older ownCloud or fresh install:

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder

The content of config/config.php:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

or 

Insert your config.php content here
(Without the database password, passwordsalt and secret)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

CardDAV-clients:

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

Insert your ownCloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
gvde commented 8 years ago
  1. carddav is part of the core, i.e. this is a core issue.
  2. You have a card which contains a line starting with ';UNKNOWN=\"MOBIL...'. That is broken. Fix the card to in the database...
alweiler commented 8 years ago

In which table. In zsdcards, or somewhere else

gvde commented 8 years ago

What is "zsdcards"? Usually the table is called "oc_contacts_cards".

But again: it's a core issue. Open an issue in the core...

alweiler commented 8 years ago

ok. But also I can't see contacts after upgrade. They are in table, but from web interface I can't see them

gvde commented 8 years ago

It's in the database of your owncloud server.

alweiler commented 8 years ago

yes, in database table. But through web gui it is empty

DeepDiver1975 commented 8 years ago

But through web gui it is empty

because the data is broken and cannot be displayed

DeepDiver1975 commented 8 years ago

closing this because if invalid data - nothing we can do

gvde commented 8 years ago

@DeepDiver1975 Well, I think it should handle invalid data in the database more gracefully than throwing an exception and leaving carddav or the web app in an undefined state... I could of a couple of things that you could do...

gvde commented 8 years ago

@alweiler

yes, in database table. But through web gui it is empty

Fix the card in the database and it should work again...

DeepDiver1975 commented 8 years ago

Well, I think it should handle invalid data in the database more gracefully than throwing an exception and leaving carddav or the web app in an undefined state... I could of a couple of things that you could do...

generally speaking you are right - but vcards are validated before they are put to the db - so scenarios like this should not happen .... well should :see_no_evil:

feel free to open an issue in the core repo - THX

gvde commented 8 years ago

Well should... In particular if people wouldn't upgrade from previous versions...

I opened an issue this morning but somehow I don't find it anymore. Now again, maybe here: owncloud/core#23566

DeepDiver1975 commented 8 years ago

I opened an issue this morning but somehow I don't find it anymore. Now again, maybe here: owncloud/core#23566

THX

alweiler commented 8 years ago

and second problem for me is, that I cant add contacts through web gui. There are lot javascript errors dav.js?v=1509952…:3669 Refused to connect to 'http://remote.php/dav/addressbooks' because it violates the following Content Security Policy directive: "connect-src 'self'".

gvde commented 8 years ago

and second problem for me is

a second problem is a different issue. Open a new issue...

DeepDiver1975 commented 8 years ago

a second problem is a different issue. Open a new issue...

there is already one ... somewhere ...