@rfc2822 said in regression: DUE must not be < DTSTART causing exception in task sync:
@pocock said:
Yes, but not until later
Then please do so. DAVdroid won’t make up a story, the exception is quite clear.
Also, I don’t think this is a “regression” because DAVdroid doesn’t crash anymore, but reports the error to the user as intended.
I used adb logcat to watch the log while doing the sync
From the log, I was able to identify the task ID:
I/davdroid(30063): [syncadapter.TasksSyncManager] Updating 5......7c.ics in local tasklist
W/ContentResolver(29998): Failed to get type for: content://org.dmfs.tasks (Unsupported URI: content://org.dmfs.tasks)
E/DatabaseUtils(29998): Writing exception to parcel
E/DatabaseUtils(29998): java.lang.IllegalArgumentException: DUE must not be < DTSTART
E/DatabaseUtils(29998): at org.dmfs.provider.tasks.processors.tasks.TaskValidatorProcessor.verifyCommon(Unknown Source)
Then I used wget to fetch the ics entry from the DAViCal server manually and save it to disk.
I found that DUE == DTSTART
Looking at the task in IceOwl-extension (Mozilla Lightning), the Start and Due Date times are both set to the same value with the same timezone. The checkbox next to Start is ticket and the checkbox next to Due Date is not ticked, the Due Date values are gray in Mozilla Lightning
In the ics file, I notice that DTSTART exists but DUE is not present anywhere:
DTSTART;TZID=Europe/Zurich:20151111T060000
Looking in the Tasks app, I find the task is in there and it has both a start and end time, they are the same values that I see in Mozilla Lightning
Could it be trying to merge these in some ugly way? I guess I could try enabling the Due Date value in Lightning and then doing the sync again to see if that clears the issue.
It would also be really good if the exception could show more detail. While I’m quite capable of using logcat and wget to identify the task entry, many users would find this frustrating and even for me it meant waiting more than a month before I had a spare 20 minutes to start analyzing it. Maybe you could improve the message that appears on-screen so that it shows the task’s ID and if available, the SUMMARY and first 80 characters of the DESCRIPTION?
Another problem I’ve observed is that whenever I change the Android device’s timezone, I see a popup telling me that OpenTasks has stopped. Looking at logcat, I see the same exception about DTSTART.