calendar icon indicating copy to clipboard operation
calendar copied to clipboard

.ics only partially imported

Open patricktokeeffe opened this issue 9 years ago • 6 comments

I'm using the Nextcloud Snap on Ubuntu 14.04 LTS and see behavior similar to #245: an .ics file exported by Owncloud (8.1.9) is only partially imported by Nextcloud (11.0.3).

The browser console is full of errors of this form:

client.js?v=8b86bdf…:183 PUT https://cloud.pokeeffe.net/remote.php/dav/calendars/lar/work/Nextcloud-OUKOZKO7X5GGAOF4H11WN.ics 415 (Unsupported Media Type)
request @ client.js?v=8b86bdf…:183
create @ app.js:5864
(anonymous) @ app.js:1085
a @ vendor.js:60
i @ app.js:1084
(anonymous) @ app.js:1121

And /var/snap/nextcloud/common/nextcloud/data/nextcloud.log contains lots of events like these (soft wrapped sorry):

{"reqId":"a93\/E13V\/4klLDPPebo9","remoteAddr":"2605:e000:1b02:4023:332c:cce9:5808:12e5
","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 415 Validation error
in iCalendar: More than one master object was found for the object with UID 20150723T19
2612Z-29893@606e0eea1afbad4f\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\Unsupported
MediaType\",\"Code\":0,\"Trace\":\"#0 \\\/snap\\\/nextcloud\\\/1540\\\/htdocs\\\/3rdpar
ty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Plugin.php(801): Sabre\\\\CalDAV\\\\Plugin->vali
dateICalendar('BEGIN:VCALENDAR...', 'calendars\\\/lar\\\/w...', false, Object(Sabre\\\\
HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response), true)\\n#1 [internal function]: Sa
bre\\\\CalDAV\\\\Plugin->beforeCreateFile('calendars\\\/lar\\\/w...', 'BEGIN:VCALENDAR.
..', Object(OCA\\\\DAV\\\\CalDAV\\\\Calendar), false)\\n#2 \\\/snap\\\/nextcloud\\\/154
0\\\/htdocs\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_us
er_func_array(Array, Array)\\n#3 \\\/snap\\\/nextcloud\\\/1540\\\/htdocs\\\/3rdparty\\\
/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1070): Sabre\\\\Event\\\\EventEmitter->emit('
beforeCreateFil...', Array)\\n#4 \\\/snap\\\/nextcloud\\\/1540\\\/htdocs\\\/3rdparty\\\
/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(525): Sabre\\\\DAV\\\\Server->createFile(
'calendars\\\/lar\\\/w...', 'BEGIN:VCALENDAR...', NULL)\\n#5 [internal function]: Sabre
\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\
\\Response))\\n#6 \\\/snap\\\/nextcloud\\\/1540\\\/htdocs\\\/3rdparty\\\/sabre\\\/event
\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#7 \\\/snap
\\\/nextcloud\\\/1540\\\/htdocs\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php
(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#8 \\\/snap\\\/nextc
loud\\\/1540\\\/htdocs\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sa
bre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HT
TP\\\\Response))\\n#9 \\\/snap\\\/nextcloud\\\/1540\\\/htdocs\\\/apps\\\/dav\\\/lib\\\/
Server.php(231): Sabre\\\\DAV\\\\Server->exec()\\n#10 \\\/snap\\\/nextcloud\\\/1540\\\/
htdocs\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(30): OCA\\\\DAV\\\\Server->exec()\
\n#11 \\\/snap\\\/nextcloud\\\/1540\\\/htdocs\\\/remote.php(165): require_once('\\\/sna
p\\\/nextcloud...')\\n#12 {main}\",\"File\":\"\\\/snap\\\/nextcloud\\\/1540\\\/htdocs\\
\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Plugin.php\",\"Line\":917,\"User\":\"lar
\"}","level":4,"time":"2017-06-17T02:25:17+00:00","method":"PUT","url":"\/remote.php\/d
av\/calendars\/lar\/work\/Nextcloud-XK9FSCC4UU8JU7YGEE7B4S.ics","user":"lar","version":
"11.0.3.2"}

patricktokeeffe avatar Jun 17 '17 03:06 patricktokeeffe

Validation error in iCalendar: More than one master object was found for the object with UID 20150723T19 2612Z-29893@606e0eea1afbad4f

Well, the ics data you are trying to import does not seem to be valid. The UID, which is supposed to be unique, is assigned to multiple objects.

georgehrke avatar Jun 21 '17 09:06 georgehrke

