Cast error in 1.5.5



  • I'm getting an error when syncing to a private calendar provider:

    net.fortuna.ical4j.model.property.XProperty cannot be cast to net.fortuna.ical4j.model.property.Uid

    It does seem to sync properly, but I would like to understand the issue here.

    Please advise.


  • developer

    Hello,

    Can you provide the ICS file? Or is there another way to reproduce the problem?



  • Can I pm the file to you?


  • developer

    @bjsva Please send it to play@bitfire.at



  • @rfc2822 Sent.


  • developer

    Thanks for the file.

    With this file, I can't reproduce the problem here… is it possible that the server sometimes sends invalid data? Later, data is valid again and the error disappears.

    For further debugging, we'd need an iCalendar file that actually causes the problem.



  • Is there a way to capture the ics file from the app when the error occurs?


  • developer

    @bjsva No, at least not at the moment. Maybe you could use adb to find out more…



  • Getting the same error with my subscriptions. One of them is a public calendar:

    https://calendar.google.com/calendar/ical/25qp7f5j7a0r6qoairrsgb3r8s%40group.calendar.google.com/public/basic.ics

    Using version 1.5.6 available on F-Droid.

    Hope it helps. 😊


  • developer

    @peque (Un)fortunately, I can't reproduce the problem with this URL here. Does it happen every time or only sometimes? Can it be reproduced somehow?



  • @rfc2822 It seems only sometimes...

    I tried to refresh a couple of times yesterday and today without success, always got the same error. But I have tried another time right now and it worked fine. 😕



  • This error seems more to occur more when the device is asleep. It generally resolves when it wakes and I manually refresh. I hope to have some time soon to adb this.



  • Captured this with logcat -e icsdroid when error occurred.

    05-20 21:45:51.225 1164 1193 I ActivityManager: Start proc 17735:at.bitfire.icsdroid/u0a212 for service at.bitfire.icsdroid/.SyncAdapterService
    05-20 21:45:51.268 17735 17735 W System : ClassLoader referenced unknown path: /data/app/at.bitfire.icsdroid-1/lib/arm64
    05-20 21:45:53.381 17735 17749 E icsdroid: Couldn't process calendar
    05-20 21:45:53.381 17735 17749 E icsdroid: java.util.NoSuchElementException
    05-20 21:45:53.381 17735 17749 E icsdroid: at sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:59)
    05-20 21:45:53.381 17735 17749 E icsdroid: at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:350)
    05-20 21:45:53.381 17735 17749 E icsdroid: at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:442)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.model.AbstractContentFactory.getFactory(AbstractContentFactory.java:85)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.model.PropertyFactoryImpl.createProperty(PropertyFactoryImpl.java:70)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.data.CalendarBuilder$ContentHandlerImpl.startProperty(CalendarBuilder.java:326)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.parse(CalendarParserImpl.java:245)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.data.CalendarParserImpl$PropertyParser.access$1100(CalendarParserImpl.java:229)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.data.CalendarParserImpl$PropertyListParser.parse(CalendarParserImpl.java:210)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.data.CalendarParserImpl.parseCalendar(CalendarParserImpl.java:115)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.data.CalendarParserImpl.parseCalendarList(CalendarParserImpl.java:180)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.data.CalendarParserImpl.parse(CalendarParserImpl.java:149)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:198)
    05-20 21:45:53.381 17735 17749 E icsdroid: at net.fortuna.ical4j.data.CalendarBuilder.build(CalendarBuilder.java:178)
    05-20 21:45:53.381 17735 17749 E icsdroid: at at.bitfire.ical4android.Event$Companion.fromReader(Event.kt:78)
    05-20 21:45:53.381 17735 17749 E icsdroid: at at.bitfire.ical4android.Event$Companion.fromReader$default(Event.kt:72)
    05-20 21:45:53.381 17735 17749 E icsdroid: at at.bitfire.icsdroid.SyncAdapter$ProcessEventsTask.processEvents(SyncAdapter.kt:222)
    05-20 21:45:53.381 17735 17749 E icsdroid: at at.bitfire.icsdroid.SyncAdapter$ProcessEventsTask.run(SyncAdapter.kt:109)
    05-20 21:45:53.381 17735 17749 E icsdroid: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    05-20 21:45:53.381 17735 17749 E icsdroid: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    05-20 21:45:53.381 17735 17749 E icsdroid: at java.lang.Thread.run(Thread.java:761)
    05-20 21:45:54.863 17735 17751 E icsdroid: Couldn't process calendar
    05-20 21:45:54.863 17735 17751 E icsdroid: java.lang.ClassCastException: net.fortuna.ical4j.model.property.XProperty cannot be cast to net.fortuna.ical4j.model.property.Uid
    05-20 21:45:54.863 17735 17751 E icsdroid: at net.fortuna.ical4j.model.component.VEvent.getUid(VEvent.java:671)
    05-20 21:45:54.863 17735 17751 E icsdroid: at at.bitfire.ical4android.Event$Companion.fromReader(Event.kt:95)
    05-20 21:45:54.863 17735 17751 E icsdroid: at at.bitfire.ical4android.Event$Companion.fromReader$default(Event.kt:72)
    05-20 21:45:54.863 17735 17751 E icsdroid: at at.bitfire.icsdroid.SyncAdapter$ProcessEventsTask.processEvents(SyncAdapter.kt:222)
    05-20 21:45:54.863 17735 17751 E icsdroid: at at.bitfire.icsdroid.SyncAdapter$ProcessEventsTask.run(SyncAdapter.kt:109)
    05-20 21:45:54.863 17735 17751 E icsdroid: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    05-20 21:45:54.863 17735 17751 E icsdroid: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    05-20 21:45:54.863 17735 17751 E icsdroid: at java.lang.Thread.run(Thread.java:761)
    05-20 21:46:28.874 17735 17800 E icsdroid: Couldn't process calendar
    05-20 21:46:28.874 17735 17800 E icsdroid: java.lang.ClassCastException: net.fortuna.ical4j.model.property.XProperty cannot be cast to net.fortuna.ical4j.model.property.Uid
    05-20 21:46:28.874 17735 17800 E icsdroid: at net.fortuna.ical4j.model.component.VEvent.getUid(VEvent.java:671)
    05-20 21:46:28.874 17735 17800 E icsdroid: at at.bitfire.ical4android.Event$Companion.fromReader(Event.kt:95)
    05-20 21:46:28.874 17735 17800 E icsdroid: at at.bitfire.ical4android.Event$Companion.fromReader$default(Event.kt:72)
    05-20 21:46:28.874 17735 17800 E icsdroid: at at.bitfire.icsdroid.SyncAdapter$ProcessEventsTask.processEvents(SyncAdapter.kt:222)
    05-20 21:46:28.874 17735 17800 E icsdroid: at at.bitfire.icsdroid.SyncAdapter$ProcessEventsTask.run(SyncAdapter.kt:109)
    05-20 21:46:28.874 17735 17800 E icsdroid: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    05-20 21:46:28.874 17735 17800 E icsdroid: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    05-20 21:46:28.874 17735 17800 E icsdroid: at java.lang.Thread.run(Thread.java:761)
    05-20 21:46:29.920 17735 17798 E icsdroid: Couldn't process calendar
    05-20 21:46:29.920 17735 17798 E icsdroid: java.lang.ClassCastException: net.fortuna.ical4j.model.property.XProperty cannot be cast to net.fortuna.ical4j.model.property.Uid
    05-20 21:46:29.920 17735 17798 E icsdroid: at net.fortuna.ical4j.model.component.VEvent.getUid(VEvent.java:671)
    05-20 21:46:29.920 17735 17798 E icsdroid: at at.bitfire.ical4android.Event$Companion.fromReader(Event.kt:95)
    05-20 21:46:29.920 17735 17798 E icsdroid: at at.bitfire.ical4android.Event$Companion.fromReader$default(Event.kt:72)
    05-20 21:46:29.920 17735 17798 E icsdroid: at at.bitfire.icsdroid.SyncAdapter$ProcessEventsTask.processEvents(SyncAdapter.kt:222)
    05-20 21:46:29.920 17735 17798 E icsdroid: at at.bitfire.icsdroid.SyncAdapter$ProcessEventsTask.run(SyncAdapter.kt:109)
    05-20 21:46:29.920 17735 17798 E icsdroid: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
    05-20 21:46:29.920 17735 17798 E icsdroid: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
    05-20 21:46:29.920 17735 17798 E icsdroid: at java.lang.Thread.run(Thread.java:761)
    05-20 21:46:29.964 1164 1193 D SyncManager: not retrying sync operation because the error is a hard error: JobId: 105962, ICSdroid u0 (at.bitfire.icsdroid), com.android.calendar, PERIODIC, reason: Periodic


  • developer

    Thanks for the logs. Maybe they help to narrow down the problem.

    Where did you get ICSdroid from?



  • @rfc2822 Google play store



  • The log isn't showing the data that is causing the exception. I tried to set VERBOSE from the davdroid debug page but icsdroid stops trying to sync altogether. Any other things I can try?