Davdroid system account broken.



  • Hello,
    After updating to the latest version (initial version is unknown), contact groups (nextcloud server) disappeared. And then i re-created groups, they was doubled on server (for example, instead of one group of contacts called "old_contact" i had 2 on server side).

    So, i tried to re-install davdroid, and then system cannot see at all davdroid adressbook or calendar.

    Account created:
    alt text

    And visible in account list:
    alt text

    Sync is working:
    alt text

    But, i cannot add new contact to davdroid adressbook:
    alt text

    Nor i can see what that adressbook exists:
    alt text

    Debug:

    --- BEGIN DEBUG INFO ---
    
    SOFTWARE INFORMATION
    Package: at.bitfire.davdroid
    Version: 2.0.2-gplay (243) from 15 авг. 2018 г.
    Installed from: com.android.vending
    JB Workaround installed: no
    
    CONNECTIVITY (at the moment)
    Active connection: WiFi, CONNECTED
    
    CONFIGURATION
    android.permission.READ_CONTACTS permission: granted
    android.permission.WRITE_CONTACTS permission: granted
    android.permission.READ_CALENDAR permission: granted
    android.permission.WRITE_CALENDAR permission: granted
    org.dmfs.permission.READ_TASKS permission: granted
    org.dmfs.permission.WRITE_TASKS permission: granted
    System-wide synchronization: automatically
    Account: nord
      Address book sync. interval: 240 min
      Calendar     sync. interval: 240 min
      OpenTasks    sync. interval: 240 min
      WiFi only: false
      [CardDAV] Contact group method: CATEGORIES
      [CalDAV] Time range (past days): 90
               Manage calendar colors: true
    
    SQLITE DUMP
    android_metadata
    	|  locale |
    	|  ru_RU |
    ----------
    services
    	|  _id | accountName | service | principal |
    	|  1 | nord | carddav | https://MYSERVER/remote.php/dav/principals/users/nord/ |
    	|  2 | nord | caldav | https://MYSERVER/remote.php/dav/principals/users/nord/ |
    ----------
    sqlite_sequence
    	|  name | seq |
    	|  services | 2 |
    	|  homesets | 2 |
    	|  collections | 4 |
    ----------
    homesets
    	|  _id | serviceID | url |
    	|  1 | 2 | https://MYSERVER/remote.php/dav/calendars/nord/ |
    	|  2 | 1 | https://MYSERVER/remote.php/dav/addressbooks/users/nord/ |
    ----------
    collections
    	|  _id | serviceID | type | url | readOnly | forceReadOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | source | sync |
    	|  1 | 2 | CALENDAR | https://MYSERVER/remote.php/dav/calendars/nord/personal/ | 0 | 0 | Personal | <null> | <null> | <null> | 1 | 1 | <null> | 1 |
    	|  2 | 2 | CALENDAR | https://MYSERVER/remote.php/dav/calendars/nord/contact_birthdays/ | 1 | 0 | Contact birthdays | <null> | -54 | <null> | 1 | 1 | <null> | 1 |
    	|  3 | 1 | ADDRESS_BOOK | https://MYSERVER/remote.php/dav/addressbooks/users/nord/f338fcf7-9e99-41a9-ae74-04d3b695f70e/ | 0 | 0 | Adressbook | <null> | <null> | <null> | 0 | 0 | <null> | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 5.1.1 (xiaomi.eu)
    Device: Xiaomi Redmi 3 (ido)
    
    --- END DEBUG INFO ---
    

  • developer

    Hello,

    Thanks for your report. Can you provide steps to reproduce so that I can have a look?

    Device: Xiaomi Redmi 3 (ido)

    Did you try the things mentioned on https://www.davdroid.com/faq/synchronization-is-not-run-as-expected/, especially point 3 (Autostart, App auto-launch, Start in background, …)?



  • @rfc2822 Yes i tried.
    The main issue now is what android contacts, android calendar and also 3rd party application does not see davdroid account at all.

    Davdroid don't ask for permission to access contacts and calendar. In fact, in miui permission center it's shown as davdroid never tried to access nor contacts, nor calendar.

    I tried to test with another carddav application, and everything works fine, including sync (with groups).

    Step i done to encounter the issue:

    • original version worked fine (probably 2.0 or 2.0.1).

    • i installed update (2.0.2) via google play, on next sync to nextcloud server all groups disappeared, all contacts were marked as ungrouped.

    • I tried to recreate groups (2 test groups), and sync went fine. But this time on server side all contacts in newly created groups was marked as broken, and in group list i saw twice the same groupe: test (1), test(1), test(2), test(2).

    • Contacts, marked as broken in nextcloud web interface had only one issue: the same group name was marked twice: for "Contact 1 Ab BA" Groups "test (1), test(1)". On phone side there was no such issue.

    • Then i removed davdroid 2.0.2, and tried to install 2.0.1 via ADB.

    • Contacts on server side with groups was restored from backup

    • Created new account with davdroid, sync (even manual) does not work. Davdroid don't ask for permission to access contacts and calendar. In fact, in miui permission center it's shown as davdroid never tried to access nor contacts, nor calendar.

    • Updating one more time to 2.0.2 via google play. Same issue as with 2.0.1 above.

    • Removing davdroid, rebooting and wiping dalvik cache and cache.

    • Installing davdroid 2.0.2 from google play. Creating new account. Same issue as above, still no any sign of life. Contacts and calendar apps does not see davdroid account, davdroid don't try to access calendar or contacts at all.

    • Las step was a test with another carddav sync app, everything went fine.


  • developer

    @anyma I see. Unfortunately, I don't know what's going wrong, because everything works here fine and I don't have a Xiaomi device for testing. We didn't change anything about permissions or something like that from 2.0 to 2.0.2. I think it's not related to the update itself.

    Your problems sound like the numerous Xiaomi problems which are caused when DAVdroid is not allowed to "start in background" etc. However, we know that DAVdroid runs in Xiaomi devices if you do the right settings.

    If there's anything specific I can do for you, please let me know.