Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand CalDAVRemoveEmptyValue.php to fix additional 'Unsupported VALUE parameter for DTEND property' errors that cause sync issues #17554

Open
maertsen opened this issue Oct 15, 2019 · 5 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: caldav Related to CalDAV internals feature: dav

Comments

@maertsen
Copy link

I just squashed a long existing type of error message in my logs, of the form 'Unsupported VALUE parameter for DTEND property'. I tracked this down to incorrect VCARD data created while running Owncloud Calendar 0.8.1.

The following patch to apps/dav/lib/Migration/CalDAVRemoveEmptyValue.php combined with a call to occ maintenance:repair fixes the incorrect VCARD data. This fixed all kinds of sync issues with shared calendars on my installation. Please consider integrating similar logic for other users benefit.

61c61
<               $pattern = 'DTEND;VALUE=;';
---
>               $pattern = ';VALUE=:';
69c69
<                       $data = preg_replace('/' . $pattern . '/', 'DTEND;', $calObject['calendardata']);
---
>                       $data = preg_replace('/' . $pattern . '/', ':', $calObject['calendardata']);

This is an example of the invalid VCARD data (newlines added for legibility):

BEGIN:VCALENDAR\n
VERSION:2.0\n
PRODID:ownCloud Calendar 0.8.1\n
BEGIN:VEVENT\r\n
DTSTAMP:20160212T233814Z\r\n
UID:123@example.org\r\n
SUMMARY:FooEvent\r\n
ORGANIZER:mailto:user@example.org\r\n
STATUS:CONFIRMED\r\n
DTSTART;TZID=Europe/Paris:20151212T140000\r\n
DTEND;VALUE=;TZID=Europe/Paris:20151212T200000\r\n
END:VEVENT\r\n
END:VCALENDAR

example stack trace:

[webdav] Fatal: Sabre\VObject\InvalidDataException: Unsupported VALUE parameter for DTEND property. You supplied "" at <<closure>>

 0. /path/to/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php line 454
    Sabre\VObject\Document->createProperty("DTEND", null, {VALUE: "",TZID: "<TIMEZONE>"})
 1. /path/to/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php line 234
    Sabre\VObject\Parser\MimeDir->readProperty("DTEND;VALUE=;TZ ... 0")
 2. /path/to/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php line 217
    Sabre\VObject\Parser\MimeDir->parseLine("DTEND;VALUE=;TZ ... 0")
 3. /path/to/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php line 181
    Sabre\VObject\Parser\MimeDir->parseLine("DTEND;VALUE=;TZ ... 0")
 4. /path/to/nextcloud/3rdparty/sabre/vobject/lib/Parser/MimeDir.php line 89
    Sabre\VObject\Parser\MimeDir->parseDocument()
 5. /path/to/nextcloud/3rdparty/sabre/vobject/lib/Reader.php line 46
    Sabre\VObject\Parser\MimeDir->parse("BEGIN:VCALENDAR ... R", 0)
 6. /path/to/nextcloud/apps/dav/lib/CalDAV/CalendarObject.php line 61
    Sabre\VObject\Reader::read("BEGIN:VCALENDAR ... R")
 7. /path/to/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php line 413
    OCA\DAV\CalDAV\CalendarObject->get()
 8. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php line 98
    Sabre\CalDAV\Plugin->Sabre\CalDAV\{closure}("*** sensitive parameters replaced ***")
 9. /path/to/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php line 420
    Sabre\DAV\PropFind->handle("{urn:ietf:param ... a", Closure {})
10. <<closure>>
    Sabre\CalDAV\Plugin->propFind(Sabre\DAV\PropFind {}, OCA\DAV\CalDAV\CalendarObject {})
11. /path/to/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([OCA\DAV\CalDAV\Plugin {},"propFind"], [Sabre\DAV\PropF ... }])
12. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1059
    Sabre\Event\EventEmitter->emit("propFind", [Sabre\DAV\PropF ... }])
13. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1025
    Sabre\DAV\Server->getPropertiesByNode(Sabre\DAV\PropFind {}, OCA\DAV\CalDAV\CalendarObject {})
14. /path/to/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php line 447
    Sabre\DAV\Server->getPropertiesForMultiplePaths(["calendars/<USER> ... "], ["{DAV:}getetag" ... "])
15. /path/to/nextcloud/3rdparty/sabre/dav/lib/CalDAV/Plugin.php line 246
    Sabre\CalDAV\Plugin->calendarMultiGetReport(Sabre\CalDAV\Xml ... "})
16. <<closure>>
    Sabre\CalDAV\Plugin->report("{urn:ietf:param ... t", Sabre\CalDAV\Xml ... "}, "calendars/<USER> ... n")
17. /path/to/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([OCA\DAV\CalDAV\Plugin {},"report"], ["{urn:ietf:para ... "])
18. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 718
    Sabre\Event\EventEmitter->emit("report", ["{urn:ietf:para ... "])
19. <<closure>>
    Sabre\DAV\CorePlugin->httpReport(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
20. /path/to/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    undefinedundefinedcall_user_func_array([Sabre\DAV\CorePlugin {},"httpReport"], [Sabre\HTTP\Requ ... }])
21. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 479
    Sabre\Event\EventEmitter->emit("method:REPORT", [Sabre\HTTP\Requ ... }])
22. /path/to/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Reque ... "}, Sabre\HTTP\Response {})
23. /path/to/nextcloud/apps/dav/lib/Server.php line 316
    Sabre\DAV\Server->exec()
24. /path/to/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
25. /path/to/nextcloud/remote.php line 163
    undefinedundefinedrequire_once("/path/to/nextcl ... p")

REPORT /nextcloud/remote.php/dav/calendars/<USER>/<CALENDAR>/
from <IP> by <USER> at <TIMESTAMP>
@kesselb
Copy link
Contributor

kesselb commented Oct 15, 2019

cc @georgehrke

@georgehrke
Copy link
Member

@maertsen Can you please send a pull-request for your proposed change? Thx!

@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of bug feature: dav labels Dec 9, 2019
@skjnldsv
Copy link
Member

skjnldsv commented Dec 9, 2019

ping @maertsen

@georgehrke georgehrke added enhancement and removed bug labels Dec 9, 2019
@georgehrke

This comment has been minimized.

@skjnldsv

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: caldav Related to CalDAV internals feature: dav
Projects
None yet
Development

No branches or pull requests

5 participants