nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
968 stars 236 forks source link

Parsing error importing ics file to calendar #5670

Open d-tamm opened 8 months ago

d-tamm commented 8 months ago

Steps to reproduce

  1. Click Calendar Settings.
  2. Click Import Calendar
  3. Choose the attached ics file

Expected behavior

Nextcloud should show a dialog where I can chose which calendar the file should be imported to.

Actual behaviour

I get the following to error messages: No valid files found, aborting import stefanie-2024-01-07.ics could not be parsed

Calendar app version

4.6.2

CalDAV-clients used

No response

Browser

Firefox 121.0

Client operating system

Windows 11

Server operating system

Docker linuxserver:nextcloud on Debian

Web server

Nginx

Database engine version

MariaDB

PHP engine version

None

Nextcloud version

28.0.1

Updated from an older installed version or fresh install

Fresh install

List of activated apps

No response

Nextcloud configuration

No response

Web server error log

No response

Log file

No response

Browser log

No response

Additional info

It seems to be row 36 which causes the parsing error: TRIGGER;VALUE=DURATION;RELATED=START:P According to https://icalendar.org/validator.html, the ics file is OK. sample.ics.txt

d-tamm commented 8 months ago

BEGIN:VCALENDAR VERSION:2.0 CALSCALE:GREGORIAN PRODID:-//SabreDAV//SabreDAV//EN BEGIN:VTIMEZONE TZID:Europe/Stockholm BEGIN:DAYLIGHT TZOFFSETFROM:+0100 TZOFFSETTO:+0200 TZNAME:CEST DTSTART:19700329T020000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3 END:DAYLIGHT BEGIN:STANDARD TZOFFSETFROM:+0200 TZOFFSETTO:+0100 TZNAME:CET DTSTART:19701025T030000 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10 END:STANDARD END:VTIMEZONE BEGIN:VEVENT DTSTART;VALUE=DATE:20110718 DTEND;VALUE=DATE:20110723 X-MICROSOFT-CDO-ALLDAYEVENT:TRUE CLASS:PUBLIC SUMMARY:0.5 Elternzeit PRIORITY:5 TRANSP:OPAQUE UID:032c8db7-5c58-4d3b-88fd-42e443a44ffc STATUS:CONFIRMED CREATED:20120227T203055Z LAST-MODIFIED:20120227T203057Z DTSTAMP:20131003T195443Z BEGIN:VALARM TRIGGER;VALUE=DURATION;RELATED=START:P ACTION:DISPLAY DESCRIPTION:0.5 Elternzeit END:VALARM END:VEVENT END:VCALENDAR

tcitworld commented 8 months ago

According to https://icalendar.org/validator.html, the ics file is OK.

START:P looks suspicious. Could be "valid" as per the ICS spec, but definitely an odd period. PRODID says the file was produced by SabreDAV, is that correct?

tcitworld commented 8 months ago

Just found https://github.com/sabre-io/vobject/issues/467 so the issue should be fixed in the backend.

Front-end it might be easier to add a repair step to change durations of P in PT0S than to fix it in ICAL.js

tcitworld commented 8 months ago

Does the data comes from Exchange/Outlook in your case?

d-tamm commented 8 months ago

The data is a part of an export I made yesterday from another Nextcloud instance. Since this event is quite old, I cannot say how it has been generated from the beginning.