No calendar and no contacts after sync with radicale server.



  • My set-up:

    The server: Radicale 1.1.1+20160118-4 as it comes with the freedombox (testing
    version upgraded today). The server works fine with KOrganizer/KaddressBook,
    if using the ics file, which is the one I'm using.

    The android side: Samsung galaxy S (SGH-T959 aka Vibrant) running Cyanogenmod
    10.1-20140217 vibrantmtd, Android 4.2.2, kernel 3.0.86 Feb 16, 2014. I think
    this is the latest version available for this phone.

    This phone has no google anything on it. Whatever apps I have installed
    came from f-droid.org. The relevant apps are "People", "Calendar" and
    "Tasks". The latter is the only one I installed from f-droid.org,
    OpenTasks, as advised here:

    https://wiki.debian.org/FreedomBox/Manual/Radicale

    The first two were the default apps that came with Cyanogenmod.

    First attempt: "Unfortunately DAVdroid has stopped" 2 ways to make it happen.

    Downloaded DAVdroid 1.9.1 from f-droid.org and it installed fine. Created
    an account with the URL of the server, user name and password. It detected
    the addressbook.vcf file, the calendar.ics file (this is the one I'm using)
    and the calendar.vcs file (that I'm not using because korganizer doesn't
    display the calendar at all - no errors, just nothing displayed). I need
    to have one master calendar and since korganizer doesn't agree with the
    vcs file, the ics file it is.

    So, I enabled the calendar.ics and the kaddressbook.vcf entries. When
    synchronizing with the 2 arrows in a circle, it did something for a while
    but the error occurred when trying to synchronize the addressbook.vcf file.
    When I click OK it goes back to CalDAV for a while, then CardDAV again and
    it crashes again with the same message. After clicking OK again nothing
    happens, until I try to re-synchronize with the 2 arrows in a circle. Then
    the same crash occurs. if I tap on the CardDAV menu and "Refresh address
    book list" it does something for a while and then the same message appears.
    This time it goes back to the big button with the account name on it.

    After this, the to-do list actually shows up in the "Tasks" app, but the
    address book doesn't show in the "People" app and the calendar doesn't
    show in the "Calendar" app. There is no calendar visible to the calendar
    app, no matter how many times I tap on what calendar to view or what calendar
    to sync.

    Next: I turned on "log to external storage" and instant crash. This time
    DAVdroid exited immediately. Re-starting it caused an immediate crash/exit,
    again and again. The only solution to that was to uninstall/re-install.
    After each re-install, turning on "log to external storage" caused the
    immediate crash.

    So I go searching for answers and find the thread about the replicant
    crashes. This is puzzling as I don't have any google app on this phone.
    In fact it is not even connected to a phone company. I'm using it strictly
    as a wifi device. Still, I delete DAVdroid 1.9.1 and install 1.9.

    Second attempt: No crashes but still calendar and contacts don't show.

    Installed 1.9 and repeated all the steps. No crashes but after many tries
    of the same results (no calendar and no addressbook) it finally seemed to see
    the davdroid addressbook, but now the message appears: "Sync is currently
    experiencing problems. It will be back shortly."

    From the radicale.log on the server. This is what results from a sync
    (tapping the to arrow circle):

    2017-11-09 20:07:52,331 - INFO: PROPFIND request at /<user>/calendar.ics/ received
    2017-11-09 20:07:53,381 - INFO: REPORT request at /<user>/calendar.ics/ received
    2017-11-09 20:07:59,685 - INFO: PROPFIND request at /<user>/addressbook.vcf/ received
    2017-11-09 20:07:59,907 - INFO: PROPFIND request at /<user>/addressbook.vcf/ received
    2017-11-09 20:08:02,362 - INFO: REPORT request at /<user>/addressbook.vcf/ received

    Taping "Refresh address book list" causes this on the radicale server:

    2017-11-09 20:12:12,962 - INFO: PROPFIND request at /<user>/ received
    2017-11-09 20:12:13,080 - INFO: PROPFIND request at /<user>/ received

    Tapping "Refresh calendar list" causes this:

    2017-11-09 20:13:27,343 - INFO: PROPFIND request at /<user>/ received
    2017-11-09 20:13:27,493 - INFO: PROPFIND request at /<user>/ received
    2017-11-09 20:13:42,898 - INFO: PROPFIND request at /<user>/calendar.ics/ received
    2017-11-09 20:13:42,935 - INFO: PROPFIND request at /<user>/calendar.ics/ received
    2017-11-09 20:13:44,277 - INFO: PROPFIND request at /<user>/addressbook.vcf/ received
    2017-11-09 20:13:44,312 - INFO: PROPFIND request at /<user>/addressbook.vcf/ received
    2017-11-09 20:13:44,931 - INFO: REPORT request at /<user>/calendar.ics/ received
    2017-11-09 20:13:45,924 - INFO: REPORT request at /<user>/calendar.ics/ received
    2017-11-09 20:13:46,563 - INFO: REPORT request at /<user>/calendar.ics/ received

    Still no addressbook shows up in the "People" app. When attempting to sync
    from the "People" app, I get:

    "Sync is currently experiencing problems. It will be back shortly."

    and it stays there.

    I turn on "log to external storage" and at least now it dosen't immediately
    crash. This is the error at the end of the voluminous log file DAVdroid
    created:

    ...
    2017-11-09 22:19:33 4 [BatchOperation] Committing 7 operations …
    2017-11-09 22:19:33 4 [BatchOperation] Running operations 0 to 6
    2017-11-09 22:19:33 4 [syncadapter.SyncManager] Couldn't access local storage
    EXCEPTION at.bitfire.vcard4android.ContactsStorageException: Couldn't apply batch operation
    at at.bitfire.vcard4android.BatchOperation.commit(BatchOperation.kt:46)
    at at.bitfire.vcard4android.AndroidContact.create(AndroidContact.kt:555)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager.processVCard(ContactsSyncManager.kt:436)
    at at.bitfire.davdroid.syncadapter.ContactsSyncManager.downloadRemote(ContactsSyncManager.kt:353)
    at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.kt:155)
    at at.bitfire.davdroid.syncadapter.ContactsSyncAdapterService$ContactsSyncAdapter.sync(ContactsSyncAdapterService.kt:44)
    at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:57)
    at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
    Caused by: android.content.OperationApplicationException: insert failed
    at android.database.DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(DatabaseUtils.java:158)
    at android.content.ContentProviderProxy.applyBatch(ContentProviderNative.java:461)
    at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:225)
    at at.bitfire.vcard4android.BatchOperation.runBatch(BatchOperation.kt:73)
    at at.bitfire.vcard4android.BatchOperation.commit(BatchOperation.kt:36)
    ... 7 more

    2017-11-09 22:19:33 4 [syncadapter.ContactsSyncAdapterService] Contacts sync complete
    2017-11-09 22:19:33 4 [syncadapter.SyncAdapterService] Sync for com.android.contacts complete

    It looks like a local (to the phone) problem:

    2017-11-09 22:19:33 4 [syncadapter.SyncManager] Couldn't access local storage

    So, I go looking for permissions issues, but the files and directories under
    /data/data all look the same for calendar, contacts and tasks. Since
    the task list was trasfered correctly and tapping the tasks app shows the
    to-do list, it's something else.

    It would be nice if the log file specified to what directory it's trying to
    write (it might be non-existent) and what file name it's attempting to
    create.

    I have searched for hours and hours but all the references I see to similar
    problems don't seem to apply. Most relate to google which I'm not running.

    This page has a pretty good tutorial and specifically targets DAVdroid:

    http://www.makeuseof.com/tag/sync-calendars-linux-android/

    In the problems section are these 4 items:

    Check that the Calendar Storage app on Android is not disabled or missing.

    There is no such app on the phone or on f-droid.org. If this is a
    requirement, it seems like a show-stopper and an anti-feature.

    If you’re using Privacy Guard, this shouldn’t block DAVDroid’s access
    to calendar and contacts data.

    I have disabled all iptables rules for testing, so this is not it either.
    The fact that the task list works proves it.

    Try to disable the Restrict Background Data option in Android’s
    Settings > Data Usage.

    I can't find this option anywhere. Since I'm not even using a phone company
    connection (wifi only) it shouldn't apply anyway.

    If your Android device has a system-wide sync switch, make sure it’s
    not turned off

    I can't find such a switch either, and the fact that task sync works also says
    this is not the problem.

    Due to an Android bug, updating calendar apps can cause CalDAV accounts
    to get deleted. If this happens, you can install workaround apps for
    CalDAV-Sync and DAVDroid.

    This seems to be a different problem. But it's disturbing that the links in
    the above page point to google. I guess those of us that prefer to stay
    google-free are out of luck.

    Can anyone point me to what to try next? More specific tests? a workaround?
    a solution?

    Thanks.

    PS: Is there an email to forum interface? Forums are quite inconvenient
    for me.



  • UPDATE:

    Earlier I said:

    This page has a pretty good tutorial and specifically targets DAVdroid:

    http://www.makeuseof.com/tag/sync-calendars-linux-android/

    In the problems section are these 4 items:

    Check that the Calendar Storage app on Android is not disabled or missing.

    There is no such app on the phone or on f-droid.org. If this is a
    requirement, it seems like a show-stopper and an anti-feature.

    Turns out that Calendar Storage and Contacts Storage both exist and
    are running. Also, thanks to a hint from the Replicant list I investigated
    possible permissions issues. I finally found that there was a check-box
    for "Enable Privacy Guard" that I had to un-check. After that the sync
    worked. It took a long time but I now have the address book and calendar
    on the phone.

    PS: I have no-script enabled in my browser and I allow the minimum amount
    of non-relevant sites for privacy. I am not on twitter, therefore digging
    for twitter information shouldn't be relevant, yet it was not possible to
    post this reply until I allowed twitter.com so this web site could go
    snooping for twitter information. Not user-friendly. Twitter information,
    especially if it's not relevant, like in my case as there is none, should
    not be a pre-requisite for posting a reply. Yet another reason why I prefer
    email lists to forums.


  • admin

    Thanks for the information and update! Great that you found it out.

    Sorry for the inconvenience. Now we know that no_script prevents the usage of the forum. We'll have a look at it.


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.