GothenburgBitFactory / GothenburgBitFactory/taskwarrior

Syncing Taskwarrior with GCS to start a new replica does not work

Open
#4,123 5 comments 0 reactions 1 assignee Claimed by @djmitche View on GitHub
topic:sync type:bug
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

### Discussed in https://github.com/GothenburgBitFactory/taskwarrior/discussions/4122

Originally posted by **manoelpqueiroz** June 6, 2026
Hi guys, I'm trying to understand why I am unable to use `task sync` to initiate tracking on a new replica of my tasks. Taskwarrior returns a code 0 with a success message, but nothing is imported. 🤷🏻‍♂️

My `task show verbose` output is as follows:

```
affected,blank,context,edit,header,footnote,label,new-id,news,project,special,sync,override,recur
```

Given that, despite verbosity for sync being set, nothing really meaningful has been shown, I'll go through what exactly happened and I would greatly appreciate if anyone could provide some light on what might be causing this misbehaviour. 🙏🏻

## Context

I have a Google Cloud Storage bucket set up to synchronise my tasks. It was working flawlessly across two separate machines, so both machines had correctly set up their `gcloud` authentication.

At some point, I wanted to change the encryption secret to a different passphrase, and here's what I did on the main machine I use with Taskwarrior:

1. I have deleted all the files present in the GCS bucket;
2. Changed the `sync.encryption_secret` configuration to the desired passphrase;
3. Ran `task sync`.

If I check the files in my bucket, I can confirm that the following are present:

- `salt`, created when I ran `task sync`;
- `latest` (currently sitting at 32 B), with its "Last Modified" pointing to the last sync command I ran on the main machine;
- Several `v-hash` files of varying sizes, each one matching a `task sync` command run where changes had been enacted.

## The Issue

On the additional machine, the following has been done:

1. Changed the `sync.encryption_secret` configuration to match the new passphrase;
2. Removed the `.task` directory to clean the entire task list.

I have tried to run both `task sync` and `task sync init`, and **both** commands output the message:

```
Syncing with GCP bucket mpq-tasks
Success!
```

However, despite this, not a single task is imported after the operation, and the task list is empty.

I am unfortunately clueless as to why there is a sucess message, but no replication of the tasks.

## Main Suspicion

My suspicion, despite being unable to confirm it myself, is that the sync operations run from the main machine in the **Context** section do not actually send all the tasks to the GCS bucket. From my understanding, the `v-hash` files refer only to diffs between one sync and another.

For instance, I do remember that after running step 3 to sync the tasks after resetting the bucket, only the `salt` file had been created with a 16-byte size. Given that I have more than 1,000 tasks in my list, I can at least infer this `salt` file does not store any task data.

I hope this information is sufficient for you guys to help me with this issue, I have tried to be as thorough in my description as possible. 🙇🏻‍♂️ If you need any additional information to be able to understand the situation, please let me know and I appreciate beforehand any help! 😉

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.