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

CalDav Bugfix Collection for Nathaniel (maker of tsdav) #956

Closed
8 of 15 tasks
PeerRich opened this issue Oct 14, 2021 · 30 comments
Closed
8 of 15 tasks

CalDav Bugfix Collection for Nathaniel (maker of tsdav) #956

PeerRich opened this issue Oct 14, 2021 · 30 comments
Assignees
Labels
🐛 bug Something isn't working 🙋🏻‍♂️help wanted Help from the community is appreciated
Milestone

Comments

@PeerRich
Copy link
Member

PeerRich commented Oct 14, 2021

thank you Nathaniel (@natelindev ) for offering your help.

for context, we use https://github.com/natelindev/tsDAV by @natelindev


some of these may be out of date / fixed already

@natelindev
Copy link
Contributor

I'll be working on these this Sunday.

@PeerRich
Copy link
Member Author

let me know if you have any blockers 🙏

@natelindev
Copy link
Contributor

natelindev commented Oct 17, 2021

let me know if you have any blockers 🙏

I think it's better to add me to project collaborators list, I can work with forking the repo but it's not very elegant.

@natelindev
Copy link
Contributor

natelindev commented Oct 17, 2021

For task upgrade to latest tsDAV and test:
since repo is currently filled with typescript errors, how do I know if I didn't break anything?
also the e2e tests are failing too.

@natelindev
Copy link
Contributor

natelindev commented Oct 17, 2021

list of calendar services that supports caldav:

1CRM
A1.net
all-inkl.com
AOL Mail
Baïkal
Bitrix24
Calendar and Contacts Server
cPanel
Cyrus IMAP
DAViCal
DavMail Gateway
Davis
Daylite
DingTalk / 钉钉 / Dīngdīng
Dolibarr
EDIS
EGroupware
Fastmail
fruux
GMX
Google
Group Office
Hetzner KonsoleH
Horde
IceWarp
iCloud
Kerio Connect
Kolab Now
Kopano
Liberta
luckycloud
macOS Server
mail.de
mail.ru
mailbox.org
Mailfence
MDaemon
Nextcloud
openCRX
Open-Xchange / OX App Suite
Oracle Beehive
Oracle Communications UCS
ownCloud
OwnCube
Posteo
Radicale
Roundcube
SmarterMail
SOGo
Synology DSM
Teambox
Tine 2.0
T-Online
web.de
Xandikos
Yahoo Mail!
Yandex
Zaclys
Zimbra
Zoho

@PeerRich
Copy link
Member Author

For task upgrade to latest tsDAV and test: since repo is currently filled with typescript errors, how do I know if I didn't break anything? also the e2e tests are failing too.

@KATT ?

@natelindev
Copy link
Contributor

After some investigation of current implementation of caldav integration, I believe it need some major changes.
Currently fastmail, nextcloud works fine with tsdav integration tests, while not working at all in calendso.

@jdaviescoates
Copy link

while not working at all in calendso.

Yeah, I think CalDAV ought to be unchecked over on #62 @baileypumfleet because integration that doesn't actually work isn't really integration at all. Really great product though, so can't wait to begin using it once CalDAV works!

@PeerRich
Copy link
Member Author

After some investigation of current implementation of caldav integration, I believe it need some major changes. Currently fastmail, nextcloud works fine with tsdav integration tests, while not working at all in calendso.

hmm that's bad news. I dm'ed you!

@PeerRich
Copy link
Member Author

PeerRich commented Dec 13, 2021

Nextcloud & Fastmail has been fixed: https://github.com/calendso/calendso/pull/1300, thank you @llldar

@PeerRich PeerRich added the 🐛 bug Something isn't working label Jan 13, 2022
@PeerRich PeerRich added this to the v.1.2 milestone Jan 13, 2022
@sydwardrae
Copy link
Contributor

sydwardrae commented Jan 14, 2022

Hey @natelindev , i have a customer with the following issues : a customer saying that their Appointments from CalDAV don’t appear as busy slots - they’re using Woelkli.com, a Nextcloud server.

From what I can see, their integrations are correct so I think it's a bug. Please let me know if I can provide further information - thank you!

@PeerRich PeerRich modified the milestones: v.1.2, v.1.3 Jan 15, 2022
@PeerRich
Copy link
Member Author

one user is reporting:

I successfully generated an app-specific password on Apple. BUT when I enter it on Cal, it says "could not add this caldav account".

