vdirsyncer
vdirsyncer copied to clipboard
vdirsyncer puts two PRODIDs in a singlefile and then pushes them back to server
I am running vdirsyncer 0.16.7 on Python 3.6.5 on Gentoo with a Radicale 2.1.10 server. On my server, there are a number of calendar events in a single calendar, created with a number of different pieces of software; hence, across the events, there are a few different PRODID
values. When vdirsyncer synchronizes a pair one side of which is the server via caldav
and the other side of which is a singlefile
collection, if a new event has been added on the server, when vdirsyncer fetches the event and adds it to the singlefile
, if the PRODID
is different to the one present in the file, it adds it. This results in a single .ics
file with two PRODID
rows, which vdirsyncer then tries to push back to the server in every event; the server, in turn, rejects all the events because they have two PRODID
s. I then have to edit the singlefile
and delete one of the PRODID
s (it doesn’t seem to matter which), after which vdirsyncer no longer tries to push all the events. Even if the PRODID
in the singlefile
is different than the PRODID
on the server for a particular event, vdirsyncer doesn’t seem to try to replace it (which is good, since it’s obviously wrong for most of the events no matter what value it’s set to); it’s only if a second one appears in the file that vdirsyncer tries to push all the events up to the server.
I actually don’t even want vdirsyncer to push changes from the singlefile
to the server ever, but, well, GH-453 isn’t done yet, so I don’t quite have that option (except for the hacky way). But some people probably do want this, so this bug would affect them.
To clarify, your ICS looks like this?
BEGIN:VCALENDAR
PRODID:value1
PRODID:value2
...
BEGIN:VEVENT
...
END:VEVENT
END:VCALENDAR
Yes, that is what vdirsyncer makes the singlefile
ICS look like.
I've been hit with this bug too. But in my case I want changes in the singlefile storage to be propagated to server.
My version of vdirsynccer is 0.16.7 radicake 2,1,11, python 3.7.3, Debian 10 on both client and server
By the way, I have the same problem with nextcloud server, both using singlefile
option and with filesystem
. Maybe it's just my server, but when I export directly from nextcloud through GUI, there is only one line.
My ics looks like:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//IDN nextcloud.com//Calendar app 3.3.1//EN
PRODID:-//IDN nextcloud.com//Calendar app 3.0.3//EN
PRODID:-//IDN nextcloud.com//Calendar app 4.2.3//EN
PRODID:-//Sabre//Sabre VObject 4.4.2//EN
...
I think I know what the issue is. When syncing to singlefile
, vdirsyncer will copy many individual files into a single one. Each one of the individual files has a PRODID
, and I suspect all of them end up getting copied to the singlefile.
At least that's my theory so far. It would be useful to have a unit test that does this and confirm that this is the cause.
I though so too, so I tried to use filesystem
option, but then the same lines are in each file. So maybe it's somehow my Nextcloud server, but then I'd imagine many people have this issue...
It's very likely that the multiple PRODID
lines have been synced up to Nextcloud.