While trying to connect Zoho Calendar with the Zoho Calendar app on a selfhosted instance get access_token fails
Steps to Reproduce
Configure Zoho API Access and Calcom Zoho Calendar app according to its Readme.md in the admin area
Adding new calendar from installed apps view, selecting Zoho Calendar
Redirects to Zoho Auth Flow, after granting the requested permissions being redirect back to Calcom instance
Actual Results
The Zoho calendar app does not show and cannot be selected e.g. for creating events in it.
Expected Results
The Zoho calendar app shows after configuration and the calendars can be used to check availability and book appointments
Technical details
Running with Docker from cal.com:main
When trying to set up the app the console gives following error:
09:48:30.338 ERROR [[zohocalendar/api/callback] get access_token failed
{
error: 'invalid_code'
}
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at new NodeError (node:internal/errors:405:5)
at ServerResponse.setHeader (node:_http_outgoing:648:11)
at _res.setHeader (/calcom/node_modules/next/dist/server/base-server.js:306:24)
at sendJson (/calcom/node_modules/next/dist/server/api-utils/node.js:226:9)
at apiRes.json (/calcom/node_modules/next/dist/server/api-utils/node.js:445:31)
at /calcom/apps/web/.next/server/chunks/1683.js:61:29
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /calcom/apps/web/.next/server/chunks/1011.js:250:13
at async handler (/calcom/apps/web/.next/server/pages/api/integrations/[...args].js:896:13) {
code: 'ERR_HTTP_HEADERS_SENT'
}
The "cannot set headers after..." message is repeated exactly the same 4 times for every attempt in setting up the app. I followed a hunch that it might have to do with different Zoho URLs for different regions, as accounts.zoho.com is hardcoded in the callback API from the app, where the error seems to stem from, but setting it manually to accounts.zoho.eu instead did not resolve it.
Issue Summary
While trying to connect Zoho Calendar with the Zoho Calendar app on a selfhosted instance get access_token fails
Steps to Reproduce
Actual Results
The Zoho calendar app does not show and cannot be selected e.g. for creating events in it.
Expected Results
The Zoho calendar app shows after configuration and the calendars can be used to check availability and book appointments
Technical details
The "cannot set headers after..." message is repeated exactly the same 4 times for every attempt in setting up the app. I followed a hunch that it might have to do with different Zoho URLs for different regions, as accounts.zoho.com is hardcoded in the callback API from the app, where the error seems to stem from, but setting it manually to accounts.zoho.eu instead did not resolve it.