Skip to content

Self-hosted: google calendar refresh issue? #7526

@piec

Description

@piec

Issue Summary

Hello,

When using calcom in a self-hosted docker-compose setup my availability based on a google calendar does not change when an event is added. It works on cal.com/ .

Steps to Reproduce

  1. Setup a self-hosted docker-compose calcom with correct parameters (url, email, google credentials, ...)
  2. Setup an account with a single Event Type of 60min (time slot intervals = 60min too).
  3. Configure this account with google calendar, and toggle to enable a single calendar "X" in the "Check for conflicts" section. Use another calendar to add events to.
  4. Check the availability using the event "preview" url, it correctly takes my google calendar events into account. 16:00 is available.
  5. Add a new 60min event in google calendar at 16:00
  6. Wait some time check the availability again, (refresh page even though it doesn't seem necessary). 16:00 is still erroneously available.
  7. In the google calendar settings, toggle the calendar "X" 2 times to disable it and enable it again. (This step seems to force the refresh of the google calendar).
  8. Check the availability, 16:00 is not available anymore which is correct.

The exact same setup with the hosted version at https://cal.com works. I suspect a calendar cache invalidation issue but I don't know the internals of calcom.
What do you think?
Thanks

Debug info during step 6

cal-calcom-1  | @calcom/web:start: https://cal.example.com/_next/data/.../en/pierre/calendar-cache/2023-03.json?user=pierre&month=2023-03
cal-calcom-1  | @calcom/web:start: https://cal.example.com/_next/data/.../en/pierre/calendar-cache/2023-03.json?user=pierre&month=2023-03
cal-calcom-1  | @calcom/web:start: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
cal-calcom-1  | @calcom/web:start:     at new NodeError (node:internal/errors:387:5)
cal-calcom-1  | @calcom/web:start:     at ServerResponse.setHeader (node:_http_outgoing:644:11)
cal-calcom-1  | @calcom/web:start:     at ServerResponse._res.setHeader (/calcom/node_modules/next/dist/server/base-server.js:129:24)
cal-calcom-1  | @calcom/web:start:     at Function.getInitialProps (/calcom/apps/web/.next/server/pages/_document.js:127:22)
cal-calcom-1  | @calcom/web:start:     at Object.<anonymous> (/calcom/node_modules/next/dist/shared/lib/utils.js:84:33)
cal-calcom-1  | @calcom/web:start:     at Generator.next (<anonymous>)
cal-calcom-1  | @calcom/web:start:     at asyncGeneratorStep (/calcom/node_modules/@swc/helpers/lib/_async_to_generator.js:13:28)
cal-calcom-1  | @calcom/web:start:     at _next (/calcom/node_modules/@swc/helpers/lib/_async_to_generator.js:31:17)
cal-calcom-1  | @calcom/web:start:     at /calcom/node_modules/@swc/helpers/lib/_async_to_generator.js:36:13
cal-calcom-1  | @calcom/web:start:     at new Promise (<anonymous>)
cal-calcom-1  | @calcom/web:start:     at Object.<anonymous> (/calcom/node_modules/@swc/helpers/lib/_async_to_generator.js:28:16)
cal-calcom-1  | @calcom/web:start:     at Object.loadGetInitialProps (/calcom/node_modules/next/dist/shared/lib/utils.js:62:33)
cal-calcom-1  | @calcom/web:start:     at loadDocumentInitialProps (/calcom/node_modules/next/dist/server/render.js:692:48)
cal-calcom-1  | @calcom/web:start:     at renderDocument (/calcom/node_modules/next/dist/server/render.js:749:45)
cal-calcom-1  | @calcom/web:start:     at Object.renderToHTML (/calcom/node_modules/next/dist/server/render.js:786:34)
cal-calcom-1  | @calcom/web:start:     at processTicksAndRejections (node:internal/process/task_queues:96:5) {
cal-calcom-1  | @calcom/web:start:   code: 'ERR_HTTP_HEADERS_SENT'
cal-calcom-1  | @calcom/web:start: }

the https://cal.example.com/_next/data/.../en/pierre/calendar-cache/2023-03.json?user=pierre&month=2023-03 link shows the not-updated data where my slot at 16:00 is still available. The date field timestamp is before the time where the event was added in step 5.

Technical details

  • browsers: chrome, firefox
  • calcom versions: v2.6.6, main

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions