-
Couldn't load subscription status.
- Fork 9
Running Taskserver locally
There are some helper methods so that you can connect a locally running app to a locally running Taskserver.
More straightforward on Linux and macOS where taskd can run on host, the steps will be a little more complicated on Windows.
Where I mention iOS and Android, I assume you are using an emulator running on host, i.e., Linux, macOS or Windows.
- Dart & Flutter
- make
- taskd
- task/taskwarrior
Open a terminal and navigate to your clone of taskw-dart.
cd fixture
make install # Installs an executable from ../taskc named taskd-setup
make setup # Configures taskd with TASKDDATA=./var/taskd and adds .taskrc and .task/*.pem files to ../task/assets
make # Starts taskd process with verbose output to terminalThen, open a second terminal and navigate again to your clone of taskw-dart.
cd task
flutter run -d macos # or linux or ios
In the app, select an appropriate profile, or create a new one, and
navigate to Taskserver Configuration screen. Then click the debug
button. The debug button conveniently adds the files from
../task/assets mentioned above, but if you ran make setup after
the app was already running, you'll instead have to use the usual file
picking methods to select from /path/to/taskw-dart/task/assets.
Now you should be able to connect to the locally running taskd process with the statistics or synchronize buttons.
On macOS and iOS, I am aware of an issue that the pki generated server.cert can't be verified with the app's taskd.ca implicitly using the system APIs. You'll have to indicate to trust the server.cert to continue.
Where I previously mention the first and second terminal above, in this case, the first terminal may use WSL, and the second terminal may use PowerShell.
I have had recent success using WSL 2 and Debian. I chose Debian as it's a relatively familiar distribution, and it is currently easy to install taskd on.
I did have issues when the Debian terminal used the dart from the
C: drive, so I recommend you follow the Dart documentation on
installing to Linux, and ensure that readlink -f $(which dart)
resolves to an address that does not start with /mnt/c/.
If you are connecting to the locally running taskd process from
Android, there is a modification that needs to be made. Instead of
make setup and make, you'll run make setup-android and make android.
If you are wondering what changes, essentially, whereas usually it
works fine for taskd to bind to localhost, and the app to connect
using the same address localhost, with Android, taskd has to bind to
127.0.0.1 and the app needs to connect with address 10.0.2.2.