sabre-io / Baikal

Baïkal is a Calendar+Contacts server
https://sabre.io/baikal/
GNU General Public License v3.0
2.44k stars 282 forks source link

Baikal only working 1 way - Testing with hcaldavsynchronizer and cal.com (Self hosted) #1201

Open icsy7867 opened 11 months ago

icsy7867 commented 11 months ago

Baikal version: 0.9.3

Expected behaviour: CalDav returns current calendar events Current behaviour: Null/Empty response returned Steps to reproduce: Setup baikal as a caldav source for cal.com Notice booking timeslots are still available.

I am having the same issue here. cal.com events sync to the webdav calendar, but cal.com cannot see any data from baikal. https://github.com/calcom/cal.com/issues/8684

I am not sure the technical details, but according to this issue, cal.com saying it's not an issue on there end. Maybe someone smarter than me can make some more sense of things.

vdbhb59 commented 9 months ago

https://github.com/calcom/cal.com/issues/8684#issuecomment-1589625611 As per the debugging done there it seems when the system receives undefined data & headers, it is throwing the error and hence your data is blank. Developers need to check and allow for undefined data as well.

nepomuc commented 9 months ago

@vdbhb59 Just set up a baikal server and cal.com and also experiencing this issue. Cal.com expects from baikal's response to see either empty (if it doesn't have any shareable event) or the event ICS in there, but instead it is undefined, meaning the baikal server doesn't respond as expected for cal.com's fetch call. This is how cal.com explains the situation and it kind of makes sense, doesn't it? The result is that cal.com can't use baikal which is very sad :( Also other CalDAV servers I've tested so far respond as expected. So could you maybe change this behaviour on baikal's side to meet the apparent standard? Would be very happy about this, so i could make my setup with baikal work.

nepomuc commented 9 months ago

It also doesn't work when the baikal calendar already contains data. So maybe "data" never contains data in it's response? (https://github.com/calcom/cal.com/issues/8684#issuecomment-1589625611) I tried to understand what and where baikal creates it's response in the code, but I couldn't find it yet.

vdbhb59 commented 8 months ago

Somehow, I too cannot locate the object code. I can see the calendar is searching for object in database which is correct. https://github.com/sabre-io/Baikal/blob/3ca9b4fc53350b82f595213068a5c02c73e3bd04/Core/Frameworks/Baikal/Model/Calendar/Event.php#L31 I found a way back commit, which may or may not be the cause of this. https://github.com/sabre-io/Baikal/commit/5e2fee71b81a9d740af2ad64dd969e2efc6e2ea1

One SOF post has something similar, probably. Post

nepomuc commented 8 months ago

@vdbhb59 Thanks for your response. It would be so helpful to get support by one of the recent contributors like @Rotzbua . Since the SOF post refers to the response "unkown" but Baikal actually responds undefined it might be a different case?