@patricktokeeffe Can you check the ics for UIDs occurring multiple times? Seems like a nasty bug in the old ownCloud calendar. :/

georgehrke avatar Jun 28 '17 08:06 georgehrke

/edit: Nextcloud/Sabre is mostly unsatisfied with empty VALUE properties, so I removed all occurences of VALUE=: and VALUE=; and it seems to work now without errors.

Good evening, I am trying to import an OwnCloud 8.2.2 calendar into NextCloud 12.0.2 and I also get a lot of these and 300 partially imported files. It is hard to see from this whether the calendar is consistent.

{"reqId":"uS6Wdjasdfg00JKoIDEp","level":4,"time":"2017-08-28T18:49:37+00:00","remoteAddr":"192.168.0.2","user":"rob","app":"webdav","method":"PUT","url":"\/remote.php\/dav\/calendars\/rob\/main\/Nextcloud-SasdfgQOVHOSXE49PU67I.ics","message":"Exception: {\"Exception\":\"Sabre\\\\VObject\\\\InvalidDataException\",\"Message\":\"Unsupported VALUE parameter for DTEND property. You supplied \\\"\\\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Parser\\\/MimeDir.php(453): Sabre\\\\VObject\\\\Document->createProperty('DTEND', NULL, Array)\
#1 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Parser\\\/MimeDir.php(234): Sabre\\\\VObject\\\\Parser\\\\MimeDir->readProperty('DTEND;TZID=Euro...')\
#2 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Parser\\\/MimeDir.php(217): Sabre\\\\VObject\\\\Parser\\\\MimeDir->parseLine('DTEND;TZID=Euro...')\
#3 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Parser\\\/MimeDir.php(181): Sabre\\\\VObject\\\\Parser\\\\MimeDir->parseLine('BEGIN:VEVENT')\
#4 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Parser\\\/MimeDir.php(89): Sabre\\\\VObject\\\\Parser\\\\MimeDir->parseDocument()\
#5 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Reader.php(46): Sabre\\\\VObject\\\\Parser\\\\MimeDir->parse('BEGIN:VCALENDAR...', 0)\
#6 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Plugin.php(841): Sabre\\\\VObject\\\\Reader::read('BEGIN:VCALENDAR...')\
#7 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/CalDAV\\\/Plugin.php(802): Sabre\\\\CalDAV\\\\Plugin->validateICalendar('BEGIN:VCALENDAR...', 'calendars\\\/rob\\\/m...', false, Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response), true)\
#8 [internal function]: Sabre\\\\CalDAV\\\\Plugin->beforeCreateFile('calendars\\\/rob\\\/m...', 'BEGIN:VCALENDAR...', Object(OCA\\\\DAV\\\\CalDAV\\\\Calendar), false)\
#9 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\
#10 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1094): Sabre\\\\Event\\\\EventEmitter->emit('beforeCreateFil...', Array)\
#11 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(525): Sabre\\\\DAV\\\\Server->createFile('calendars\\\/rob\\\/m...', Resource id #41, NULL)\
#12 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\
#13 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\
#14 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\
#15 \\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\
#16 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/lib\\\/Server.php(253): Sabre\\\\DAV\\\\Server->exec()\
#17 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(33): OCA\\\\DAV\\\\Server->exec()\
#18 \\\/var\\\/www\\\/nextcloud\\\/remote.php(162): require_once('\\\/var\\\/www\\\/nextcl...')\
#19 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/3rdparty\\\/sabre\\\/vobject\\\/lib\\\/Document.php\",\"Line\":220}","userAgent":"Mozilla\/5.0 (X11; Linux x86_64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/60.0.3112.113 Safari\/537.36","version":"12.0.2.0"}

crbble avatar Aug 28 '17 19:08 crbble

I had the same issue as @crbble logging the error "Unsupported VALUE parameter for DTEND property". I tried to transfer my calendar from ownCloud 8.x to nextcloud 12.2.

To remove the broken "VALUE" within TZID in my case, I used the following sed-command to fix the ics-file:

sed -E 's/TZID=(.*);(.*):/TZID=\1:/' your-broken-calendar.ics > your-fixed-calendar.ics

Planzo avatar Sep 26 '17 19:09 Planzo

I add a similar issue with the CREATED field For some reason, the ical file exported from Google Calendar contained some invalid date formats such as CREATED:00001231T000000Z

instead of the expected CREATED:20060601T161805Z

Hoping that helps!

ghost avatar Jun 22 '20 03:06 ghost

I had the same issue as described by @ghost. Thanks for posting your finding.

svenpilz avatar Apr 20 '25 17:04 svenpilz