“Sync error” without OpenTasks



  • From a fresh install, a newly created DAVdroid sync account displays a “Sync error” message in the Android settings:

    0_1465685493675_Screenshot_20160611-215651.png

    However, synchronization seems to be working perfectly OK, both for contacts and calendar – I am getting all my contacts and events. DAVdroid does not show any notifications or messages when syncing. Selecting the account on the page shown above shows no issues either:

    0_1465685641780_Screenshot_20160611-215659.png

    I’ve tried various things like rebooting after installing DAVdroid, but I always get this “Sync error”. Again, this is from a fresh install (from F-Droid on a OnePlus One/Cyanogen OS 13.1-ZNH2KAS1KN). The service I’m connecting to is an ownCloud 9.0 server, if that’s relevant.

    Debug information (note: I’ve scrubbed personal information such as email addresses from this information): https://paste.fedoraproject.org/377840/65686131/

    I’ve also let DAVdroid create a log file and perform a sync; not sure if there’s any helpful information in there (again, personal information removed): https://paste.fedoraproject.org/377843/68640514/


  • developer

    Maybe this is because OpenTasks is not installed. Can you try to install it?



  • Yes, with OpenTasks installed (current version from F-Droid), the problem does indeed not appear. Right after setting up the sync account, the settings page does say “sync error”, but using “sync now” in the menu, the error disappears. Could it be that the absence of OpenTasks causes problems under certain conditions? I’ve set up another account on another phone (Nexus 4, Android 5) where I didn’t get the sync error, even without OpenTasks installed.


  • developer

    @Socob said in “Sync error” on Android “Settings > Accounts” page:

    Yes, with OpenTasks installed (current version from F-Droid), the problem does indeed not appear. Right after setting up the sync account, the settings page does say “sync error”, but using “sync now” in the menu, the error disappears. Could it be that the absence of OpenTasks causes problems under certain conditions? I’ve set up another account on another phone (Nexus 4, Android 5) where I didn’t get the sync error, even without OpenTasks installed.

    Is is possible that OpenTasks was available when DAVdroid was set up, and then removed? I could imagine that DAVdroid sets up task synchronization (which it does whenever OpenTasks is installed), and if OpenTasks is removed afterwards, Android can't start the set-up synchronization (because OpenTasks isn't there anymore) and shows an error. However, this is pure speculation and would have to be confirmed.



  • @rfc2822 said in “Sync error” on Android “Settings > Accounts” page:

    Is is possible that OpenTasks was available when DAVdroid was set up, and then removed? I could imagine that DAVdroid sets up task synchronization (which it does whenever OpenTasks is installed), and if OpenTasks is removed afterwards, Android can't start the set-up synchronization (because OpenTasks isn't there anymore) and shows an error. However, this is pure speculation and would have to be confirmed.

    No, I have never had OpenTasks installed anywhere until I tried it out today following your suggestion. By the way, I forgot to mention that I uninstalled DAVdroid first, then installed OpenTasks, and then installed DAVdroid again (I read somewhere that OpenTasks should be installed first). But it does seem that installing OpenTasks somehow gets rid of the error.


  • developer

    @Socob Ok… do you think this problem is reproducible and you can provide steps to reproduce?



  • @rfc2822 Well, it’s certainly reproducible on my device. However, I can’t say what the exact conditions are under which this problem appears. As I said above, on a Nexus 4 with Android 5, this issue doesn’t seem to be there. So maybe it’s Android 6-related, maybe it isn’t.

    The reproduction steps are barely worth mentioning, but sure, I can make a list:

    1. Make sure OpenTasks is not installed.

    2. Install DAVdroid (from F-Droid in my case, can’t speak for a Play Store install).

    3. Open DAVdroid and set up an account through “Login with URL and user name” (in my case using a base URL, username and password for an ownCloud 9.0 instance; not sure if the fact that ownCloud is used is relevant).

    4. If DAVdroid prompts for permissions to access calendar and contacts, grant these.

    5. Go into the Android system settings and select “Accounts”. Select DAVdroid. Observe that Android reports an error message with “sync error” for the account that was just set up (see first post).

      However, if the calendar or contacts list are inspected, one can see that the synchronization seems to have completed without issues. DAVdroid reports no errors or messages.

    Notes:

    • At this point, I have tried a few things, in different orders. For example:

      • selecting “sync now” in the menu on the Android system settings page that shows the error;
      • setting the sliders for “calendar” and contacts” in the system sync settings for the account (see second picture in original post) off and on;
      • going into DAVdroid, selecting the account and doing “synchronize now”;
      • rebooting the phone.

      I also tried selecting “synchronize now” in DAVdroid before ever opening the Android system settings. So far, none of this has changed the status of the “sync error”.

    • If OpenTasks is installed before DAVdroid, the problem does not seem to appear.

    • Things like Privacy Guard in CyanogenMod, which might interfere with permissions, are not enabled for DAVdroid.



  • I am facing the same problem on my Nexus 6P running latest stock Android, using Baikal 0.4.5 and DAVdroid 1.2-gplay. As soon as I install OpenTasks, the sync error is gone.

    The same problem happens on my Nexus 9 tablet as well.


  • developer

    On Android >= 6, DAVdroid enables task sync by default, so that it can be added "on the fly" by installing OpenTasks. (On older Android versions, OpenTasks had to be installed before DAVdroid.)

    Probably the "sync error" is caused by the fact that OpenTasks sync is enabled by DAVdroid, but OpenTasks is not available.

    You can safely ignore this error.


  • developer

    Since 967bc50:

    For Android 6, the default synchronization interval for OpenTasks is set to

    • DEFAULT_SYNC_INTERVAL (currently 4 hours) if OpenTasks is installed, and
    • "manually" if OpenTasks is not installed.

    So, if you install OpenTasks after DAVdroid, but before creating the DAVdroid account, DAVdroid will set the default sync interval automatically. However, if you add an account and then install OpenTasks, you'll have to change the sync interval of the existing account manually.

    For Android <6, behavior stays the same: OpenTasks sync is always disabled when OpenTasks is not accessible (and it won't be accessible unless OpenTasks was installed before DAVdroid was installed).


Log in to reply
 

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