Duplicate calendar entries



  • I’m using ICSDroid (installed via f-droid) to sync my meetup.com, facebook.com, and kayak.com ICS feeds on a Moto X4, Android 7.1.1. After some time there are many duplicates of some events. It seems to affect all of the calendars. Right now I’m looking at 6 copies of the same event from Facebook, 4 copies of another event from Kayak, and 2 copies of an event from Meetup.

    I’m not sure how to reproduce other than to provide my private URLs. Is there any steps I can take to try debugging the problem?


  • developer

    Are you using the latest version of ICSdroid?

    You can have a look at the entries and maybe you find out something… see the adb commands at https://www.davdroid.com/faq/how-to-debug/



  • I have the same issue, some events are duplicated four, five, six times. Using the link above leads me to debugging DAVDroid, not ICSDroid.

    In ICSDroid, I also can't find extra logging or debugging options.
    How can this issue be solved?


  • developer

    For ICSdroid, you can only use logcat at the moment (the adb commands are the same as for DAVdroid).

    Otherwise, you can post your calendar URLs here and I can have a look whether this can be reproduced here.

    Edit: I just had an idea where the duplicated events may come from. Maybe the system calls ICSdroid sync multiple times at the same time (which should not happen). Working around this has fixed some mysterious "duplicated entries" problems, too…



  • Hi,

    as I have the same issue as others I followed the steps described above. I analyzed one specific calendar entry, it is 3 times visible, all parameters (beside Row) are identical except the "_id" parameter. I have uploaded the file ...

    source are iCalendar feeds from TeamUp (www.teamup.com), if someone wants to reproduce that, it's a free team calendar.

    Syncing calendar feed fails once in a while (I have supressed notifications from icsdroind), so it might be, that these duplicate entries are because of failed syncs?

    BR,

    Martin

    0_1520366596786_calendar_events.txt


  • developer

    I guess this could have be worked around by https://gitlab.com/bitfireAT/icsdroid/commit/5abdcf7bb09f3fce1cf6a0a764803e1a271f0671 (helps at least for DAVdroid).

    I have sent you an APK for testing, can you please report whether it now works for you?



  • Hi,

    I'm experiencing the same problem: Many calendar entries are duplicated (some of them as often as 10 times). As I also see syncing issues from time to time, my problem might be solved by the commit you were referencing.
    I'm using the current version from F-Droid.

    Could you also send me a build with the respective changes? I managed to build an updated apk myself, but I cannot update the existing installation as I can't sign it with the same certificate (and I don't want to loose my settings).

    Greets and thanks for the effort,
    Frank


  • developer

    @fränk The patch is in ICSdroid since 1.5.5. Did you remove your subscription and add it again since you have updated to 1.5.5?



  • @rfc2822 Sorry for my late reply. I had not tried re-adding all subscriptions (I actually wanted to avoid that). Anyways, I did it now and will report back if the error persists.
    Thanks for the support!



  • Hi,

    I also see this issue on my OnePlus3 running LineageOS 14.1. I'm using aCalendar+ as my calendar app.

    What can I do to help you solving the issue? Unfortunately, I can't share my appointments as they are confidential.

    Many thanks,
    meiser



  • I'd really appreciate any feedback. Many thanks in advance!


  • developer

    @meiser Do you use the latest ICSdroid version? The detection of multiple parallel syncs started by Android is available since ICSdroid a few versions.

    Otherwise, I'd need to be able to reproduce the problem so that I can have a look. We don't have duplicated events on our own devices and there are no other reports about that problem.



  • @rfc2822 Yes, I'm running the lastest ICSdroid version. I'm not sure how I can narrow it down as I can't find the real precondition that triggers the duplicates.



  • @rfc2822 Could you maybe provide a debugging version which saves all logs to the internal memory (e.g. /sdcard) so that we can narrow down the issue? It happened again, but I can't find anything in "logcat".

    Thanks,
    meiser


  • developer

    @meiser At the moment, I do not have time for that 😕 Can you try with

    setprop log.tag.icsdroid VERBOSE
    setprop log.tag.ical4android VERBOSE
    

    on the device before logcat (adb shell, then the two setprop commands)?



  • I also see this issue. I am accessing ICS feeds served by posteo.de.
    I am on current version 1.5.7, and I have now deleted and re-entered the feeds in ICSdroid, to find out whether this makes the issue disappear permanently.

    I think recently the duplicates started to appear after an ICSdroid error message, saying that it could not connect to the server. Perhaps this observation helps to reproduce the issue? I will make a screenshot if this error happens again.


  • developer

    @jondo Are those public feeds? Can you provide the URLs? But I doubt that it's related to the feeds itself… which device do you have? Which Android version?



  • @rfc2822 I have got a Samsung Galaxy S5 (SM-G900F), currently on Android 8.1.0 (LineageOS) without Google apps. I also saw the issue on Android 7 and on a Google Pixel with some stock Android 8.

    I have now set up a test URL: https://posteo.de/calendars/ics/4cp77y98svfsg432i7mvwk7ck857fzqu . This contains a single event "ICSdroid-test", on 2018-12-31. I will tell you when I notice it showing the issue.


  • developer

    @jondo Ok, thanks. I'll subscribe to this feed, to.



  • Hi, it happened again. I could find this exception in the logcat.

    [08-19 07:01:07.467 13158:13158 E/ActivityThread]
    Service at.bitfire.icsdroid.SyncAdapterService has leaked ServiceConnection at.bitfire.cert4android.CustomCertManager$1@2bfa043 that was originally bound here
    android.app.ServiceConnectionLeaked: Service at.bitfire.icsdroid.SyncAdapterService has leaked ServiceConnection at.bitfire.cert4android.CustomCertManager$1@2bfa043 that was originally bound here
    	at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1336)
    	at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1231)
    	at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1450)
    	at android.app.ContextImpl.bindService(ContextImpl.java:1422)
    	at android.content.ContextWrapper.bindService(ContextWrapper.java:636)
    	at at.bitfire.cert4android.CustomCertManager.<init>(CustomCertManager.kt:99)
    	at at.bitfire.cert4android.CustomCertManager.<init>(CustomCertManager.kt:48)
    	at at.bitfire.icsdroid.CustomCertificates.certManager(CustomCertificates.kt:20)
    	at at.bitfire.icsdroid.SyncAdapter$ProcessEventsTask.processEvents(SyncAdapter.kt:153)
    	at at.bitfire.icsdroid.SyncAdapter$ProcessEventsTask.run(SyncAdapter.kt:109)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    	at java.lang.Thread.run(Thread.java:761)
    
    [08-19 07:01:07.476 13158:13158 I/cert4android]
    CustomCertService destroyed
    
    [08-19 07:01:07.489 13158:13196 E/icsdroid]
    Thread interrupted
    java.lang.InterruptedException
    	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2010)
    	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2087)
    	at java.util.concurrent.ThreadPoolExecutor.awaitTermination(ThreadPoolExecutor.java:1452)
    	at at.bitfire.icsdroid.SyncAdapter.onPerformSync(SyncAdapter.kt:73)
    	at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272)
    

    Could this be related? Or could I look for anything else in the logcat? I have saved all logcat with the app "logcat reader" and saved them. So I can grep for anything which you might be interested in.