Skip to content

500 Client sync key not found

Brady Trainor edited this page Mar 1, 2022 · 3 revisions

User encountered the following error displayed in app.

TaskserverResponseException

response.header = {
  "client": "taskd 1.1.0",
  "code": "500",
  "status": "Client sync key not found."
}

#0      TaskdClient.request (package:taskc/src/home/impl/taskd_client.dart:111:7) <asynchronous suspension>
#1      Home.synchronize (package:taskc/src/home/home.dart:41:20) <asynchronous suspension>
#2      _StorageWidgetState.synchronize (package:task/src/widgets/storage_widget.dart:290:20) <asynchronous suspension>

It looks like Taskserver could not find the sync key in the file $TASKDDATA/orgs/$org/users/$key/tx.data.

The sync key is different from your PEM file key, or your taskd.credentials key ($org/$user/$key).

This can happen if a profile has previously synchronized with server, and tx.data is deleted, or server account is changed.

At this time, here is the best advice I have.

  1. Select the old profile
  2. Export tasks to device
    • Manage selected profile > Export tasks
  3. Consider renaming the old profile to remind yourself of the 500 error
  4. Copy Taskserver configuration to new profile
    • Manage selected profile > Copy config to new profile
  5. Select the new profile
  6. Synchronize the new profile
    • The new profile should be functioning
    • It should reflect the state of your task list as it exists on the server
    • It is missing at least any recent updates from the old profile that were not successfully received at the Taskserver
  7. Recover recent updates from the old profile
    • If you are not near a desktop computer:
      • Sort the old profile by modified date, and do your best to address changes that you feel are urgently needed back at the new profile
        • Sorting by modified date will be in next release, v0.2.6
    • Once you are at a desktop computer, consider something like the following
mkdir /tmp/task-updates-recovery
cd /tmp/task-updates-recovery
HOME=$(pwd)
task import /path/to/exported-tasks.json
task export all rc.report.all.sort:modified

Review the full task data sorted by modified date, and decide how to update your task list.

The above seems like the safest advice to me. There seem to be other approaches suggested on some issue threads at Taskwarrior and related projects, for example they may effectively resend the entire list to the Taskserver. But I am not sure that is fully supported by Taskserver, and may lead to bugs.

If anyone has ideas on how to improve the experience here, with some assurety of integrity over all edge cases, please consider contributing to a new or existing issue thread.

Clone this wiki locally