Calendar - Unable to import an Nextcloud's calendar export

Nextcloud version (eg, 20.0.5): 23.0.0
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): 2.4.52
PHP version (eg, 7.4): 7.4
Calendar : 3.0.5

The issue you are facing:
I can’t import a calendar into my nextcloud from another nextcloud calendar export.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Export a calendar from a nextcloud
  2. Import the .ics file to another nextcloud (or to the same nextcloud… )
  3. Error : unsupported file-type

The output of your Nextcloud log in Admin > Logging: empty

The problem is simple, i change my personnal nextcloud server today, and it’s impossible for me to import my calendars from a nextcloud to another nextcloud…

You can test it and reproduce easily, because i tried on an another version of nextcloud with a friend, and he has the same issue.

Final Error :
Capture d’écran de 2022-01-21 10-34-30

(Funny thing : I can import a google calendar ics export but not a nextcloud’s calendar ics export. )

You should be able to open the *.ics file in a text editor. See if its corrupted or will not open. Otherwise can you re-import it back into the NC that you pulled it from?

Hi, thanks for your answer.

The file .ics is perfectly readable and not corrupt. I can’t even re-import it back into the NC i pulled it from (same error).

But this .ics file can be import in thunderbird… Honeslty i don’t understand :confused:

Can you try importing it into thunderbird and then export it back out and then try and import it into NC.

Also, What is the exported file name? Im thinking perhaps invalid characters in the name? - Just a quick thought.

I’ve already thought about this and tried a lot of renaming. But this is not it :frowning:

Great idea, thanks for the suggestion! I just did it but it doesn’t work either, same error :frowning:

Can you reproduce this problem on your side?

Thanks

It works on mine. But I am running debian 10. I also use calcardbackup which is a script for exporting calendars/contacts/tasks to the respective files.

Can you post the first four lines or so of your .ics file so I can compare the beginning with one I have saved? Just get rid of any personal info with ''s.

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//SabreDAV//SabreDAV//EN
X-WR-CALNAME: myagenda
X-APPLE-CALENDAR-COLOR:#90c1ff
REFRESH-INTERVAL;VALUE=DURATION:PT4H
X-PUBLISHED-TTL:PT4H
BEGIN:VTIMEZONE
TZID:Europe/Paris
X-LIC-LOCATION:Europe/Paris
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19810329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19961027T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VTIMEZONE
TZID:Etc/UTC
X-LIC-LOCATION:Etc/UTC
BEGIN:STANDARD
TZOFFSETFROM:+0000
TZOFFSETTO:+0000
TZNAME:GMT
DTSTART:19700101T000000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20200622T050002Z
UID:XXXXXXXX
SEQUENCE:1

@coffee412 Thanks

I bet its missing some needed lines in the *.ics file.
Try this and post the output:

Open the ics file in an editor and copy all the lines. Then paste it to this site:

https://mozilla-comm.github.io/ical.js/validator.html

Lets see what errors show up.

I create a new calendar with juste one event. And i can import it after export.

This is the complete .ics :

BEGIN:VCALENDAR
VERSION:2.0
CALSCALE:GREGORIAN
PRODID:-//SabreDAV//SabreDAV//EN
X-WR-CALNAME:test
X-APPLE-CALENDAR-COLOR:#499AA2
REFRESH-INTERVAL;VALUE=DURATION:PT4H
X-PUBLISHED-TTL:PT4H
BEGIN:VEVENT
CREATED:20220123T182010Z
DTSTAMP:20220123T182020Z
LAST-MODIFIED:20220123T182020Z
SEQUENCE:2
UID:2d9fc987-91f4-428b-a024-ce2bb9fe2cd3
DTSTART;VALUE=DATE:20220129
DTEND;VALUE=DATE:20220130
STATUS:CONFIRMED
SUMMARY:test nextcloud export
END:VEVENT
END:VCALENDAR

I’m on Firefox, i will test on chromium.

Oh da** sh** ! The bug is on firefox :frowning:
It works in chromium…

I don’t know why I didn’t think to test it first… sorry.

So the solution is : Import only works on Chrome.

1 Like

And thanks for your help @coffee412 !!! :slight_smile:

Whooo… So, What version of FF were you using? Perhaps its a plugin doing it in FF??

The worst time I ever had was editing a 1 meg .ics file for a company looking for some d HTML code that made Emclient crash on downloading calendars. lol…

I did see some older posts elsewhere that showed missing END: statements causing a similar problem. Oh well. Good you got things worked out. That is strange. Im using FF version 96 and do not have a problem. What version FF do you have again?

I’m on 96.0.
I try with plugins and without (safe mode)… really strange, i really don’t understand.

Hmmm, it works on my Windows 10 - Firefox 96.0 and not on my Ubuntu 21.10 - Firefox 96.0.

And it works on Ubuntu 20.04 - Firefox 96.0 (on my desktop)
So… really a local problem with my 21.10 (my laptop). Sorry for inconveniences :confused:

1 Like