tsdav icon indicating copy to clipboard operation
tsdav copied to clipboard

fetchCalendarObjects skipping events created on the Calendar directly

Open alishaz-polymath opened this issue 2 years ago • 13 comments

Hey, I am using fetchCalendarObjects to fetch the calendar objects from the connected Kerio CalDAV calendar, and here's the issue I'm facing.

I'm using cal.com connector and when I create an event using Cal.com, that event is pulled just fine with the fetchCalendarObjects call. However, any events created directly on the Calendar are not pulled, but skipped entirely for some reason.

BEGIN:VCALENDAR
PRODID:-//Kerio Technologies//Kerio Connect//EN
METHOD: PUBLISH
VERSION:2.0
X-WR-CALNAME:Test's calendar - Calendar
BEGIN:VTIMEZONE
TZID:Europe/Berlin
BEGIN:STANDARD
DTSTART:19961027T030000
TZOFFSETTO:+0100
TZOFFSETFROM:+0200
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19810329T020000
TZOFFSETTO:+0200
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20220808T203150Z
UID:4f220266-5620-4195-acea-084a90b0838f
DTSTART;TZID=Europe/Berlin:20220809T123000
SUMMARY:Block
DTEND;TZID=Europe/Berlin:20220809T210000
X-LABEL:0
PRIORITY:5
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20220808T203159Z
UID:0db4c643-2924-4848-9450-dbb4cdc48367
DTSTART;TZID=Europe/Berlin:20220810T120000
SUMMARY:FREI 
DTEND;TZID=Europe/Berlin:20220810T170000
X-LABEL:0
PRIORITY:5
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20220817T080733Z
UID:fbfb97cd-96f1-4456-a06b-202806897b82
DTSTART;TZID=Europe/Berlin:20220818T100000
SUMMARY:New Test Event
DTEND;TZID=Europe/Berlin:20220818T130000
X-LABEL:0
PRIORITY:5
END:VEVENT
BEGIN:VEVENT
UID:06436a27-4991-4c1e-ae44-d86af6a8818f
SUMMARY:30min between Pro Example and Test
DTSTAMP:20220817T060100Z
DTSTART:20220818T093000Z
DESCRIPTION:What:\n30min\n  \n\nInvitee Time Zone:\nAsia/Calcutta\n  \n\nWho
 :\n\nPro Example - Organizer\[email protected]\n  \nTest\[email protected]\n      \n 
  \nWhere:\n\n\n\n\n\nNeed to reschedule or cancel?\nhttp://localhost:3000/cancel/hzw
 hM1MgW89q83kahDpev6
ORGANIZER;CN="Pro Example":mailto:[email protected]
ATTENDEE;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;CN=Test:mailto:[email protected]
DURATION:PT30M
END:VEVENT
BEGIN:VEVENT
UID:b4ad33ad-aaee-4320-aea3-52c1516b1afc
SUMMARY:30min between Pro Example and Another test
DTSTAMP:20220817T060100Z
DTSTART:20220825T043000Z
DESCRIPTION:What:\n30min\n  \n\nInvitee Time Zone:\nAsia/Calcutta\n  \n\nWho
 :\n\nPro Example - Organizer\[email protected]\n  \nAnother test\[email protected]\n
       \n  \nWhere:\n\n\n\n\n\nNeed to reschedule or cancel?\nhttp://localhost:3000/ca
 ncel/2u4dzH6aGRe2LTGiGErjmi
ORGANIZER;CN="Pro Example":mailto:[email protected]
ATTENDEE;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;CN="Another test":mailto:[email protected]
DURATION:PT30M
END:VEVENT
BEGIN:VEVENT
UID:9bafe5ff-a10a-46d0-a447-61e8ab6948c6
SUMMARY:60min between Pro Example and FreeBusy Test
DTSTAMP:20220819T111800Z
DTSTART:20220824T073000Z
DESCRIPTION:What:\n60min\n  \n\nInvitee Time Zone:\nAsia/Calcutta\n  \n\nWho
 :\n\nPro Example - Organizer\[email protected]\n  \nFreeBusy Test\nfreebusy@example
 .com\n      \n  \nWhere:\n\n\n\n\n\nNeed to reschedule or cancel?\nhttp://localhost:30
 00/cancel/hXE2hFLZgvCeweLqDsxMpX
