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

Sabre\DAV\Exception\UnsupportedMediaType: HTTP/1.1 415 Validation error in iCalendar: ATTACH MUST NOT appear more than once in a VALARM component #4874

Closed
LukasReschke opened this issue May 15, 2017 · 13 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: dav

Comments

@LukasReschke
Copy link
Member

On c.nc.c with @oparoz's calendar:

/var/www/html/3rdparty/sabre/dav/lib/CalDAV/Plugin.php - line 772: Sabre\CalDAV\Plugin->validateICalendar('BEGIN VCALENDAR...', 'calendars/olivi...', false, Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response), false)
[internal function] Sabre\CalDAV\Plugin->beforeWriteContent('calendars/olivi...', Object(OCA\DAV\CalDAV\CalendarObject), 'BEGIN VCALENDAR...', false)
/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 1127: Sabre\Event\EventEmitter->emit('beforeWriteCont...', Array)
/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 513: Sabre\DAV\Server->updateFile('calendars/olivi...', 'BEGIN VCALENDAR...', NULL)
[internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PUT', Array)
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/html/apps/dav/lib/Server.php - line 245: Sabre\DAV\Server->exec()
/var/www/html/apps/dav/appinfo/v2/remote.php - line 33: OCA\DAV\Server->exec()
/var/www/html/remote.php - line 162: require_once('/var/www/html/a...')
{main}

{"reqId":"mos7dqVkCSCcpuuI4nRg","level":4,"time":"2017-05-15T09:39:26+00:00","remoteAddr":"XXX","user":"olivier","app":"webdav","method":"PUT","url":"/remote.php/dav/calendars/olivier/vacations_shared_by_Nextcloud/20170418T171142Z-4f2b412a84c9a52d.ics","message":"Exception: {"Message":"HTTP\/1.1 415 Validation error in iCalendar: ATTACH MUST NOT appear more than once in a VALARM component","Exception":"Sabre\\DAV\\Exception\\UnsupportedMediaType","Code":0,"Trace":"#0 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/CalDAV\/Plugin.php(772): Sabre\\CalDAV\\Plugin->validateICalendar('BEGIN:VCALENDAR...', 'calendars\/olivi...', false, Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response), false)\n#1 [internal function]: Sabre\\CalDAV\\Plugin->beforeWriteContent('calendars\/olivi...', Object(OCA\\DAV\\CalDAV\\CalendarObject), 'BEGIN:VCALENDAR...', false)\n#2 \/var\/www\/html\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#3 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(1127): Sabre\\Event\\EventEmitter->emit('beforeWriteCont...', Array)\n#4 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php(513): Sabre\\DAV\\Server->updateFile('calendars\/olivi...', 'BEGIN:VCALENDAR...', NULL)\n#5 [internal function]: Sabre\\DAV\\CorePlugin->httpPut(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#6 \/var\/www\/html\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#7 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(479): Sabre\\Event\\EventEmitter->emit('method:PUT', Array)\n#8 \/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#9 \/var\/www\/html\/apps\/dav\/lib\/Server.php(245): Sabre\\DAV\\Server->exec()\n#10 \/var\/www\/html\/apps\/dav\/appinfo\/v2\/remote.php(33): OCA\\DAV\\Server->exec()\n#11 \/var\/www\/html\/remote.php(162): require_once('\/var\/www\/html\/a...')\n#12 {main}","File":"\/var\/www\/html\/3rdparty\/sabre\/dav\/lib\/CalDAV\/Plugin.php","Line":917,"User":"olivier"}","userAgent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Lightning/4.7.8","version":"12.0.0.18"}

@LukasReschke LukasReschke added bug feature: dav 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels May 15, 2017
@enoch85
Copy link
Member

enoch85 commented May 15, 2017

Is this to any help maybe? nextcloud/contacts#206

@georgehrke
Copy link
Member

Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Lightning/4.7.8

Looks like Lightning is producing non-standard-compliant ics data.

From RFC 5545 3.8.1.1:

Conformance: This property can be specified multiple times in a
"VEVENT", "VTODO", "VJOURNAL", or "VALARM" calendar component with
the exception of AUDIO alarm that only allows this property to
occur once.

@nextcloud-bot nextcloud-bot removed the stale Ticket or PR with no recent activity label Jul 5, 2018
@georgehrke
Copy link
Member

@MorrisJobke @rullzer
I guess this is a general question we need to discuss:

  • be very strict and return error messages when calendar data is incorrect
    or
  • be forgiving and also accept calendar (/addressbook data), thats parseable, but technically invalid

The latter will force us to revisit every manipulation / check of calendar data on the server, because certain presumptions we have now (because we are so strict), may not be the case when we are more forgiving.

@enoch85
Copy link
Member

enoch85 commented Jul 5, 2018

@georgehrke For Thunderbird I recommend Cardbook, I even think it's documented in the Nextcloud documentation.

@enoch85
Copy link
Member

enoch85 commented Jul 5, 2018

@georgehrke
Copy link
Member

georgehrke commented Jul 5, 2018

But this is about Lightning and CalDAV 😉
Although similar errors, as you pointed out, may occur for CardDAV.

@mfechner
Copy link

I see the same problem.
Get a calendar alarm display in Thunderbird and snooze it for one day, that next day it is displayed you cannot close it anymore.

@georgehrke
Copy link
Member

@mfechner Please report this bug to Lightning. As the error report says, there is a validation error in the calendar data => Thunderbird is not sending valid ics data.

(Would be great if you could post a link to the mozilla bug tracker afterwards for reference.)

@kesselb
Copy link
Contributor

kesselb commented Aug 30, 2018

Why is this a lightning issue?

"ATTACH MUST NOT appear more than once in a VALARM"

Conformance: This property can be specified multiple times in a "VEVENT", "VTODO", "VJOURNAL", or "VALARM" calendar component

@georgehrke
Copy link
Member

@danielkesselberg Please don't withhold the last part of the sentence:

  Conformance:  This property can be specified multiple times in a
      "VEVENT", "VTODO", "VJOURNAL", or "VALARM" calendar component with
      the exception of AUDIO alarm that only allows this property to
      occur once.

@kesselb

This comment has been minimized.

@kesselb
Copy link
Contributor

kesselb commented Aug 30, 2018

@skjnldsv
Copy link
Member

Most likely.
Bug is closed, let's close here as well. Never seen this issue happening again so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: dav
Projects
None yet
Development

No branches or pull requests

7 participants