-
Notifications
You must be signed in to change notification settings - Fork 164
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
Validation error in iCalendar: A calendar object on a CalDAV server MUST NOT have a METHOD property. #502
Comments
SabreDAV is extremely strict with regards to those methods, @evert can you help us out here? There's a iCalendar exposed by DavMail that contains |
Hi @untitaker , It is fixable, BUT: I think it's better if vdirsyncer tries to ensure to it only sends valid data to a server. It is wrong to set the If you don't see a way to fix this client-side, another option might be to report the error to DavMail. I'm very much a proponent of trying to fix bugs where they originate, instead of trying to create workaround for other people's mistakes ;) If you don't see a way to fix this easily in vdirsyncer, and DavMail is not fixing or acknowledging this bug, we can add a 'fixer' on the sabre/vobject side. Some more details about this topic here: http://sabre.io/blog/2016/validation-changes/ Basically, by default sabre/dav runs in a mode where it will try to automatically fix broken data. We don't have fixers for everything, such as this, but adding one would be fairly easy. After a fixer is added, sabre/dav will automatically repair the file before storing it, and not send back an etag. |
I've tried that once and they didn't respond at all: https://sourceforge.net/p/davmail/bugs/598/ A fixer sounds good. Maybe I should add something like that to vdirsyncer as well. |
yea i really think that, even if we can do something on our side, the correct thing for you to do would actually be to reject invalid iCalendar or also fix it yourself. Being strict is good for everyone. I'm asked to create a workaround because you're not strict because davmail is not strict ;) |
Of course I could also not be strict, but then the next client who comes along might be strict and break based on what the server sends it :P |
OK, I understand your point of view and advocate being strict to. Would it be possible for vdirsyncer to ignore such a wrong property or treat that issue as a warning instead of an error and to continue the syncronisation process with the other calendar entries? I also would like to report that issue to davmail but unfortunatelly I don't know how to point out the problem correcly. |
Here's something that I'd like you to try: if you sync DavMail to filesystem Based on that we could add it to the On Wed, Sep 21, 2016 at 01:25:03PM -0700, flart wrote:
|
I tried this for one element and after deleting the METHOD property on the local file storage vdirsyncer reported |
Does the event appear broken or not at all in other Exchange clients (web interface, no idea what's out there) On 22 September 2016 22:38:42 CEST, flart [email protected] wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
That modified event is still ok in OWA and Outlook. A little bit too ok perhaps. |
If you delete the When I grep the sourcecode of DavMail, it appears that this property may have been added by Exchange, but DavMail has extra code to insert that property if it is missing: https://sourceforge.net/p/davmail/code/HEAD/tree/trunk/src/java/davmail/exchange/VCalendar.java#l155 I seriously wonder what is going on here. Is this code there to adapt to the requirements imposed by Exchange? Anyway I've filed https://sourceforge.net/p/davmail/bugs/628/. |
By now I am starting doubt that adding a fixer in vdirsyncer would actually solve the problem since it's likely that this upload failure will pop up in other setups that don't involve vdirsyncer. I'd much rather see a fixer in SabreDAV (or sabre-vobject) for this, assuming DavMail won't fix this bug. That doesn't mean I want specifically you to do the work @evert, I totally understand why you don't want a bug filed against SabreDAV. |
@flart For now the best workaround I can offer you is, instead of syncing
|
For the I would say the process is:
I'm fine with having this feature if an attempt has been made to also file it at DavMail. And I can't make any guarantees in the future if we want to do something else with |
I did file it at davmail, see above :) On 24 September 2016 23:22:09 CEST, Evert Pot [email protected] wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
I tried the workaround you suggested above. This solves the problem with the METHOD-property. I used a However vdirsyncer now raises another error saying:
If I open that file it's obvisiously a caldav-file but for what reason ever it got the file extension *.eml
Of course this is also a problem concerning davmail. However I'm not sure if vdirsyncer should handle this as an error and stop the whole sync process or wether it should raise an warning an continue the sync process for the other elements. On the other hand I should find another way to access the exchange server since davmail seems to be a little bit unreliable. Anyway thanks for your support. |
Well, the spec actually does not say anything about file extensions. They could be anything, and even if it's .eml on the server, it's weird but not invalid. sabre/dav also accepts any extension (or none at all). |
In " supported servers" of the vdirsyncer docs there's a Windows-only tool linked that is supposed to repair your Exchange calendar. You may want to try that. |
Also the EML file extensions are normal for DavMail and standards conform. Vdirsyncer is not relying on that. |
I just tried the CalCheck-Tool and it reported and rapaired one duplicate item. |
So the problem still remains and I made another attempt tonight. Therfore I created a new Exchange calendar and copied a bunch of appointments to it. After I removed the METHOD-property from all the *.ics files I started another sync process which also completed without any errors and uploaded all items to the server over the Davmail gateway.
So I'm not sure wether it is an good idea to remove the METHOD-property from the filesystem items. |
I think I may have found an error in your initial config, could you paste the current config again? |
Here you are:
Thanks a lot for your patience. |
Okay that looks fine. Please send me an email with the (lightly censored) output of |
I’m sorry, but there seems to be something completely wrong with my setup. Strange enough the calcheck tool doesn’t find anything. |
@flart This appears to be fixed in DavMail trunk: https://sourceforge.net/p/davmail/bugs/628/ Here are the instructions how to build from trunk: http://davmail.sourceforge.net/build.html Would be nice if you could verify this works. I haven't been lucky with any version of DavMail because I no longer have the credentials to the only Exchange server that I could get to run with DavMail. |
I managed to built the DavMail trunk and it seems to work. In the meantime I wrote a small script to get rid of that METHOD-properties.
|
Moreover I recognized some difficulties caused by recurring events, e.g. birthdays. But I need to figure out more clearly what's the problem. It seems to work if the recurring event is created in outlook and than synced but not when the event comes from sabredav. |
Okay, for now I'll close this since the original issue is solved. |
This now became an issue for me. Moodle now uses |
I also face this issue now using vdirsyncer 0.18.0 with most Microsoft Teams invitations which are being synchronized from one CalDAV calendar (SoGO) to another (Nextcloud). "Validation error in iCalendar: A calendar object on a CalDAV server MUST NOT have a METHOD property." - any idea to fix this once and forever without this workaround if possible? This way, the entry is just missing in the target calendar. It would be great if it at least appears and then adds a note that something was not synced to it. (Sure this note would have to be removed on synching back to keep data integrity) |
@mkrecek234 Including the
I suspect that SoGo is serving the invalid item, but Nextcloud is rejecting it. You can sync to a local filesystem, remove all the |
We have the same problem, sync from Kopano to NextCloud, but is it not fixed in version 0.16? |
please file a new issue. this issue was closed 8 years ago. |
Hello everyone,
I used vdirsyncer for a while now but unfortunatelly I recognized differences between the two calenders vdirsyncer shoud syncronize in the past few days. So I started the syncronization manually with -vdebug option and stumbled upon the above mentioned error.
When I tried to delete the errorness calender item, the error is caused by another calender item.
Furthermore I tried to sync both calender server against the filesystem. In this case the sync process runs without any errors.
I don't know if the
METHOD:PUBLISH
key in the item vdirsyncer tries to store on the SabreDAV server comes from the davmail server or the exchange server behind davmail but why it doesn't matter when syncing to filesystem?Thanks in advance for any ideas how to solve this problem.
Yours sincerely
flart
vdirsyncer -vdebug
for debug output.The text was updated successfully, but these errors were encountered: