Kozea / Radicale

A simple CalDAV (calendar) and CardDAV (contact) server.
https://radicale.org
GNU General Public License v3.0
3.28k stars 430 forks source link

radicale did not recognize VLIST #661

Closed pbiering closed 7 years ago

pbiering commented 7 years ago

After migration to radicale-2.1.1 it turns out that VLIST is not supported (anymore):

[7f1630b89700] ERROR: An exception occurred during PROPFIND request on '/USER/': Failed to load item 'C7579***.vlf' in 'USER/FOLDER.vcf': Unknown item type: 'VLIST'
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/radicale/storage.py", line 1111, in _get_with_metadata
    check_and_sanitize_item(vobject_item, uid=cuid)
  File "/usr/lib/python3.4/site-packages/radicale/storage.py", line 171, in check_and_sanitize_item
    raise ValueError("Unknown item type: %r" % vobject_item.name)
ValueError: Unknown item type: 'VLIST'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/radicale/__init__.py", line 298, in __call__
    status, headers, answers = self._handle_request(environ)
  File "/usr/lib/python3.4/site-packages/radicale/__init__.py", line 464, in _handle_request
    environ, base_prefix, path, user)
  File "/usr/lib/python3.4/site-packages/radicale/__init__.py", line 742, in do_PROPFIND
    base_prefix, path, xml_content, read_items, write_items, user)
  File "/usr/lib/python3.4/site-packages/radicale/xmlutils.py", line 746, in propfind
    base_prefix, path, collection, props, user, write=True)
  File "/usr/lib/python3.4/site-packages/radicale/xmlutils.py", line 831, in _propfind_response
    element.text = item.etag
  File "/usr/lib/python3.4/site-packages/radicale/storage.py", line 1328, in etag
    for item in self.get_all():
  File "/usr/lib/python3.4/site-packages/radicale/storage.py", line 1184, in <genexpr>
    return (self.get(href, verify_href=False) for href in self.list())
  File "/usr/lib/python3.4/site-packages/radicale/storage.py", line 1063, in get
    item, metadata = self._get_with_metadata(href, verify_href=verify_href)
  File "/usr/lib/python3.4/site-packages/radicale/storage.py", line 1114, in _get_with_metadata
    (href, self.path, e)) from e
RuntimeError: Failed to load item 'C7579****.vlf' in 'USER/FOLDER.vcf': Unknown item type: 'VLIST'

contents of such VLIST

BEGIN:VLIST
CARD;EMAIL=test@example.com;FN=Example, Test:C685D2***.vcf
DESCRIPTION:Test
FN:Test
NICKNAME:Test
PRODID:-//Inverse inc.//SOGo Connector 1.0//EN
UID:C75799***.vlf
VERSION:1.0
END:VLIST
Unrud commented 7 years ago

This is not in the RFC. Does SOGo Connector still work, if you change VLIST to VCALENDAR manually? If it works we can just add something like the following to check_and_sanitize_item in storage.py:

if vobject_item.name == "VLIST":
   vobject_item.name =  "VCALENDAR"
pbiering commented 7 years ago

Sorry, did not understand, the problematic vlf file (address group) is stored in the same "FOLDER.vcf" where all my other vcf files are stored -> why/what should I change to VCALENDAR then?

Unrud commented 7 years ago

BEGIN:VLIST to BEGIN:VCALENDAR and END:VLIST to END:VCALENDAR in file created by SOGo Connector. Does SOGo Connector still recognize the event or does it break in any way?

pbiering commented 7 years ago

It's not an event, it (was) SOGo connector for the addressbook (dedicated URL), not for the calendar.

But probably SOGo addressbook connector is buggy here and use not compliant VLIST.

I have SOGo addressbook connector anyhow replaced with CardBook since some time - created now a new list of contacts and it looks like the format is totally different:

BEGIN:VCARD
VERSION:3.0
UID:***
FN:TestListe
N:;;;;
REV:20170719T225210Z
X-ADDRESSBOOKSERVER-KIND:group
X-ADDRESSBOOKSERVER-MEMBER:urn:uuid:***.vc
 f
X-THUNDERBIRD-ETAG:0
END:VCARD

I hope this is according to standard...at least radicale stored it without complains.

=> if VLIST is non-standard, then probably that issue can be closed without a resolution.

Unrud commented 7 years ago

It's not an event, it (was) SOGo connector for the addressbook (dedicated URL), not for the calendar.

I've no idea how I came to the conclusion that it is an event.

But probably SOGo addressbook connector is buggy here and use not compliant VLIST.

VLIST is a custom format of SOGo Connector for a list of contacts.

pierredGitHub commented 5 years ago

I am getting the same error "An exception occurred during PROPFIND request on ....... Failed to parse item ....." in the Radicale log while syncing contacts between 3 clients (2 computers and 1 phone). It started recently (in the past couple of weeks) even though I have not changed Radicale nor Python versions in a few months. So it could be a Windows update. But not sure. Any idea?

Is there a way to add a timestamp to the entries in the log with some option? It would help to know when something has happened.