pimutils / pimutils/vdirsyncer
Can't sync caldav even though local repository is empty
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 185
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 1
Description
I try to sync a calendar from a nextcloud server to my machine. The remote storage contains events synchronized by another computer while the local storage is empty (first sync).
vdirsyncer fails to sync because the local storage is empty according to the error message (its normal to be empty before being synchronized IMO).
Things to include in your bugreport:
- Your vdirsyncer version 0.17.0a3
- If applicable, which server software (and which version) you're using: Nextcloud 13 hosted by zaclys.com
- Your Python version: Nextcloud 13
- Your operating system: nixos
- Your config file:
[general]
# A folder where vdirsyncer can store some metadata about each pair.
status_path = "$XDG_CACHE_HOME/vdirsyncer/status/"
# not accepted yet
# status_path.fetch = ["command", "sh", "-c", "$XDG_CACHE_HOME/vdirsyncer/status/"]
[pair zaclys_caldav] # {{{
a = "zaclys_local_caldav"
b = "zaclys_remote_caldav"
collections = ["from a", "from b"]
[storage zaclys_local_caldav]
type = "filesystem"
path.fetch = ["command", "sh", "-c", "echo $XDG_DATA_HOME/calendars/zaclys"]
fileext = ".ics"
[storage zaclys_remote_caldav]
auth = "basic"
type = "caldav"
url = "https://ncloud.zaclys.com/remote.php/dav/calendars/LOGIN/personal/"
username = "LOGIN"
password.fetch = ["command", "~/dotfiles/bin/pass-show", "zaclys"]
# }}}
- Use
vdirsyncer -vdebugfor debug output. The output is sensitive, but
please attach at least the last few lines before the error (if applicable),
censored as necessary. This is almost always the most useful information.
debug: Using 1 maximal workers.
debug: Fetching value for path.fetch with command strategy.
critical: Please run `vdirsyncer discover japon_ferie` before synchronization.
debug: Fetching value for path.fetch with command strategy.
debug: Fetching value for password.fetch with command strategy.
Syncing zaclys_caldav/personal
error: zaclys_caldav/personal: Storage "zaclys_local_caldav/personal" was completely emptied. If you want to delete ALL entries on BOTH sides, then use `vdirsyncer sync --force-delete zaclys_caldav/personal`. Otherwise delete the files for zaclys_caldav/personal in your status directory.
The status directory $XDG_CACHE_HOME/vdirsyncer/status is empty. And I have removed $XDG_DATA_HOME/calendars/zaclys several times to no avail.
The last advice in the error: vdirsyncer sync --force-delete zaclys_caldav/personal, I don't want to run it since I want to keep the events on the server.
NB: Maybe -vdebug could print vdirsyncer version/python version
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported first-sync case with an empty local filesystem storage and a populated remote CalDAV storage, using vdirsyncer -vdebug and the shown vdirsyncer sync command. Trace why the empty local side is treated as a complete deletion; done means the initial sync preserves remote events without requiring --force-delete, while still protecting against unintended deletion of an established collection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100