Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When syncing with Google Calendar, if the GCal side is empty, vdirsyncer errors with "Storage was completely emptied" (on local side) #1099

Open
presto8 opened this issue Dec 5, 2023 · 0 comments

Comments

@presto8
Copy link

presto8 commented Dec 5, 2023

I have a Google Calendar account with a sub calendar that tracks an .ICS file from a third-party provider. After events are complete, this provider deletes the .ICS entries, which results in Google Calendar removing all entries on the sub calendar. It seems vdirsyncer interprets an empty directory on the local side as being a possible error condition (which it would be normally), except that the remote side is also completely empty.

I run vdirsyncer as a systemd timer and this issue causes a non-zero return code, which then is flagged as a failed unit in systemd.

Things to include in your bugreport:

  • Your vdirsyncer version
    0.19.2

  • If applicable, which server software (and which version) you're using
    Google Calendar

  • Your Python version
    3.11

  • Your operating system
    nixos

  • Your config file

[general]
status_path = "~/.calendars/status/"

[pair gcal_sync]
a = "gcal"
b = "gcallocal"
collections = ["from a", "from b"]
conflict_resolution = "a wins"
metadata = ["color"]

[storage gcal]
type = "google_calendar"
token_file = "~/.calendars/gcal_token_file"

[storage gcallocal]
type = "filesystem"
path = "~/.calendars/gcal"
fileext = ".ics"

# secrets redacted

  • Debug output

$ vdirsyncer -v DEBUG sync

debug: Sending request...
Syncing gcal_sync/xxxxxxxxxxxxxx@import.calendar.google.com
debug: ====================
debug: PROPFIND https://apidata.googleusercontent.com/caldav/v2/xxxxxxxxxxxxxx%40import.calendar.google.com/events/
debug: {'User-Agent': 'xxxxxxxx.apps.googleusercontent.com', 'Content-Type': 'application/xml; charset=UTF-8', 'Depth': '1'}
debug: b'<?xml version="1.0" encoding="utf-8" ?>\n            <propfind xmlns="DAV:">\n                <prop>\n                    <resourcetype/>\n                    <getcontenttype/>\n                    <getetag/>\n                </prop>\n            </propfind>\n            '
debug: Sending request...
debug: 207
debug: <CIMultiDictProxy('Pragma': 'no-cache', 'Expires': 'Mon, 01 Jan 1990 00:00:00 GMT', 'Date': 'Tue, 05 Dec 2023 17:59:27 GMT', 'Content-Type': 'text/xml; charset=UTF-8', 'Cache-Control': 'no-cache, no-store, max-age=0, must-revalidate', 'Vary': 'Origin', 'Vary': 'X-Origin', 'Vary': 'Referer', 'Content-Encoding': 'gzip', 'Server': 'ESF', 'X-XSS-Protection': '0', 'X-Frame-Options': 'SAMEORIGIN', 'X-Content-Type-Options': 'nosniff', 'Alt-Svc': 'h3=":443"; ma=2592000,h3-29=":443"; ma=2592000', 'Transfer-Encoding': 'chunked')>
debug: <StreamReader 858 bytes eof>
debug: Already normalized: '/caldav/v2/xxxxxxxxxxxxxx@import.calendar.google.com/events/'
debug: Skipping '/caldav/v2/xxxxxxxxxxxxxx@import.calendar.google.com/events/', is collection.
error: gcal_sync/xxxxxxxxxxxxxx@import.calendar.google.com: Storage "gcal/xxxxxxxxxxxxxx@import.calendar.google.com" was completely emptied. If you want to delete ALL entries on BOTH sides, then use `vdirsyncer sync --force-delete gcal_sync/xxxxxxxxxxxxxx@import.calendar.google.com`. Otherwise delete the files for gcal_sync/xxxxxxxxxxxxxx@import.calendar.google.com in your status directory.
@presto8 presto8 changed the title When syncing with Google Calendar, if the GCal side is empty, vdirsyncer errors with "Sorage was completely emptied" (on local side) When syncing with Google Calendar, if the GCal side is empty, vdirsyncer errors with "Storage was completely emptied" (on local side) Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant