vdirsyncer icon indicating copy to clipboard operation
vdirsyncer copied to clipboard

vdirsyncer puts two PRODIDs in a singlefile and then pushes them back to server

Open Hawk777 opened this issue 6 years ago • 7 comments

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 PRODIDs. I then have to edit the singlefile and delete one of the PRODIDs (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.

Hawk777 avatar Aug 26 '18 03:08 Hawk777

To clarify, your ICS looks like this?

BEGIN:VCALENDAR
PRODID:value1
PRODID:value2
...
BEGIN:VEVENT
...
END:VEVENT
END:VCALENDAR

untitaker avatar Aug 27 '18 18:08 untitaker

Yes, that is what vdirsyncer makes the singlefile ICS look like.

Hawk777 avatar Aug 28 '18 04:08 Hawk777

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

vbwagner avatar Dec 24 '19 17:12 vbwagner

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
...

anufrievroman avatar Feb 28 '23 23:02 anufrievroman

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.

WhyNotHugo avatar Mar 01 '23 15:03 WhyNotHugo

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...

anufrievroman avatar Mar 02 '23 01:03 anufrievroman

It's very likely that the multiple PRODID lines have been synced up to Nextcloud.

WhyNotHugo avatar Mar 03 '23 11:03 WhyNotHugo