tasks / tasks

Bringing Astrid Tasks back from the dead
http://tasks.org
GNU General Public License v3.0
3.68k stars 506 forks source link

Subtasks dissapears when Sync activated #932

Closed phileastv closed 3 years ago

phileastv commented 4 years ago

Hello!

I recently encounter what seems to be a bug. When I create a task with subtasks that are synchronized with a CalDav server, the instant where I refresh the page, all subtasks disappears, and only the parent one stays.

This does not happen with non-synchronized tasks, so it seems like a synchronisation issue even if the documentation seems to say that subtasks are properly handled with CalDav sync. All the tasks are correctly synchronised with the server as I get them back with my desktop clients.

I tried to do the other way arround: create subtasks in another client, and see if they show in Tasks app. Unfortunately, Thunderbird and Outlook (the two desktop client I use) did not support subtasks, so I tried with dmff/opentasks app, but I seems like this one does not manage subtasks Synchronisation in a proper way like Tasks, but rather with adding text with Markdown-style formatting in the Tasks description (which is also OwnCloud formatting).

I'm using the paid Play Store version 8.4 with a sabre/dav server on a phone with microG installed.

This is what I found related in the logcat, but I don't understand why there are related to com.google.android.talk package, and then with org.tasks.caldav.CaldavSynchronizer (maybe it isn't an log related to this issue).

2020-03-14 16:06:49.193 5458-7421/? D/GmsClearcutSvc: bound by: GetServiceRequest{serviceId=CLEARCUT_LOGGER, gmsVersion=200402000, packageName='com.google.android.talk', extras=Bundle[{}]}
2020-03-14 16:06:49.201 5458-5591/? D/GmsClearcutLogSvcImpl: log: LogEventParcelable[1, PlayLoggerContext[1, package=com.google.android.talk, packageVersionCode=26212518, logSource=-1, uploadAccount=null, loggingId=-1, logAndroidId=true, logSourceName=HANGOUT_LOG_REQUEST, isAnonymous=false, qosTier=0], LogEventBytes: CNW31cyNLjIzEjEIEhgBIBGIAQGYAce31cyNLrIBAzDyB8oBEzQwNDIxODQ3NTkxODgwODAyMjLgAaoHeKA4iAHR140Z, AddPhenotypeExperimentTokens: true]
        at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:135)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at at.bitfire.dav4jvm.BasicDigestAuthHandler.intercept(BasicDigestAuthHandler.kt:291)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:127)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:257)
        at okhttp3.RealCall.execute(RealCall.java:93)
        at at.bitfire.dav4jvm.DavResource$put$1.invoke(DavResource.kt:242)
        at at.bitfire.dav4jvm.DavResource$put$1.invoke(DavResource.kt:34)
        at at.bitfire.dav4jvm.DavResource.followRedirects(DavResource.kt:378)
        at at.bitfire.dav4jvm.DavResource.put(DavResource.kt:230)
        at org.tasks.caldav.CaldavSynchronizer.pushTask(CaldavSynchronizer.java:361)
        at org.tasks.caldav.CaldavSynchronizer.pushLocalChanges(CaldavSynchronizer.java:295)
        at org.tasks.caldav.CaldavSynchronizer.sync(CaldavSynchronizer.java:194)
        at org.tasks.caldav.CaldavSynchronizer.synchronize(CaldavSynchronizer.java:176)
        at org.tasks.caldav.CaldavSynchronizer.sync(CaldavSynchronizer.java:127)
        at org.tasks.jobs.SyncWork.lambda$sync$0$SyncWork(SyncWork.java:77)
        at org.tasks.jobs.-$$Lambda$SyncWork$aUTT-i0SzLlh0XRJ6gxSGjry72s.run(Unknown Source:4)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)

    java.net.ProtocolException: HTTP 204 had non-zero Content-Length: 20
        at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:135)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at at.bitfire.dav4jvm.BasicDigestAuthHandler.intercept(BasicDigestAuthHandler.kt:291)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:127)
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:257)
        at okhttp3.RealCall.execute(RealCall.java:93)
        at at.bitfire.dav4jvm.DavResource$put$1.invoke(DavResource.kt:242)
        at at.bitfire.dav4jvm.DavResource$put$1.invoke(DavResource.kt:34)
        at at.bitfire.dav4jvm.DavResource.followRedirects(DavResource.kt:378)
        at at.bitfire.dav4jvm.DavResource.put(DavResource.kt:230)
        at org.tasks.caldav.CaldavSynchronizer.pushTask(CaldavSynchronizer.java:361)
        at org.tasks.caldav.CaldavSynchronizer.pushLocalChanges(CaldavSynchronizer.java:295)
        at org.tasks.caldav.CaldavSynchronizer.sync(CaldavSynchronizer.java:194)
        at org.tasks.caldav.CaldavSynchronizer.synchronize(CaldavSynchronizer.java:176)
        at org.tasks.caldav.CaldavSynchronizer.sync(CaldavSynchronizer.java:127)
        at org.tasks.jobs.SyncWork.lambda$sync$0$SyncWork(SyncWork.java:77)
        at org.tasks.jobs.-$$Lambda$SyncWork$aUTT-i0SzLlh0XRJ6gxSGjry72s.run(Unknown Source:4)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)
