Importing multiple versions of the same .ics in one calendar

Hello,

I have just come across a quite problematic issue with the /e/OS default (Etar) calendar.
My workplace provides me with an .ics file to import into my calendar app. I did this once a few months ago. However, the calendar gets updated every few months, and in order to keep my offline calendar up-to-date I have to re-import it.
The first time I imported the ics into an empty calendar, things worked perfectly. However, if I re-import the ics into the same calendar, for a few seconds it works (new events appear, and the ones that were already in the older ics are duplicated), then it crashes. Upon re-opening it, I only see the events from the older ics. I guess that the high number of repeated events causes it to malfunction. Importing the new .ics into a new calendar does work, but as you can guess this is not an optimal way, as it requires me to periodically replace my calendar + move all the events I have added manually to a separate one.

My question, consequently, is the following: is there a way to either 1. get the calendar app to treat the newer .ics as an update, rather than an addition, and thus not duplicate events and crash; or 2. delete all the events tied to the older .ics without affecting the ones I manually created so that I can import the newer one cleanly?

(I am on an FP3, /e/OS 3.7).

Happy to provide more information, open a gitlab issue, or provide a debug file.

Thanks in advance!

Regain your privacy! Adopt /e/OS the deGoogled mobile OS and online services

This thread Mixing CalDAV, Google and Exchange Calendars was recently reopened.

Not exactly your point but perhaps gives hints as to the difference between a “live calendar .ics” and an .ics which represents an event or series of events.

1 Like

Thanks very much aibd. Sorry for not noticing that thread - I did double check whether there were any topics but did not realise how close it was to my issue (nor that it was possible to import Exchange calendars!)

However, I have tried the solution posted by @tcecyk which on paper would be exactly what I need and I get a “connection reset” error with the following error report:

Connection reset

java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:191)
at java.net.SocketInputStream.read(SocketInputStream.java:143)
at org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(SourceFile:920)
at org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(SourceFile:884)
at org.conscrypt.ConscryptEngineSocket$SSLInputStream.access$100(SourceFile:706)
at org.conscrypt.ConscryptEngineSocket.doHandshake(SourceFile:230)
at org.conscrypt.ConscryptEngineSocket.startHandshake(SourceFile:209)
at okhttp3.internal.connection.RealConnection.connectTls(SourceFile:379)
at okhttp3.internal.connection.RealConnection.establishProtocol(SourceFile:337)
at okhttp3.internal.connection.RealConnection.connect(SourceFile:209)
at okhttp3.internal.connection.ExchangeFinder.findConnection(SourceFile:226)
at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(SourceFile:106)
at okhttp3.internal.connection.ExchangeFinder.find(SourceFile:74)
at okhttp3.internal.connection.RealCall.initExchange$okhttp(SourceFile:255)
at okhttp3.internal.connection.ConnectInterceptor.intercept(SourceFile:32)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:109)
at okhttp3.internal.cache.CacheInterceptor.intercept(SourceFile:95)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:109)
at okhttp3.internal.http.BridgeInterceptor.intercept(SourceFile:83)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:109)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(SourceFile:76)
at okhttp3.internal.http.RealInterceptorChain.proceed(SourceFile:109)
at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(SourceFile:201)
at okhttp3.internal.connection.RealCall$AsyncCall.run(SourceFile:517)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)

Any ideas on how to solve this? Thanks!

The app Calendar Import-Export has an option for duplicate handling. In case of a duplicate it allows the following actions:

  • keep the imported event, delete the existing event
  • keep the existing event, ignore the imported event
  • keep the existing event, add the imported event

You can experiment with this without any damage in your existing calendar:

  • export all contents of your existing calendar into an .ics file
  • create a new local calendar for testing and import this .ics file, so you get a 100% copy of your original calendar
  • then import your earlier created .ics file(s) to this testing calendar using the duplicate handling option from above and see what happens
  • when you find you can live with the result you can delete your test calendar and import your .ics file(s) into your original calendar

what kind of software do they run, do they really send you an .ics as attachment per email or where you download this? at best you look for an url you can subscribe to.

I added a screenshot to the linked thread and example how you’d go about it on outlook com. Imo it applies to self-hosted Exchange too. If that one is in a vpn you obviously need that link up to fetch the url.

Anyway, I think you do not want to import ics continously and just subscribe (with some sane refresh interval, like 1 day or a week).

java.net.SocketException: Connection reset

just says you’re not allowed to make that connection, see vpn.

Thanks very much to both. @irrlicht I’ll try your method tomorrow. If there is no way to connect via URL then it might be the best solution.

@tcecyk there is a page on the workplace intranet with a link so in theory the subscription should work. In fact they do recommend using the link rather than downloading the file but I just assumed this required proprietary software and never tried until today. Their instruction simply states that we should enter the URL into a calendar app and it should work straightaway - maybe I should go see the IT person.

EDIT: turning off IP spoofing in Advanced Privacy allows me to add the calendar! So yes, tcecyk was right in interpreting this as a VPN problem.

1 Like

yes, AP “hide-ip” is Tor, very dual-use, so lots of orgs block it

BTW: you can also just make a second emtpy calendar and import your .ics files. So you get no doubles with your original calendar. Then you can make both visible and check where doubles would be. Depends on the amount of events you have.