ORGANIZER;CN="Pro Example":mailto:[email protected]
ATTENDEE;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;CN="FreeBusy Test":mailto:[email protected]
DURATION:PT60M
END:VEVENT
BEGIN:VEVENT
UID:f18cdfc1-c12e-4ea8-82dc-28168442c16a
SUMMARY:60min between Pro Example and FreeBusy Test
DTSTAMP:20220819T111800Z
DTSTART:20220822T073000Z
DESCRIPTION:What:\n60min\n  \n\nInvitee Time Zone:\nAsia/Calcutta\n  \n\nWho
 :\n\nPro Example - Organizer\[email protected]\n  \nFreeBusy Test\nfreebusy@example
 .com\n      \n  \nWhere:\n\n\n\n\n\nNeed to reschedule or cancel?\nhttp://localhost:30
 00/cancel/aNXdcyQStFQvMo3A3btP2q
ORGANIZER;CN="Pro Example":mailto:[email protected]
ATTENDEE;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;CN="FreeBusy Test":mailto:[email protected]
DURATION:PT60M
END:VEVENT
END:VCALENDAR

the following are pulled just fine:

BEGIN:VEVENT
UID:06436a27-4991-4c1e-ae44-d86af6a8818f
SUMMARY:30min between Pro Example and Test
DTSTAMP:20220817T060100Z
DTSTART:20220818T093000Z
DESCRIPTION:What:\n30min\n  \n\nInvitee Time Zone:\nAsia/Calcutta\n  \n\nWho
 :\n\nPro Example - Organizer\[email protected]\n  \nTest\[email protected]\n      \n 
  \nWhere:\n\n\n\n\n\nNeed to reschedule or cancel?\nhttp://localhost:3000/cancel/hzw
 hM1MgW89q83kahDpev6
ORGANIZER;CN="Pro Example":mailto:[email protected]
ATTENDEE;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;CN=Test:mailto:[email protected]
DURATION:PT30M
END:VEVENT

BEGIN:VEVENT
UID:b4ad33ad-aaee-4320-aea3-52c1516b1afc
SUMMARY:30min between Pro Example and Another test
DTSTAMP:20220817T060100Z
DTSTART:20220825T043000Z
DESCRIPTION:What:\n30min\n  \n\nInvitee Time Zone:\nAsia/Calcutta\n  \n\nWho
 :\n\nPro Example - Organizer\[email protected]\n  \nAnother test\[email protected]\n
       \n  \nWhere:\n\n\n\n\n\nNeed to reschedule or cancel?\nhttp://localhost:3000/ca
 ncel/2u4dzH6aGRe2LTGiGErjmi
ORGANIZER;CN="Pro Example":mailto:[email protected]
ATTENDEE;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;CN="Another test":mailto:[email protected]
DURATION:PT30M
END:VEVENT

BEGIN:VEVENT
UID:9bafe5ff-a10a-46d0-a447-61e8ab6948c6
SUMMARY:60min between Pro Example and FreeBusy Test
DTSTAMP:20220819T111800Z
DTSTART:20220824T073000Z
DESCRIPTION:What:\n60min\n  \n\nInvitee Time Zone:\nAsia/Calcutta\n  \n\nWho
 :\n\nPro Example - Organizer\[email protected]\n  \nFreeBusy Test\nfreebusy@example
 .com\n      \n  \nWhere:\n\n\n\n\n\nNeed to reschedule or cancel?\nhttp://localhost:30
 00/cancel/hXE2hFLZgvCeweLqDsxMpX
ORGANIZER;CN="Pro Example":mailto:[email protected]
ATTENDEE;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;CN="FreeBusy Test":mailto:[email protected]
DURATION:PT60M
END:VEVENT

BEGIN:VEVENT
UID:f18cdfc1-c12e-4ea8-82dc-28168442c16a
SUMMARY:60min between Pro Example and FreeBusy Test
DTSTAMP:20220819T111800Z
DTSTART:20220822T073000Z
DESCRIPTION:What:\n60min\n  \n\nInvitee Time Zone:\nAsia/Calcutta\n  \n\nWho
 :\n\nPro Example - Organizer\[email protected]\n  \nFreeBusy Test\nfreebusy@example
 .com\n      \n  \nWhere:\n\n\n\n\n\nNeed to reschedule or cancel?\nhttp://localhost:30
 00/cancel/aNXdcyQStFQvMo3A3btP2q
ORGANIZER;CN="Pro Example":mailto:[email protected]
ATTENDEE;RSVP=FALSE;PARTSTAT=NEEDS-ACTION;CN="FreeBusy Test":mailto:[email protected]
DURATION:PT60M
END:VEVENT