2020-03-14 16:06:52.051 22013-22072/? I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=c2e6d053-f229-46a5-aaca-b1cff0a42c87, tags={ org.tasks.jobs.SyncWork } ]
2020-03-14 16:06:52.062 982-2650/? D/ConnectivityService: releasing NetworkRequest [ TRACK_DEFAULT id=116, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED Uid: 10285] ] (release request)
2020-03-14 16:06:52.152 22013-22047/? I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=4adff8ee-e080-41e9-b9b8-2ddfc8cec5da, tags={ org.tasks.jobs.AfterSaveWork } ]
2020-03-14 16:06:52.243 2902-2921/? I/ndroid.systemu: Background concurrent copying GC freed 212295(9409KB) AllocSpace objects, 18(4848KB) LOS objects, 55% free, 10040KB/21MB, paused 71us total 173.055ms
2020-03-14 16:06:52.254 2902-2922/? W/JavaBinder: BinderProxy is being destroyed but the application did not call unlinkToDeath to unlink all of its death recipients beforehand.  Releasing leaked death recipient: com.android.systemui.qs.external.TileLifecycleManager
2020-03-14 16:06:52.266 22013-22044/? I/WM-WorkerWrapper: Worker result SUCCESS for Work [ id=f7cc888b-6955-4630-9d4e-dbb67f16bb8a, tags={ org.tasks.jobs.CleanupWork } ]

Again thanks a lot for your superb app ! I hope other CalDav clients will be implementing proper subtasks support like what this app did.

abaker commented 4 years ago

Do you have ☰ > Settings > Look and feel > Show subtasks toggled on?

phileastv commented 4 years ago

Thanks for your fast answer @abaker . Sorry, I forgot to mention this, but yes, of course I have this on.

abaker commented 4 years ago

Can you do a search for one of the phantom subtasks and see if it appears?

abaker commented 4 years ago

Or try toggling "Show subtasks" off and see if it is there

phileastv commented 4 years ago

Just tried multiple times, but sadly, those two things doesn't seem to bring them back either... But perfectly working when they are not synchronised over CalDav (maybe I should try on another Sync server/service). They also does not appear of the parent's Task details.

Edit : I confirm that it is perfectly working with Google Tasks sync service.

phileastv commented 4 years ago

Just saw theses lines in the log cat. Could it be linked to this issue ?

