Calender not getting created



  • Hello,
    I am unable to use calDav sync because no calender gets created on my phone.
    Contact sync works perfectly fine.
    I am not sure if this problem comes from DAVDroid.

    I am running lineage14.1 (Android 7.1.2 ) on a Huawei P8 lite.
    I tried turning of battery saver and privacy guard. But didn't change anything. I want to sync manually anyway, so this should not be a problem.

    the server is a nextcloud13 instance on disroot.org (as said, carDav works fine)

    For calender apps, I tried "Simple Calendar", Android Calender and Etar.
    All apps are from f-droid. I have the Gapps micro installed.

    I tried version 2.0.1, 2.0.2 and 2.0.3. Neither did work.

    The app has all needed rights and I checked all calenders, which show up correctly.

    Sorry if this already got answered or if this is not a problem from davDroid.
    Thanks for your help 🙂

    0_1536067831523_debug.txt


  • developer

    Hello,

    Debug info looks fine. Did you force-sync the account in DAVdroid? If you did, it looks like this seems to come from a privacy guard or something like that.

    Are the calendars not created (no calendars when you choose "Calendars to show" in your calender app) or only the events? In this case, maybe the events are older than 90 days?

    (You don't need GApps for DAVdroid.)



  • Hey @rfc2822 , thanks for taking your time 🙂

    Did you force-sync the account in DAVdroid?

    What do you mean by that? I click on the two arrows on top and it starts loading and syncing.

    it looks like this seems to come from a privacy guard or something like that.

    I will play around with it some more. But it should notify me if anything is blocked. Just like apps ask for permission.

    You don't need GApps for DAVdroid.

    just wanted to be as transparent as I can be.

    Are the calendars not created (no calendars when you choose "Calendars to show" in your calender app) or only the events? In this case, maybe the events are older than 90 days?

    I don't see any calender to sync or select.

    list Android calendars with
    adb shell content query --uri content://com.android.calendar/calendars

    says "nothing found" or something like this. So it appears that there is really nothing.

    I added an event just for testing purposes. So there should be a reason to sync.

    And as I said, I see all calenders I see in NextCould in Davdroid


  • developer

    @bo41 said in Calender not getting created:

    What do you mean by that? I click on the two arrows on top and it starts loading and syncing.

    Yes, that's what I meant 🙂

    I don't see any calender to sync or select.

    list Android calendars with
    adb shell content query --uri content://com.android.calendar/calendars

    says "nothing found" or something like this. So it appears that there is really nothing.

    Then it seems like DAVdroid synchronization was never run, because when it runs the first time, it creates the calendars which are selected in the DAVdroid UI. Normally, this happens when the operating system blocks DAVdroid, like described here: https://www.davdroid.com/faq/synchronization-is-not-run-as-expected/ But that shouldn't happen with Lineage. Or maybe you have disabled the Calender Provider completely in Android/Apps or something like that?

    If you have adb: Can you do adb logcat and watch what happens when you press the sync button (with the two arrows) in DAVdroid?



  • Thats the logcat log right after clicking sync
    0_1536095903772_logcat.txt

    btw, I had disabled the calender storage some time ago. Because I wasn't using it with the calendar app I was using. But I enabled it again. this should not be a problem and break something right?

    here the debug command:

    adb shell content query --uri content://com.android.calendar/calendars                                                                                                                                                 :(
    No result found.
    

  • developer

    Thanks for the logs. DAVdroid adds the local calendars to the calendar storage:

    09-04 23:16:42.242 16878 17091 I davdroid: [syncadapter.CalendarsSyncAdapterService] Adding local calendar
    09-04 23:16:42.242 16878 17091 I davdroid: 	PARAMETER #0 = CollectionInfo(url=https://cloud.disroot.org/remote.php/dav/calendars/botbob/175e9fd0-2220-4b32-aab1-1c22e1c59997/, id=5, serviceID=2, type=CALENDAR, readOnly=false, forceReadOnly=false, displayName=vghj, description=null, color=-37632, timeZone=null, supportsVEVENT=true, supportsVTODO=true, selected=true, source=null, confirmed=false)
    09-04 23:16:42.245 16878 17091 I ical4android: [AndroidCalendar] Creating local calendar: calendar_color=-37632 sync_events=1 canOrganizerRespond=1 ownerAccount=botbob@disroot.org visible=1 canModifyTimeZone=1 account_type=bitfire.at.davdroid allowedAttendeeTypes=0,2,1,3 allowedAvailability=0,1,2 name=https://cloud.disroot.org/remote.php/dav/calendars/botbob/175e9fd0-2220-4b32-aab1-1c22e1c59997/ allowedReminders=1,2 account_name=botbob@disroot.org calendar_access_level=700 calendar_displayName=vghj
    ...
    

    apparently without errors. Later, the calendars are gone, because there are no calendars to sync before DAVdroid finishes.

    I have seen this behavior with some sandbox and privacy guard features. I'm 90% sure that this is some kind of privacy guard problem.



  • okay, thanks for the inspection.
    So it seems like a problem of something else than Davdroid.
    Thank you for finding this out 👍

    If you have any idea or similar issue, I would really appreciate it.
    Otherwise I have to look somewhere else to find the problem

    I guess you can close this entry/issue



  • @rfc2822 turns out there is a setting in the privacy guard to restrict app from modifying the calendar.
    And the calendar storage app had no permission to do so 🤦
    I probably took the permission, or maybe it was never set. Not sure

    0_1536098328049_photo_2018-09-04_23-58-38.jpg