DavDroid crashes when Android Calendar provider is deactivated



  • I added my Posteo CalDav Account (which should work, the posteo guys confirmed it).
    In the wizzard I was able to see my Calendar and my Adressbook. If I try to finish the wizard by clicking the tick I get an android message "davdroid has been closed". The adressbook is now shown in my accounts but not the calendar.

    https://gist.github.com/anonymous/ceb4972ef8b9e6b4eb4e


  • developer

    The logs say:

    E/AndroidRuntime(19725): java.lang.NullPointerException
    E/AndroidRuntime(19725): at at.bitfire.davdroid.resource.LocalCalendar.create(LocalCalendar.java:149)

    The code that caused the NullPointerException can be seen here: https://github.com/rfc2822/davdroid/blob/b7cd8baa05d5c03dfd2c8f6e87f90bdcabdadb8a/src/at/bitfire/davdroid/resource/LocalCalendar.java#L149

    So, client seemed to be null. It was fetched before in line 108:
    ContentProviderClient client = resolver.acquireContentProviderClient(CalendarContract.AUTHORITY);

    I don't know what could cause acquireContentProviderClient to return null.

    Which Android device, version etc. do you use? Did you try on other devices?



  • No other devices.
    Nexus 4
    Cyanogen Mod 10.2.1 (Stable)
    Android 4.3.1


  • developer

    Does this CyanogenMod have PrivacyGuard and is it disabled for DAVdroid?



  • No but I am using xprivacy. DAVdroid has all permissions (I also tried to shut down xprivacy and deactivate it für davdroid, nothing helped).


  • developer

    No but I am using xprivacy. DAVdroid has all permissions (I also tried to shut down xprivacy and deactivate it für davdroid, nothing helped).

    I guess the issue is related to XPrivacy. Would you mind to

    1. uninstall XPrivacy,
    2. uninstall DAVdroid,
    3. re-install DAVdroid to set up the account and see whether it's working,
    4. re-install XPrivacy?


  • I uninstalled xprivacy and the xposed framework an reinstalled DAVdroid as you said. The problem remains.


  • developer

    I uninstalled xprivacy and the xposed framework an reinstalled DAVdroid as you said. The problem remains.

    Ok. Unfortunately, I don't have further ideas why resolver.acquireContentProviderClient(CalendarContract.AUTHORITY) might return null… According to the docs, that would mean "there isn't one" (a CalendarContract.AUTHORITY, i.e. a calendar provider). So I should improve DAVdroid that it logs an error message in this case (instead of crashing), but that wouldn't solve your problem.

    Is there anything else that is different on your device in comparison to a "normal" Android device?



  • No the rest should be "normal".
    I have no google account added but I guess this is not linked to my problem.
    If I add the account, I can see the calendar and the contacts but as I sad afterwards it crashes.


  • developer

    I have no google account added but I guess this is not linked to my problem.

    No; I don't have one, too.

    If I add the account, I can see the calendar and the contacts but as I sad afterwards it crashes.

    What do you mean by "see the calendar"? In the DAVdroid GUI or in the Android GUI?

    Would updating to a more recent CyanogenMod be an option? This may fix it as I use a newer CyanogenMod, too and it's working here.

    Do you use other calendar apps beside the default Android calendar? Do you use other sync adapters?



  • No other sync adapters in use.
    I deactivated the original android calendar I am using aCalendar+


  • developer

    I deactivated the original android calendar I am using aCalendar+

    Sounds like deactivating the calendar deactivated the Calendar provider, too. However, DAVdroid uses the default Android Calendar provider.

    Please activate the Calendar (it's not only the GUI but also the provider!) and try again.



  • Thanks a lot its wokring fine now :) I thought that this is just another calendar app and a new one replaces this one!


  • developer

    Good to hear.

    I'll leave this issue open because DAVdroid shouldn't crash in this case but fail gracefully.


Log in to reply
 

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