2020-03-14 17:33:21.121 629-629/? E/Layer: [Surface(name=AppWindowToken{19404e9 token=Token{6c07970 ActivityRecord{7d15fb3 u0 org.tasks/com.todoroo.astrid.activity.TaskListActivity t3098}}})/@0xfb9e61e - animation-leash#0] No local sync point found
2020-03-14 17:33:21.121 629-629/? E/Layer: [Surface(name=AppWindowToken{19404e9 token=Token{6c07970 ActivityRecord{7d15fb3 u0 org.tasks/com.todoroo.astrid.activity.TaskListActivity t3098}}})/@0xfb9e61e - animation-leash#0] No local sync point found
2020-03-14 17:33:25.364 982-9154/? E/InputDispatcher: Window handle Window{777f7c8 u0 org.tasks/com.todoroo.astrid.activity.TaskListActivity} has no registered input channel
2020-03-14 17:33:25.385 982-5248/? E/InputDispatcher: Window handle Window{777f7c8 u0 org.tasks/com.todoroo.astrid.activity.TaskListActivity} has no registered input channel
2020-03-14 17:37:10.532 629-629/? E/Layer: [Surface(name=AppWindowToken{19404e9 token=Token{6c07970 ActivityRecord{7d15fb3 u0 org.tasks/com.todoroo.astrid.activity.TaskListActivity t3098}}})/@0xfb9e61e - animation-leash#0] No local sync point found
abaker commented 4 years ago

Try creating a nextcloud account with one of the providers here and see if subtasks work for you. I have a webo.hosting account set up on my device.

I haven't tested a standalone sabre/dav since subtask support was added, although I thought nextcloud used sabre/dav? I will try to test this out soon

phileastv commented 4 years ago

Indeed, this is perfectly working on a fresh Nextcloud installation ! My sabre/dav is preconfigured on my hosting provider, so I will try to do a fresh install of the server on a NAS to see if this is related.

kaugummiheld commented 4 years ago

Hey, not trying to take over this thread but I noticed something to when using subtasks and CalDAV synchronisation (in my case mailbox.org, which in contrast to #948 seems to work). But I noticed that subtasks appear on the other end as independent tasks with no connection whatsoever. This is a so in mailbox.org's webinterface as other CalDAV applications (e.g. OpenTasks on android as well as KOrganizer on my linux Desktop. That said, unfortunately I cannot check with another Tasks instance since I have no other android device available. Something I can do or is this the expected behavior for CalDAV? (Not sure if CalDAV allows for subtasks at all or not.) Thanks in advance! :slightly_smiling_face:

Edit: I just saw the in the webinterface of mailbox.org there seems to be no option for subtasks, so I guess it isn't implemented. :roll_eyes:

abaker commented 4 years ago

Yeah Tasks is using the subtask field specified in the CalDAV protocol. I haven't used a lot of CalDAV clients, but the only one I know of that supports subtasks is the Nextcloud Tasks web app

devurandom commented 4 years ago

not trying to take over this thread but I noticed something to when using subtasks and CalDAV synchronisation (in my case mailbox.org, which in contrast to #948 seems to work). But I noticed that subtasks appear on the other end as independent tasks with no connection whatsoever.

I can confirm this: When synchronising a list to mailbox.org, all sub-tasks become top-level tasks, resulting in a huge mess. Is it possible to determine support for sub-tasks through the CalDAV protocol and disable the feature for lists that are synchronised to such providers (and refuse to move tasks with sub-tasks to such lists, etc)? Or create a blacklist of known-bad server software versions?

abaker commented 4 years ago

@devurandom Sorry I probably can't do that. Tasks doesn't know what server or version it is synchronizing with, and it would be quite a bit of work to blacklist subtask functionality based on the server.

I admittedly know nothing about Open-Xchange, but given the CalDAV bugs that have been released this year, combined with the time it takes for a fix to land at mailbox.org, I'd recommend finding an alternative task list host that does not use Open-Xchange. If you want subtasks in a web interface then AFAIK your only option is Nextcloud.

go2null commented 4 years ago

Yeah Tasks is using the subtask field specified in the CalDAV protocol. I haven't used a lot of CalDAV clients, but the only one I know of that supports subtasks is the Nextcloud Tasks web app

Can you provide a link to the section that specifies SubTasks? Thanks

abaker commented 4 years ago

https://icalendar.org/iCalendar-RFC-5545/3-8-4-5-related-to.html

iad81 commented 3 years ago

not trying to take over this thread but I noticed something to when using subtasks and CalDAV synchronisation (in my case mailbox.org, which in contrast to #948 seems to work). But I noticed that subtasks appear on the other end as independent tasks with no connection whatsoever.

I can confirm this: When synchronising a list to mailbox.org, all sub-tasks become top-level tasks, resulting in a huge mess. Is it possible to determine support for sub-tasks through the CalDAV protocol and disable the feature for lists that are synchronised to such providers (and refuse to move tasks with sub-tasks to such lists, etc)? Or create a blacklist of known-bad server software versions?

Sorry for reviving a closed issue, but I have same the problem with mailbox.org. Have you found a solution or alternative to this? Thanks!

devurandom commented 3 years ago

Sorry for reviving a closed issue, but I have same the problem with mailbox.org. Have you found a solution or alternative to this? Thanks!

No, I have not found a solution. It appears we need to bug mailbox.org about this, so that they bug Open-Xchange about it, and this finally gets implemented...

dirrgang commented 2 years ago

Mailbox.org points fingers at Open-Xchange, and don't seem to be willing or able to get the feature implemented. Which is weird to me, isn't repeating tasks part of the CalDAV standard?