@PeerRich PeerRich moved this from Todo to In Progress in Cal.com Core Roadmap Jan 29, 2022
@pumfleet pumfleet modified the milestones: v.1.3, v.1.4 Feb 21, 2022
@PeerRich PeerRich modified the milestones: v.1.4, v.1.5 Mar 16, 2022
@saschafoerster
Copy link
Contributor

I am using Kerio Connect as a CalDAV source and I get the following error: "invalid ical body. component began but did not end"
I am not shure, if this is a bug of Kerio, tsdav or cal.com, but I am ready to find out and help (just I don't know exactly how to find the right information). All I could find is this log-file:

2|calcom | @calcom/web:start: 21:38:39.651 timeZoneName WARN CalendarManager 
2|calcom | @calcom/web:start:   at new ParserError (/home/cal.com/node_modules/ical.js/build/ical.js:1756:13)
2|calcom | @calcom/web:start:   at Object.parser [as parse] (/home/cal.com/node_modules/ical.js/build/ical.js:1794:13)
2|calcom | @calcom/web:start:   at /home/cal.com/apps/web/.next/server/chunks/3372.js:6252:77
2|calcom | @calcom/web:start:   at Array.forEach (<anonymous>)
2|calcom | @calcom/web:start:   at CalDavCalendarService.getAvailability (/home/cal.com/apps/web/.next/server/chunks/3372.js:6250:17)
2|calcom | @calcom/web:start:   at runMicrotasks (<anonymous>)
2|calcom | @calcom/web:start:   at processTicksAndRejections (internal/process/task_queues.js:95:5)
2|calcom | @calcom/web:start:   at async Promise.all (index 0)
2|calcom | @calcom/web:start:   at async getBusyCalendarTimes (/home/cal.com/apps/web/.next/server/chunks/6477.js:105:19)
2|calcom | @calcom/web:start:   at async handler (/home/cal.com/apps/web/.next/server/pages/api/availability/[user].js:517:23)
2|calcom | @calcom/web:start:   at async Object.apiResolver (/home/cal.com/node_modules/next/dist/server/api-utils/node.js:184:9)
2|calcom | @calcom/web:start:   at async NextNodeServer.runApi (/home/cal.com/node_modules/next/dist/server/next-server.js:395:9)
2|calcom | @calcom/web:start:   at async Object.fn (/home/cal.com/node_modules/next/dist/server/base-server.js:477:37)
2|calcom | @calcom/web:start:   at async Router.execute (/home/cal.com/node_modules/next/dist/server/router.js:243:32)
2|calcom | @calcom/web:start:   at async NextNodeServer.run (/home/cal.com/node_modules/next/dist/server/base-server.js:594:29)
2|calcom | @calcom/web:start:   at async NextNodeServer.handleRequest (/home/cal.com/node_modules/next/dist/server/base-server.js:299:20) {
2|calcom | @calcom/web:start:  message: 'invalid ical body. component began but did not end'
2|calcom | @calcom/web:start: }

@PeerRich PeerRich modified the milestones: v.1.5, v.1.6 Apr 19, 2022
@zomars zomars modified the milestones: v.1.6, v.1.7 May 16, 2022
@PeerRich
Copy link
Member Author

hey @natelindev can you check out Kerio Connect as a CalDAV source?

@saschafoerster
Copy link
Contributor

Would love to help debugging, if I can do something let me know.

@PeerRich
Copy link
Member Author

Would love to help debugging, if I can do something let me know.

that would be great!

@saschafoerster
Copy link
Contributor

With version 1.6.2 I can still connect (and reconnect) caldav with Kerio as caldav-server. I use this URL https://kerio.domain.tld/caldav/users/DOMAIN/USER/
and I can see my connected caldav-account:
https://kerio.domain.tld/full-calendars/DOMAIN/USER/INDIVIDUAL NUMBER/
The error message I get now has changed to:

TypeError: undefined is not an object (evaluating 'h.length')
when I check the connection here:
https://calcom.domain/availability/troubleshoot

Bildschirmfoto 2022-06-05 um 14 56 44

@PeerRich
Copy link
Member Author

we've assigned a new engineer to some of those bugs @alishaz-polymath

@zomars
Copy link
Member

zomars commented Jun 12, 2022

Found a bug that was appearing in Zoho calendars: kewisch/ical.js#514

@zomars
Copy link
Member

zomars commented Jun 12, 2022

Also made a temp fix that prevents blocking availability 92de793

@PeerRich PeerRich modified the milestones: v.1.7, v.1.8 Jun 26, 2022
@saschafoerster
Copy link
Contributor

Hi there, with debug-mode on; i found another (similar) error message in browser console, saying that "operation was aborted and: "invalid ical body. component began but did not end"

1|calcom  | @calcom/web:start: 19:39:35.830 timeZoneName WARN CalendarManager 
1|calcom  | @calcom/web:start:   at new ParserError (/home/cal.com/node_modules/ical.js/build/ical.js:1756:13)
1|calcom  | @calcom/web:start:   at Object.parser [as parse] (/home/cal.com/node_modules/ical.js/build/ical.js:1794:13)
1|calcom  | @calcom/web:start:   at /home/cal.com/apps/web/.next/server/chunks/4270.js:224:77
1|calcom  | @calcom/web:start:   at Array.forEach (<anonymous>)
1|calcom  | @calcom/web:start:   at CalDavCalendarService.getAvailability (/home/cal.com/apps/web/.next/server/chunks/4270.js:222:17)
1|calcom  | @calcom/web:start:   at processTicksAndRejections (internal/process/task_queues.js:95:5)
1|calcom  | @calcom/web:start:   at async /home/cal.com/apps/web/.next/server/chunks/5041.js:4461:116
1|calcom  | @calcom/web:start:   at async Promise.all (index 0)
1|calcom  | @calcom/web:start:   at async getBusyCalendarTimes (/home/cal.com/apps/web/.next/server/chunks/5041.js:4470:19)
1|calcom  | @calcom/web:start:   at async getBusyTimes (/home/cal.com/apps/web/.next/server/chunks/5041.js:4947:35)
1|calcom  | @calcom/web:start:   at async getUserAvailability (/home/cal.com/apps/web/.next/server/chunks/5041.js:5068:23)
1|calcom  | @calcom/web:start:   at async /home/cal.com/apps/web/.next/server/chunks/6105.js:85:28
1|calcom  | @calcom/web:start:   at async Object.apiResolver (/home/cal.com/node_modules/next/dist/server/api-utils/node.js:185:9)
1|calcom  | @calcom/web:start:   at async NextNodeServer.runApi (/home/cal.com/node_modules/next/dist/server/next-server.js:395:9)
1|calcom  | @calcom/web:start:   at async Object.fn (/home/cal.com/node_modules/next/dist/server/base-server.js:496:37)
1|calcom  | @calcom/web:start:   at async Router.execute (/home/cal.com/node_modules/next/dist/server/router.js:226:36) {
1|calcom  | @calcom/web:start:  message: 'invalid ical body. component began but did not end'
1|calcom  | @calcom/web:start: }
1|calcom  | @calcom/web:start: PerformanceEntry {
1|calcom  | @calcom/web:start:  name: 'Measuring endpoint: /api/availability/saschafoerster?dateFrom=2022-06-27T22:00:00Z&dateTo=2022-06-28T21:59:59Z',
1|calcom  | @calcom/web:start:  entryType: 'measure',
1|calcom  | @calcom/web:start:  startTime: 1008360.841986,
1|calcom  | @calcom/web:start:  duration: 1681.123231
1|calcom  | @calcom/web:start: }

@zomars
Copy link
Member

zomars commented Jul 11, 2022

@alishaz-polymath would you kindly investigate?

@zomars zomars added the 🙋🏻‍♂️help wanted Help from the community is appreciated label Jul 12, 2022
@zomars zomars moved this from In Progress to Blocked in Cal.com Core Roadmap Jul 12, 2022
@alishaz-polymath
Copy link
Member

@zomars On it

@saschafoerster
Copy link
Contributor

@zomars @alishaz-polymath With the newest version 1.7.7, I get an error message in the web-interface again:

Something went wrong.
TypeError: undefined is not an object (evaluating 'p.length')

Browser-console:

[Error]  << query #2 viewer.me 
{input: undefined, result: TRPCClientError: The operation was aborted., elapsedMs: 364, context: {}}

	(anonyme Funktion) (_app-4c5647c7057e4ddc.js:1:136386)
	(anonyme Funktion) (_app-4c5647c7057e4ddc.js:1:136854)
	p (_app-4c5647c7057e4ddc.js:1:10532)
	(anonyme Funktion) (_app-4c5647c7057e4ddc.js:1:10553)
	onDone (_app-4c5647c7057e4ddc.js:1:12283)
	done (_app-4c5647c7057e4ddc.js:1:11513)
	(anonyme Funktion) (_app-4c5647c7057e4ddc.js:1:13829)
	t (_app-4c5647c7057e4ddc.js:1:213143)
	(anonyme Funktion) (_app-4c5647c7057e4ddc.js:1:199966)
	(anonyme Funktion) (_app-4c5647c7057e4ddc.js:1:223010)
	(anonyme Funktion) (_app-4c5647c7057e4ddc.js:1:222692)
	(anonyme Funktion) (_app-4c5647c7057e4ddc.js:1:214125)
	(anonyme Funktion) (_app-4c5647c7057e4ddc.js:1:231789)
	Gu (framework-dbb4adbd2655d20c.js:1:92950)
	Ju (framework-dbb4adbd2655d20c.js:1:93147)
	ws (framework-dbb4adbd2655d20c.js:1:112985)
	(anonyme Funktion) (framework-dbb4adbd2655d20c.js:1:110375)
	S (framework-dbb4adbd2655d20c.js:1:131185)
	T (framework-dbb4adbd2655d20c.js:1:131719)
[Error] Failed to load resource: the server responded with a status of 500 (Internal Server Error) (saschafoerster, line 0)
[Error] TypeError: undefined is not an object (evaluating 'p.length') — troubleshoot-94184235e0a488c8.js:0
	uu (framework-dbb4adbd2655d20c.js:1:71390)
	(anonyme Funktion) (framework-dbb4adbd2655d20c.js:1:71916)
	sa (framework-dbb4adbd2655d20c.js:1:50763)
	gi (framework-dbb4adbd2655d20c.js:1:100832)
	vi (framework-dbb4adbd2655d20c.js:1:100400)
	hi (framework-dbb4adbd2655d20c.js:1:99936)
	(anonyme Funktion) (framework-dbb4adbd2655d20c.js:1:112071)
	ks (framework-dbb4adbd2655d20c.js:1:112533)
	rs (framework-dbb4adbd2655d20c.js:1:105048)
	rs
	S (framework-dbb4adbd2655d20c.js:1:131185)
	T (framework-dbb4adbd2655d20c.js:1:131719)

Logfiles:

1|calcom   | @calcom/web:start: [OK][0.0004s] query 'viewer.me'
1|calcom   | @calcom/web:start: [OK][0.0007s] query 'viewer.me'
1|calcom   | @calcom/web:start: [ERROR][0.0121s] GET '/api/availability/saschafoerster?dateFrom=2022-07-12T22:00:00Z&dateTo=2022-07-13T21:59:59Z'

@alishaz-polymath
Copy link
Member

@saschafoerster Thanks for sharing. I'll check this out 🙏

@saschafoerster
Copy link
Contributor

And the logs with debug-mode on:

1|calcom  | @calcom/web:start: [OK][0.0050s] query 'viewer.availability.schedule'
1|calcom  | @calcom/web:start: [OK][0.0052s] query 'viewer.availability.schedule'
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."users"."id", "public"."users"."username", "public"."users"."name", "public"."users"."email", "public"."users"."emailVerified", "public"."users"."password", "public"."users"."bio", "public"."users"."avatar", "public"."users"."timeZone", "public"."users"."weekStart", "public"."users"."startTime", "public"."users"."endTime", "public"."users"."bufferTime", "public"."users"."hideBranding", "public"."users"."theme", "public"."users"."created", "public"."users"."trialEndsAt", "public"."users"."defaultScheduleId", "public"."users"."completedOnboarding", "public"."users"."locale", "public"."users"."timeFormat", "public"."users"."twoFactorSecret", "public"."users"."twoFactorEnabled", "public"."users"."identityProvider", "public"."users"."identityProviderId", "public"."users"."invitedTo", "public"."users"."plan", "public"."users"."brandColor", "public"."users"."darkBrandColor", "public"."users"."away", "public"."users"."allowDynamicBooking", "public"."users"."metadata", "public"."users"."verified", "public"."users"."role", "public"."users"."disableImpersonation" FROM "public"."users" WHERE "public"."users"."email" = $1 LIMIT $2 OFFSET $3
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."users"."id", "public"."users"."timeZone", "public"."users"."bufferTime", "public"."users"."startTime", "public"."users"."endTime", "public"."users"."defaultScheduleId" FROM "public"."users" WHERE "public"."users"."username" = $1 LIMIT $2 OFFSET $3
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."Credential"."id", "public"."Credential"."type", "public"."Credential"."key", "public"."Credential"."userId", "public"."Credential"."appId" FROM "public"."Credential" WHERE "public"."Credential"."userId" IN ($1) OFFSET $2
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."Availability"."id", "public"."Availability"."userId", "public"."Availability"."eventTypeId", "public"."Availability"."days", "public"."Availability"."startTime", "public"."Availability"."endTime", "public"."Availability"."date", "public"."Availability"."scheduleId" FROM "public"."Availability" WHERE "public"."Availability"."userId" IN ($1) OFFSET $2
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."SelectedCalendar"."userId", "public"."SelectedCalendar"."integration", "public"."SelectedCalendar"."externalId" FROM "public"."SelectedCalendar" WHERE "public"."SelectedCalendar"."userId" IN ($1) OFFSET $2
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."Schedule"."id", "public"."Schedule"."timeZone", "public"."Schedule"."userId" FROM "public"."Schedule" WHERE "public"."Schedule"."userId" IN ($1) OFFSET $2
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."Availability"."id", "public"."Availability"."userId", "public"."Availability"."eventTypeId", "public"."Availability"."days", "public"."Availability"."startTime", "public"."Availability"."endTime", "public"."Availability"."date", "public"."Availability"."scheduleId" FROM "public"."Availability" WHERE "public"."Availability"."scheduleId" IN ($1) OFFSET $2
1|calcom  | @calcom/web:start: [ERROR][0.0431s] GET '/api/availability/saschafoerster?dateFrom=2022-07-12T22:00:00Z&dateTo=2022-07-13T21:59:59Z'
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."users"."id", "public"."users"."username", "public"."users"."name", "public"."users"."email", "public"."users"."bio", "public"."users"."timeZone", "public"."users"."weekStart", "public"."users"."startTime", "public"."users"."endTime", "public"."users"."defaultScheduleId", "public"."users"."bufferTime", "public"."users"."theme", "public"."users"."created", "public"."users"."hideBranding", "public"."users"."avatar", "public"."users"."twoFactorEnabled", "public"."users"."disableImpersonation", "public"."users"."identityProvider", "public"."users"."brandColor", "public"."users"."darkBrandColor", "public"."users"."plan", "public"."users"."away", "public"."users"."completedOnboarding", "public"."users"."locale", "public"."users"."timeFormat", "public"."users"."trialEndsAt" FROM "public"."users" WHERE "public"."users"."id" = $1 LIMIT $2 OFFSET $3
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."Credential"."id", "public"."Credential"."type", "public"."Credential"."key", "public"."Credential"."userId", "public"."Credential"."appId" FROM "public"."Credential" WHERE "public"."Credential"."userId" IN ($1) ORDER BY "public"."Credential"."id" ASC OFFSET $2
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."SelectedCalendar"."userId", "public"."SelectedCalendar"."integration", "public"."SelectedCalendar"."externalId" FROM "public"."SelectedCalendar" WHERE "public"."SelectedCalendar"."userId" IN ($1) OFFSET $2
1|calcom  | @calcom/web:start: prisma:query SELECT "public"."DestinationCalendar"."id", "public"."DestinationCalendar"."integration", "public"."DestinationCalendar"."externalId", "public"."DestinationCalendar"."userId", "public"."DestinationCalendar"."bookingId", "public"."DestinationCalendar"."eventTypeId", "public"."DestinationCalendar"."credentialId" FROM "public"."DestinationCalendar" WHERE "public"."DestinationCalendar"."userId" IN ($1) OFFSET $2
1|calcom  | @calcom/web:start: [OK][0.0001s] query 'viewer.me'
1|calcom  | @calcom/web:start: [OK][0.0003s] query 'viewer.me'
1|calcom  | @calcom/web:start: [OK][0.0004s] query 'viewer.me'

@PeerRich PeerRich modified the milestones: v.1.8, v.1.9 Jul 15, 2022
@PeerRich
Copy link
Member Author

@alishaz-polymath feel free to close this issue and move all open issues into a new thread

@alishaz-polymath
Copy link
Member

@PeerRich Will do. I'm currently exploring exactly how we handle CalDav and just studying it as a whole. Once I have a set of actions ready, I'll do this 🙏

@alishaz-polymath
Copy link
Member

Hey everyone, thanks a lot for your help and feedback. For a cleaner hunting, closing this in favor of #3457 🙏

Repository owner moved this from Blocked to Done in Cal.com Core Roadmap Jul 20, 2022
@quanru
Copy link

quanru commented Dec 18, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🙋🏻‍♂️help wanted Help from the community is appreciated
Projects
No open projects
Status: Done
Development

No branches or pull requests

9 participants