[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