Switching off colors when there are already events with colors doesn't work


  • [rfc2822: I have split this topic from the other one because it’s another problem]

    @tomcat-x
    Now it happened again - on my wife’s mobile 😞

    What I tested this time additionally (to creating and changing entries on both sides) is creating new calendars on both sides (in DAVx5 and nextcloud). I could always see them on the other side after sync but not in calendar apps on Android.

    I then activated log and after sync I found following in log:

    2021-03-13 16:34:23 53815 [syncadapter.CalendarsSyncAdapterService] Couldn't sync calendars
    EXCEPTION java.lang.UnsupportedOperationException: Cannot delete color aquamarine. Referenced by 11 events.
    	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:167)
    	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
    	at android.content.ContentProviderProxy.delete(ContentProviderNative.java:547)
    	at android.content.ContentProviderClient.delete(ContentProviderClient.java:317)
    	at at.bitfire.ical4android.AndroidCalendar$Companion.removeColors(AndroidCalendar.kt:2)
    	at at.bitfire.davdroid.syncadapter.CalendarsSyncAdapterService$CalendarsSyncAdapter.sync(CalendarsSyncAdapterService.kt:5)
    	at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:13)
    	at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:334)
    

    Seems we used CoD (Color of Death 😉 ). After switching event color option on, sync worked again.

    How can I solve it? I switched event color option off because I don’t want to see my wife’s calendar entries in different colors on my device. I could not get it working with just switching the option off on my mobile, some entries got colors differing from calendar color there. So I had the idea to switch it of on my wife’s one so the colors would nether “leave” her mobile.

    I think last time issue was that after syncing on of these entries to my phone, sync stopped working there.

    By the way: we are using “Business Calendar”

  • developer

    @tomcat-x Thanks for your report. This should be fixed with https://gitlab.com/bitfireAT/ical4android/-/commit/a9ad9fbb17ef7a29cf37c78624c3237f7e3fc80c. Where did you get DAVx⁵ from? Google Play?


  • @rfc2822 said in Switching off colors when there are already events with colors doesn't work:

    I have split this topic from the other one because it’s another problem

    New topic for this concrete issue with exception in log is good idea, but I’m not sure if it really is another problem. I think “sync stop” (in other topic) was caused by it. Maybe it was no total sync stop but just all new entries had colors and hence were not synced.

    @rfc2822 said in Switching off colors when there are already events with colors doesn't work:

    Where did you get DAVx⁵ from? Google Play?

    No, not Google Play. Wherever possible I use F-Droid, so in this case.

  • developer

    No, not Google Play. Wherever possible I use F-Droid, so in this case.

    I see. Unfortunately, then I can’t send you an APK with the same key for testing. So you’d have to uninstall/install DAVx5 from the .apk for testing (I’d like to have a confirmation whether this is really fixed) or to wait until the next DAVx5 release.


  • @rfc2822 With re-installing I would loose calendars and contact lists which will cause some work (selecting which and how to display, filtering birthday lists, calendars for widget, … ) that I already did few days ago. And in this case I would have to do it even twice. So I would prefer waiting for the update.

    Also I think I would loose real “test data” after initial sync and test with any other scenario is not worse.


  • @rfc2822

    Seems this is working now or at least sync is not broken when switching colors of while there are entries with colors.

    But maybe you can explain a bit more how color settings work. Does it prevent syncing event colors from device to server, from server to device or both directions?

    I’m asking as I still have issue with it. Colors for Business Calendar are synced even with option set to off. After adding new entry with color and syncing to Nextcloud there is no color in Nextcloud calendar but description contains “BC2-Color: -16777216”. After syncing to other device with Business Calendar there color is set again.

  • developer

    @tomcat-x Sounds like a BC2 feature, which is not related to DAVx⁵.

    DAVx⁵ behavior:

    • “Event color support” disabled¹: DAVx⁵ tells Android that events in calendars of this account don’t have colors.
    • “Event color support” enabled: DAVx⁵ tells Android that events in calendars of this account can have colors (palette: CSS3 colors). DAVx⁵ maps these colors to the iCalendar COLOR property.

    When the “Event color support” setting is changed, full re-synchronization is queued so that all events are parsed and saved into the database with the new setting.


    ¹ Unfortunately the default setting because some very big calendar apps crash when non-Google events are saved with colors.


  • @rfc2822 Thanks for explanation. I will contact Business Calendar support. Maybe you should change FAQ and remove Business Calendar from successfully tested apps or at lease add note about (current?) limitation.


  • Simple answer from BC2 support: If you don’t use colors you won’t get the tags in description 😞

  • developer

    @tomcat-x I have successfully tested BC2 with Android native colors (which are supported by DAVx^5) in the past. Do you know why they have changed it?


  • @rfc2822 Sorry, no idea. I replied with quote about “iCalendar COLOR property”. Maybe 1st level doesn’t understand and I can reach developer 😉

    Meanwhile I tested aCalendar. There you can even switch of event color (separately) for each calendar, independently of syncing it or not. I found nearly all needed features, just miss the week view in table form.

    Will keep you updated.


  • After some mails: It is a feature, not a bug. Seems that other users (that are not using the best for doing it 😉 ) need it for syncing of extended colors. I opened feature request for switching it on/off but no idea how many users are thinking the same …

  • developer

    @tomcat-x Ok thanks. Do you maybe have a ticket ID? So that I could send them a request about this ID, too. (Although they have unfortunately never replied to anything from us in the past.)


  • @rfc2822 There is no ID visible in the GUI, in URL I see 43777809. Here is the link.

  • developer

    @tomcat-x Ah, thanks!

Similar topics