[BUG][4.2.0.21] Cannot import calendar entries via ics-file

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 4.2.0.19
HARDWARE (XA2, X10, X10 II, …): Xperia 10 II
UI LANGUAGE: German
REGRESSION: (compared to previous public release: Yes, No, ?): Yes

DESCRIPTION:

I cannot import ics-files (and thus calendar enties) anymore. I tried with files that worked fine prior to updtaing to 4.2.0.19 and I tried with a 3.4.0.24 device (XZ3) as well. Importing the file with 3.4.0.24 worked while i did not work with 4.2.0.19 (but I know it was wirking under 4.1.0)

PRECONDITIONS:

STEPS TO REPRODUCE:

  1. Open ics file with file browser found under settings → memory
  2. Calendar app opens, saying “calendar file could not be imported”

EXPECTED RESULT:

Calendar entries in file should be imported (as it used to be)

ACTUAL RESULT:

calendar file cannot be imported - and thus no calendar entries

ADDITIONAL INFORMATION:

(Please ALWAYS attach relevant data such as logs, screenshots, etc…)

1 Like

I wonder whether this affects restoring calendar entries from a back-up since all calendar entries in the back-up file are stored in the ics format.

Can you give a bit more details ?

  • importing through the filemanager I guess by typing on a .ics file,
  • can you provide a .ics example (after removing personal data).

I can try to reproduce.

1 Like

Thank you, Damien. I just send you a message with the .ics file text of a test calendar entry. I could send you the .ics file but I do not know how.

Thank you, I got it. I’ll test it later this afternoon.

1 Like

Great, thanks a lot!

Depending where the ICS file is located, this may be an issue with the application isolation. Sailjail is only authorizing the following directories:

  • $HOME/Documents and $HOME/android_storage/Documents,
  • $HOME/Downloads and $HOME/android_storage/Downloads,
  • $HOME/Music, $HOME/Playlists, $HOME/android_storage/Music and $HOME/android_storage/Podcasts,
  • $HOME/Pictures, $HOME/Images, $HOME/android_storage/Pictures and $HOME/android_storage/DCIM,
  • $HOME/Public,
  • $HOME/Videos and $HOME/android_storage/Movies.

Everything out of these directories will raise an error in the importation dialog.

1 Like

You may be right - thank you for reminding me on Sailjail. I will copy the file to another directory and see what happens. I guess you just pinpointed the problem and found the solution. I will tell you

Thank you - you were right, it isn’t the file but the directory that caused the problem. I just copied the file to $HOME/Downloads and import works as usual.

I have to keep that in mind.

I’ve only a slight idea on how isolation is working, but it’s a bit boring that one cannot access files from an action that was started by the user. Besides, the error should pin point itself to the root of the problem, so one can move the file to an allowed location. I may look into this.

1 Like

ok, it hits me again, this time the .ics file is in a good place:

And this is the file (import worked with 3.4.0.34 but not with 4.2.0.21):

BEGIN:VCALENDAR
PRODID:-//sailfishos.org/Sailfish//NONSGML v1.0//EN
VERSION:2.0
X-KDE-ICAL-IMPLEMENTATION-VERSION:1.0
BEGIN:VEVENT
DTSTAMP:20210922T150040Z
CREATED:20210922T150040Z
UID:dcd9b069-afda-48ed-a38b-cab98747fd28
LAST-MODIFIED:20210922T150040Z
DESCRIPTION:For details, go here:\nhttps:
//www.eventbrite.co.uk/e/jolla-10-years-celebration-in-berlin-october-14-t
ickets-174993539387
SUMMARY:Jolla 10 years celebration in Berlin, October 14
LOCATION:Pfefferberg - Schönhauser Allee 176 - 10119 Berlin - Germany
DTSTART:20211014T160000Z
DTEND:20211014T190000Z
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

It actually works for me. May you check that you didn’t already import this event ? It may fail if the UID is already existing in the database (even maybe for another calendar, this is a current issue in mKCal).

1 Like

How can I check if the UID already exists? I had a manual entry for the event and later on tried to import the “official” .ics file - and failed.

In a second attempt to import the .ics file with Jolla’s Pfefferberg event, I first deleted my manual entry but couldn’t import the .ics file either.

I noticed that updating existing calendar events via a newer .ics file never works. I always have to delete the old event first before newly importing the updated event. That may correlate with the UID thing you are addressing.

But this doesn’t fit the instant case.

I’m proposing a change for this, see https://github.com/sailfishos/nemo-qml-plugin-calendar/pull/7 It will enable to mark the event as already on device in the importation dialog and propose to overwrite it by the import. Let see how the PR will be evaluated.

2 Likes

Sounds like a great idea!

1 Like

about the ics import; I had all but calendar moved from XA2 to 10 III. I fiddled/tried/etc for a long time but at last I found the trick that worked for me.
all.ics is big? 2,2 MB, and events date from the era of Nokia E90 ca 12-14 years ago. For some reason the file had gathered 7 different VTIMEZONE entries to the beginning of file. When I removed 6 of them and left only the relevant=latest which is Europe/Helsinki , the import worked straight away.

Maybe at some point of time the structure for ics and its contents have changed.
Just for someone else who might be stuck with this, here’s the beginning of the ics file until second occurrence of VTIMEZONE.

BEGIN:VCALENDAR
PRODID:-//K Desktop Environment//NONSGML libkcal 4.3//EN
VERSION:2.0
X-KDE-ICAL-IMPLEMENTATION-VERSION:1.0
BEGIN:VTIMEZONE
TZID:Europe/Paris
BEGIN:DAYLIGHT
TZNAME:CEST
TZOFFSETFROM:+0000
TZOFFSETTO:+0200
DTSTART:19760328T000000
RDATE:19760328T000000
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
DTSTART:19790930T030000
RRULE:FREQ=YEARLY;UNTIL=19961027T030000;BYDAY=-1SU;BYMONTH=9
END:STANDARD
BEGIN:STANDARD
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
DTSTART:19971026T030000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
END:STANDARD
BEGIN:STANDARD
TZNAME:CET
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
DTSTART:19760926T010000
RDATE:19760926T010000
RDATE:19770925T030000
RDATE:19781001T030000
RDATE:19950924T030000
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
DTSTART:19810329T020000
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:DAYLIGHT
TZNAME:CEST
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
DTSTART:19770403T020000
RDATE:19770403T020000
RDATE:19780402T020000
RDATE:19790401T020000
RDATE:19800406T020000
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VTIMEZONE
TZID:Europe/Amsterdam
BEGIN:STANDARD
TZNAME:CET

1 Like