taskwarrior-flutter icon indicating copy to clipboard operation
taskwarrior-flutter copied to clipboard

Sync to a task-champion-server is broken in the nightly

Open Akendo opened this issue 8 months ago • 16 comments

Describe your issue

I've tried to use the nightly that I built myself with flutter to connect to my task warrior server. However, it appears that the connection remains stalled and nothing happened. I couldn't see any error message on the server. I didn't have the opportunity to debug this with adb yet, might provide you with some more details on this.

Likewise, I might, add that I run the server locally on a VM with no HTTPS enabled. Likewise, I am not sure if this would be an issue.

Steps to reproduce

  1. Build the app with Flutter.
  2. Install it on Android freshly
  3. Change the Sync to be on Task v3
  4. Add the task server configuration.
  5. sync

What was the expected result?

To see all my task's I have in my current task warrior.

Put here any screenshots or videos (optional)

No response

How can we contact you (optional)

No response

Would you like to work on this issue?

None

By submitting this issue, I have confirmed that:

  • [x] I have starred the repo ⭐ and watched 👀 it on GitHub and followed the contribution guidelines.

Akendo avatar Mar 22 '25 09:03 Akendo

if You've enabled the Taskchampion Sync setting then it requires date while adding task otherwise it does not work. And also by Server do you mean CCSync ?

SGI-CAPP-AT2 avatar Mar 22 '25 09:03 SGI-CAPP-AT2

In case if you have been using the original taskchampion-sync-server as the URL, please do check out CCSync and setup it on the VM instead, as the App requires its API backend in order to interact with the server. You may update the syncserver service of the Docker-compose.yml of CCSync before running to point to your original taskchampion-sync-server in case you already have one running. CCsync Docs on How to setup CCSync Setup Video for walkthrough

its-me-abhishek avatar Mar 22 '25 10:03 its-me-abhishek

So from what I read out of your backend, I need to have Google cloud running to make use of the CCSync so I can run it locally?

Akendo avatar Mar 22 '25 15:03 Akendo

Are you referring to this part? -

Image

its-me-abhishek avatar Mar 22 '25 15:03 its-me-abhishek

Yes. Also, how the document is phrased seems like this.

Akendo avatar Mar 22 '25 16:03 Akendo

I will try to re-phrase it, also there's no need to run Google Cloud for that as credentials would just be generated only once and work until deleted. You might use any VM to run the project.

On a side note, this Google Creds part along with the frontend setup is also optional in case you already have some credentials set-up on your taskchampion instance.. as the cloud credentials are essentially being used to create a hashed version of your credentials like email etc to make the keys for setting up the taskchampion-instance.

You might just run the backend (along with its env vars, except the client secret and ID ones) + the taskchampion-instance on a VM and try using the app with the same taskchampion-credentials as your other clients

its-me-abhishek avatar Mar 22 '25 16:03 its-me-abhishek

Thanks a lot. I set up the ccsync on my system and tried to set the flutter app to sync with this. However, the problem here is that the app does not perform any connection at all. I can see now, that the app might try to do some fetching, but on the server side I do not get any responses. I checked with a tcpdump and I didn't got any package. It feels like that something is wrong.

While the server was the wrong one, the problem remains the same. No connection is happening.

Akendo avatar Mar 22 '25 21:03 Akendo

is it an issue with the app or the CCsync, so that i can debug it somehow. also, are u able to make any type of requests to ccsync at http://<your_VM_IP_address>:8000/

its-me-abhishek avatar Mar 23 '25 07:03 its-me-abhishek

is it an issue with the app or the CCsync, so that i can debug it somehow. also, are u able to make any type of requests to ccsync at http://<your_VM_IP_address>:8000/

As of now, it's the app in my understanding. I'm unable to connect to my server. I also changed the port from the CCsync to 8001, but that didn't seem to change anything. Furthermore, I can access the server simply by using curl.

Akendo avatar Mar 23 '25 08:03 Akendo

I also observed, that when I use an APK from GitHub like this one I do not have the option to set a URL to sync. Why is that? Does this only show when I have built the app myself?

Akendo avatar Mar 23 '25 08:03 Akendo

I guess, I might have to enable tcpdump on my phone. Can't tell what's going wrong here.

Akendo avatar Mar 23 '25 08:03 Akendo

i think yes, not aware much about the Taskwarrior App dev. You may try building the app yourself using release mode Do this and then in settings of the app, turn on taskchampion, then restart the app. then in the left side panel an option to add CCSync credentials Reference: https://github.com/CCExtractor/taskwarrior-flutter/pull/429

its-me-abhishek avatar Mar 23 '25 12:03 its-me-abhishek

Or try using termux to ping the taskchampion sync server / the backend

its-me-abhishek avatar Mar 23 '25 12:03 its-me-abhishek

I 'fixed' it by setting the baseURl in the necessary code to my server hardcoded. Seems like that the change to receive the necessary variable isn't working.

Akendo avatar Mar 23 '25 22:03 Akendo

I also observed, that when I use an APK from GitHub like this one I do not have the option to set a URL to sync. Why is that? Does this only show when I have built the app myself?

So this issue might be related to taskchampion setting not being persistent for next application opening because of a typo. opened a PR which may fix this issue #457.

SGI-CAPP-AT2 avatar Mar 24 '25 02:03 SGI-CAPP-AT2

So this issue might be related to taskchampion setting not being persistent for next application opening because of a typo. opened a PR which may fix this issue https://github.com/CCExtractor/taskwarrior-flutter/pull/457.

makes sense, the getters and setters were different (now fixed in that PR)

its-me-abhishek avatar Mar 24 '25 03:03 its-me-abhishek