The rest are not. Is there a reason why this is?

alishaz-polymath avatar Aug 22 '22 06:08 alishaz-polymath

thanks for reporting, I'll investigate it soon.

natelindev avatar Sep 17 '22 11:09 natelindev

He @natelindev Thank you. We're also quite dependent on your wonderful library and we appreciate your help. We're willing to pay to expedite this as a priority (you can contact either me or Peer from Calcom). I'm also more than willing to co-debug it with you if it can be possible. Please let me know what you think. Once again, we really need it as a priority and appreciate your kind help on this. EDIT: please feel free to book a slot at cal.com/ali if you wish to discuss it further 🙏

alishaz-polymath avatar Sep 20 '22 08:09 alishaz-polymath

Hey @natelindev is there any update on this at all?

alishaz-polymath avatar Sep 29 '22 08:09 alishaz-polymath

Sorry, I was pretty caught up at my work this week, will respond Today or tomorrow.

On Thu, Sep 29, 2022 at 16:49 Syed Ali Shahbaz @.***> wrote:

Hey @natelindev https://github.com/natelindev is there any update on this at all?

— Reply to this email directly, view it on GitHub https://github.com/natelindev/tsdav/issues/127#issuecomment-1261967833, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACG4GTSBQ3YRU52ZIJ3LIO3WAVJYBANCNFSM57GKUUOQ . You are receiving this because you were mentioned.Message ID: @.***>

natelindev avatar Sep 29 '22 12:09 natelindev

Sorry, I was pretty caught up at my work this week, will respond Today or tomorrow. On Thu, Sep 29, 2022 at 16:49 Syed Ali Shahbaz @.> wrote: Hey @natelindev https://github.com/natelindev is there any update on this at all? — Reply to this email directly, view it on GitHub <#127 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACG4GTSBQ3YRU52ZIJ3LIO3WAVJYBANCNFSM57GKUUOQ . You are receiving this because you were mentioned.Message ID: @.>

Of course, completely understand. Thank you for looking into this :)

alishaz-polymath avatar Sep 29 '22 12:09 alishaz-polymath

meeting booked.

natelindev avatar Sep 30 '22 17:09 natelindev

Hey @natelindev I'm in the call and waiting. Can you please join in, else re-schedule so that we can sync on the CalDAV issue? Thanks 🙏

alishaz-polymath avatar Oct 03 '22 09:10 alishaz-polymath

Sorry I just had internet problem, I just fixed it.

On Mon, Oct 3, 2022 at 5:12 PM Syed Ali Shahbaz @.***> wrote:

Hey @natelindev https://github.com/natelindev I'm in the call and waiting. Can you please join in, else re-schedule so that we can sync on the CalDAV issue? Thanks 🙏

— Reply to this email directly, view it on GitHub https://github.com/natelindev/tsdav/issues/127#issuecomment-1265155428, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACG4GTVMH35RNEM5OUZVUNDWBKPRJANCNFSM57GKUUOQ . You are receiving this because you were mentioned.Message ID: @.***>

natelindev avatar Oct 03 '22 09:10 natelindev

No worries, see you then 🙏

alishaz-polymath avatar Oct 03 '22 09:10 alishaz-polymath

@natelindev Thanks for the call today, was very good to pinpoint the bug alongside you and I hope to see a resolution for the same in the near future. Will keep this open just as a reminder of the existing bug. Once again, thanks 🙏

alishaz-polymath avatar Oct 04 '22 07:10 alishaz-polymath

Hey @natelindev What's the best way to get the data from the calendar objects when they only have the url and etag returned, while the data object is empty? Note that the url of the calendar object is usually password protected in these cases, so I need a way to parse it keeping in mind that it is password protected. 🤔 Perhaps another short call here 🙏

alishaz-polymath avatar Oct 20 '22 05:10 alishaz-polymath

use calendarMultiGet https://tsdav.vercel.app/docs/caldav/calendarMultiGet, put in calendarData prop and your urls and you can have the result

natelindev avatar Oct 20 '22 09:10 natelindev

Hey @natelindev I tried it, ~but it still returns empty~ it returns unauthorised and that basic authentication is deprecated 🤔. Are there any alternatives to that? 🙏 ref: https://developer.atlassian.com/cloud/confluence/deprecation-notice-basic-auth/

alishaz-polymath avatar Oct 21 '22 05:10 alishaz-polymath