Task sync occasionally deletes all tasks locally



  • HI,

    this happens since upgrade to 0.9.x, after automatic sync some tasks and calendar events are lost. I need to sync them manually, Accounts->dacdroid->"Sync now". The data is on ownCloud server but it not saved on mobile device.

    I suppose it was a change in new sync algorithm introduces in 0.9.x. It doesn't happen on another device with older version of davdroid.


  • developer

    1. Please provide detailed steps to reproduce. The problem didn't occur in our tests and without detailed information, we can't do anything except guessing around.
    2. Thanks for the report, but I don't know whether this issue is really worth investigating because DAVdroid is pre-1.0 yet, and you can just install 0.9 and go.


    • OwnCloud 8.1 with ~20 lists and calendars
    • some task lists have +100 done and +50 not done tasks
    • Most calendars are empty, or have a few events
    • Edit or add new task on mobile using Tasks application from F-Droid (DavDroid is also from F-Droid)
    • Tasks and calendars sync on change and every 4hours
    • Leave device for a few minutes/hours
    • Pick up device
    • Only a few (2-5) list have any elements, all other lists are empty
    • Go to account -> davdroiv -> tasks and "Sync now"
    • All list are complete now

  • developer

    @akero Did you check the tasks app (when you open it) or only the widget?



  • Both. This annoying behavior is since 0.8.4. I have one device with latest version of davdroid and one with 0.8.4 - I don't want to upgrade due to this bug. 0.8.4 works fine all the time with all lists, calendars and tasks.


  • developer

    @akero Unfortunately, I haven't seen this yet. Tasks disappear in the widget sometimes, see OpenTasks issue 153 on GitHub.

    Maybe you can provide verbose logs or some other hint? I really don't have an idea what could be the cause of your problem, and I use tasks myself and they work here.



  • Ok, I'll get you the log next week. Sorry, but can't do it sooner. Temporary fix for me is to disable global sync and refresh lists manually.


  • developer

    @akero Ok. I have experienced the "tasks disappear in the widget" problem myself, so you're really sure that the lists are empty in the Tasks app, too?



  • Yes, I open Tasks application and see the list where only a few top lists have items.



  • And I don't even use task widget on device with 0.9.x ;)


  • developer

    @akero If this happens, a copy of the Tasks database (/data/data/org.dmfs.tasks/databases/tasks.db) would also be useful (send to play@bitfire.at to keep it confidential).


  • developer

    I think I have found the problem: AndroidTask.delete() didn't delete a specific task (as it should) locally, but all tasks. That means if

    1. you delete a task in the CalDAV calendar,
    2. and then synchronize (automatically or manually),
    3. DAVdroid will see that the task is missing and try to delete it locally, but by mistake delete all tasks locally,
    4. continue synchronization and download the remaining tasks. If the delete operation was the last one, there are no tasks left, otherwise some tasks are left.
    5. At next synchroniziation, the remaining tasks (which have been deleted locally) are downloaded again.

    This has been fixed with ical4android/7df1b515.



  • Sounds great, thanks!



  • I can confirm this works, so I sent you a donations. Thanks!


Log in to reply
 

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