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

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

Open
Hawk777 opened this issue Aug 26, 2018 · 7 comments

Comments

@Hawk777
Copy link

Hawk777 commented Aug 26, 2018

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.

@untitaker
Copy link
Member

To clarify, your ICS looks like this?

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

@Hawk777
Copy link
Author

Hawk777 commented Aug 28, 2018

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

@vbwagner
Copy link

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

@anufrievroman
Copy link

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

@WhyNotHugo
Copy link
Member

WhyNotHugo commented Mar 1, 2023

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.

@anufrievroman
Copy link

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

@WhyNotHugo
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants