How to get around a problem of importing ICS?

Hello,

I’ve troubles to import a light agenda (ICS file) with about 400 entries. I always get an error which tells that the process has encountered many failures and has only managed to import about 80 entries.

Here is few informations :
→ I’m running Nextcloud 14.0.3 and Calendar 1.6.3, installed on a shared hosting solution (https://www.gandi.net/en/simple-hosting)
→ The file has been exported by Thunderbird (last version) and I precise that Google has no problem to import it, which suggest that the file is not corrupted itself.
→ A part of the problem is I don’t find any clue in the log files about what happens. I checked all /var/log/ files and also /data/nextcloud.log with no success, but if want to see one of them I can post it. Just tell me which ones you want.

I know there are lot of topics similar in this forum, but which are quite old now. And I really don’t know what to do, considering that I can’t simply give up (my users would kill me if I don’t find a solution).

Why do I post this topic ? Not strictly to make this import process working, but above all to find a workaround. I mean I’ll be glad to you if you can help to repair it, but what I really need is to have the file imported, whatever the way.

For example, here is few questions for which I need answers :

  • If I cut the file in few pieces, is there a way to reassemble it into Nextcloud ?
  • Is there a way to import the file with the ‘occ’ by the console ?

Thank you in advance for you ideas, remarks, advices… !

You need to make sure that the VTIMEZONEs are in each piece.

I don’t think so.

What you could do is validate it here: https://icalendar.org/validator.html

What I would try is to import the file to a client which is linked to a nextcloud caldav account and the calendar will be synced to your Nextcloud.

Thank you very much for your help !

All right, I will take attention to that. But then how will I merge all the parts in an unique agenda ?

Well, You were right on that point. The file had many validating errors. I corrected them, but unfortunately the importing process doesn’t work better.

I’ve already tried to import the file in Google Agenda, and then to synchronize it with NC, with no success. I got a “Main error”. What can I do otherwise, any ideas ?

Sorry, I don’t know what that is.

What I meant is to import the ics-file to a calendar app on a computer. And then let that computer sync the data to nextcloud.

EDIT: Another thought I just had is to validate your ics file with vobject (http://sabre.io/vobject). Benefit would be, that Nextcloud also uses vobject. So if it passes that validator, the chances are quite high that Nextcloud can import it. Also vobject has a repair mode to repair broken ics files (never tried that though).

As this thread is the first hit in google and the problem seemingly still exists here is how I got around it:

I had the same issue while importing an ICS to nextcloud 16. The file was downloaded from NC 14. Each time I imported the file I had these messages:

104 of 1058 imported, 847 Errors, 107 duplicates skipped
108 of 1058 imported, 814 Errors, 136 duplicates skipped
88 of 1058 imported, 832 Errors, 138 duplicates skipped
77 of 1058 imported, 852 Errors, 129 duplicates skipped

The client (Browser) is simply to fast for your NC server. I looked up the network traffic and noticed a ton of 500 return codes.
In the developer tools (F12 -> network) I limited the bandwith to “good 2G”, witch at least Mozilla Firefox offers.
With this setting I was able to import all calendar entries in one take.

I had the same issue with importing ~2000 calendar entries and Nextcloud 16. It was always varying which calender entries were successfully imported (usally only a couple hundred successfully).

Solution for me was to disable SSL and connect to apache/nextcloud via unencrypted http only.

Setup (ics import failing randomly):

  • Nextcloud and MySQL in docker containers on a Synology NAS
  • Synology reverse proxy enabled for SSL.
  • Nextcloud configured with ‘overwriteprotocol’ => ‘https’ to work properly with the reverse proxy SSL.
  • Connecting to Nextcloud via https

Setup (ics import working properly):

  • Nextcloud and MySQL in docker containers on a Synology NAS
  • Connecting to Nextcloud via http

So maybe it is the same bandwidth/speed issue like @der_andere wrote , but I wonder why it should depend on such things. Shouldn’t Nextcloud or the calendar app be robust for such things?