CCExtractor / taskwarrior-flutter

This is the repo of mobile app of taskwarrior
https://play.google.com/store/apps/details?id=com.ccextractor.taskwarriorflutter
GNU General Public License v3.0
103 stars 86 forks source link

Problem syncing tasks with taskserver #324

Closed maxwai closed 4 months ago

maxwai commented 4 months ago

Describe your issue

There is a Problem with syncing tasks with a taskserver. As far as I can tell, the sync key is not correctly saved.

I've attached the taskserver log to be able to troubleshoot as I don't see any logs when running the app with flutter.

Also I've noticed that tasks created on the PC (before setting up the app, as after setting up the app is the same problem as above) are not shown in the app after the first sync even if the taskserver did send every task.

Steps to reproduce

  1. Create Task on phone
  2. sync app with taskserver
  3. sync PC with taskserver, task comes up
  4. on PC, mark task as done/delete whatever, just make a change
  5. sync PC with taskserver
  6. sync app with taskserver
  7. change is not visible on the app

What was the expected result?

Normally I would expect the app to be able to sync task changes that are not made in the app since this is the whole point of a taskserver.

Put here any screenshots or videos (optional)

Here are the logs from the taskserver, with explanations what is being done: (IPs are redacted)

-- Getting statistics in the app
2024-03-01 08:59:01 [83] 'statistics' from <IP>:1454
2024-03-01 08:59:01 [83] Serviced in 0.051224s
-- First sync in the app
2024-03-01 08:59:12 [84] 'sync' from 'Public/maxwai' using 'com.ccextractor.taskwarriorflutter 1.0.0' at <IP>:51616
2024-03-01 08:59:12 [84] Client key '' + 0 txns
2024-03-01 08:59:12 [84] Loaded 1225 records
2024-03-01 08:59:12 [84] Subset 909 tasks
2024-03-01 08:59:12 [84] Stored 0 tasks, merged 0 tasks
2024-03-01 08:59:12 [84] Sync key '729a20f7-af59-4d05-9e0a-d5462b932db9' still valid
2024-03-01 08:59:12 [84] Serviced in 0.200751s
-- First sync on PC
2024-03-01 09:00:42 [85] 'sync' from 'Public/maxwai' using 'task 2.6.2' at <IP>:58486
2024-03-01 09:00:42 [85] Client key '729a20f7-af59-4d05-9e0a-d5462b932db9' + 0 txns
2024-03-01 09:00:42 [85] Loaded 1225 records
2024-03-01 09:00:42 [85] Branch point: 729a20f7-af59-4d05-9e0a-d5462b932db9 --> 1224
2024-03-01 09:00:42 [85] Subset 0 tasks
2024-03-01 09:00:42 [85] Stored 0 tasks, merged 0 tasks
2024-03-01 09:00:42 [85] Sync key '729a20f7-af59-4d05-9e0a-d5462b932db9' still valid
2024-03-01 09:00:42 [85] No change
2024-03-01 09:00:42 [85] Serviced in 0.013649s
-- Sync App after creating Task
2024-03-01 09:02:27 [87] 'sync' from 'Public/maxwai' using 'com.ccextractor.taskwarriorflutter 1.0.0' at <IP>:55654
2024-03-01 09:02:27 [87] Client key '' + 1 txns
2024-03-01 09:02:27 [87] Loaded 1225 records
2024-03-01 09:02:27 [87] Subset 909 tasks
2024-03-01 09:02:27 [87] Stored 1 tasks, merged 0 tasks
2024-03-01 09:02:27 [87] New sync key '84a2fb54-6e30-459d-b4db-0199f3c986fa'
2024-03-01 09:02:27 [87] Wrote 2
2024-03-01 09:02:27 [87] Serviced in 0.208136s
-- Sync on PC
2024-03-01 09:02:56 [88] 'sync' from 'Public/maxwai' using 'task 2.6.2' at <IP>:55632
2024-03-01 09:02:56 [88] Client key '729a20f7-af59-4d05-9e0a-d5462b932db9' + 0 txns
2024-03-01 09:02:56 [88] Loaded 1227 records
2024-03-01 09:02:56 [88] Branch point: 729a20f7-af59-4d05-9e0a-d5462b932db9 --> 1224
2024-03-01 09:02:56 [88] Subset 1 tasks
2024-03-01 09:02:56 [88] Stored 0 tasks, merged 0 tasks
2024-03-01 09:02:56 [88] Sync key '84a2fb54-6e30-459d-b4db-0199f3c986fa' still valid
2024-03-01 09:02:56 [88] Serviced in 0.016078s
-- Sync on PC after marking task as done
2024-03-01 09:03:56 [90] 'sync' from 'Public/maxwai' using 'task 2.6.2' at <IP>:8664
2024-03-01 09:03:56 [90] Client key '84a2fb54-6e30-459d-b4db-0199f3c986fa' + 1 txns
2024-03-01 09:03:56 [90] Loaded 1227 records
2024-03-01 09:03:56 [90] Branch point: 84a2fb54-6e30-459d-b4db-0199f3c986fa --> 1226
2024-03-01 09:03:56 [90] Subset 0 tasks
2024-03-01 09:03:56 [90] Stored 1 tasks, merged 0 tasks
2024-03-01 09:03:56 [90] New sync key 'bfcff049-bf0a-457a-8ec0-62be1c6e0c77'
2024-03-01 09:03:56 [90] Wrote 2
2024-03-01 09:03:56 [90] Serviced in 0.046258s
-- Sync on phone
2024-03-01 09:04:22 [91] 'sync' from 'Public/maxwai' using 'com.ccextractor.taskwarriorflutter 1.0.0' at <IP>:39090
2024-03-01 09:04:22 [91] Client key '' + 1 txns
2024-03-01 09:04:22 [91] Loaded 1229 records
2024-03-01 09:04:22 [91] Subset 911 tasks
2024-03-01 09:04:22 [91] ERROR: Could not find common ancestor for 7b3a6500-12eb-1ee8-87e5-9bb1641be6cb
2024-03-01 09:04:22 [91] Serviced in 0.139014s

How can we contact you (optional)

No response

Would you like to work on this issue?

No

By submitting this issue, I have confirmed that:

Pavel401 commented 4 months ago

Would any of you, @JangamRuthvik, @its-me-abhishek, or @vkprogrammer-001, be willing to investigate this issue?

JangamRuthvik commented 4 months ago

@Pavel401 noted will get back to you. I may take more time because from this Monday I have my mid semester exams but if issues still persist I will definitely contribute

vkprogrammer-001 commented 4 months ago

@Pavel401, I will work on resolving the issue. If I find a solution, I’ll notify you promptly.

its-me-abhishek commented 4 months ago

Sure, I'll try to find a fix for this

Pavel401 commented 4 months ago

Any update on this?

JangamRuthvik commented 4 months ago

@Pavel401 I will start working on this

Pavel401 commented 4 months ago

@JangamRuthvik and I attempted to reproduce the issue but it worked fine and didn't have any issues. Therefore, we are closing this for now.