trouble adding Google Calendar to Cal.com App Store
-
I tried following the self-hosters instructions to add Google Calendar to the app, but have run into an issue (error message: "
Google client_id missing
") that I think might be specific to the Cloudron setup. Ultimately, it looks like we need to add these two new environment variables:GOOGLE_API_CREDENTIALS={"web":{"client_id" ... }} GOOGLE_LOGIN_ENABLED=true
and then re-seed the app store:
cd packages/prisma yarn seed-app-store
I'm seeing lots of errors when running this that appear to be related to apps that I'm not trying to install, but I did see one error message that perhaps needs to be addressed here:
error: Environment variable not found: DATABASE_URL.
I saw that the cal.com documentation mentions
.env
(here) and.env.appStore
(here), so I tried putting the new variables there too (in addition to the currentenv
file in Cloudron), but still no luck.I'm curious to hear if anyone else has been able to successfully connect Google Calendar.
-
-
I was able to successfully set up the Google Calendar app by following the Cal.com self-hosters instructions you linked. I created it as an "Internal App". After including the
GOOGLE_API_CREDENTIALS
variable in the.env
file I had to restart the Cal.com cloudron app twice for it to properly recognize the OAuth Credentials.Please be aware that you need to enclose the JSON value of the environment variable in single quotes
'
and apparently include a new line after your last environment variable.It should look something like this:
# Add custom environment variables in this file NEXT_PUBLIC_APP_NAME="..." NEXT_PUBLIC_COMPANY_NAME="..." GOOGLE_API_CREDENTIALS='{"web":{...}}' # don't forget to include the new line after the env variable
Note it is not necessary to reseed the app store as described in Cal.com docs. Simply restart the Cloudron Cal.com app after adding the env varible and navigate to the admin settings to enable the Google Calendar app for your instance. You can also skip the admin onboarding dialog where you can enable the Google Calendar plugin.
-
-
is there a copy of the .env file created in the home directory? When i look at mine I only see .env.example but no .env file. It seems like it should be there someplace that Im missing.
-
@robertdoneill Use the filemanager to edit
/app/data/env
-
@nebulon I wasn't able to get it to work with changes to the
env
file, but was able to get everything working through a different path: by first uninstalling and reinstalling from the Cloudron App Store. This time, I entered the credentials directly through the web prompts during the admin user onboarding flow. Looking forward to testing it all out this week! -
-
-
-
I'm just setting up Cal.com on my Cloudron and during the admin onboarding I'm trying to turn Google Calendar and Outlook Calendar on and both of them present me with pop-ups like this:
I've no idea what I'm supposed to enter in those fields?
-
@jdaviescoates you need credentials to use the API: https://cal.com/docs/introduction/quick-start/self-hosting/install-apps/google
-
@msbt thanks, I manged to work that out eventually, but I'm still struggling to get it to work.
I've now got the Google Calendar App in the app store, but when I try to actually install it and then select the relevant Google account to login with I just get presented with this:
I'm seeing this in the logs:
Oct 06 10:21:13@calcom/web:start: Error setting header x-csp=not-opted-in for /apps/google-calendar Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client Oct 06 10:21:13@calcom/web:start: at new NodeError (node:internal/errors:405:5) Oct 06 10:21:13@calcom/web:start: at ServerResponse.setHeader (node:_http_outgoing:648:11) Oct 06 10:21:13@calcom/web:start: at _res.setHeader (/run/calcom/node_modules/next/dist/server/base-server.js:306:24) Oct 06 10:21:13@calcom/web:start: at setHeader (/run/calcom/apps/web/.next/server/pages/_document.js:181:18) Oct 06 10:21:13@calcom/web:start: at MyDocument.getInitialProps (/run/calcom/apps/web/.next/server/pages/_document.js:191:13) Oct 06 10:21:13@calcom/web:start: at loadGetInitialProps (/run/calcom/node_modules/next/dist/shared/lib/utils.js:146:29) Oct 06 10:21:13@calcom/web:start: at loadDocumentInitialProps (/run/calcom/node_modules/next/dist/server/render.js:740:67) Oct 06 10:21:13@calcom/web:start: at renderDocument (/run/calcom/node_modules/next/dist/server/render.js:790:45) Oct 06 10:21:13@calcom/web:start: at /run/calcom/node_modules/next/dist/server/render.js:836:18 Oct 06 10:21:13@calcom/web:start: at /run/calcom/node_modules/next/dist/server/lib/trace/tracer.js:117:36 { Oct 06 10:21:13@calcom/web:start: code: 'ERR_HTTP_HEADERS_SENT' Oct 06 10:21:13@calcom/web:start: } Oct 06 10:21:13@calcom/web:start: react-i18next:: You will need to pass in an i18next instance by using initReactI18next Oct 06 10:21:13@calcom/web:start: [PERF]: getByViewer(1) took 6.489197999238968ms
I'm wondering if I have the wrong
redirect_uris
here: -
@jdaviescoates said in trouble adding Google Calendar to Cal.com App Store:
I'm wondering if I have the wrong redirect_uris here:
Screenshot from 2023-10-06 10-25-57.png
I did have that wrong, but even after correcting it still wasn't working... on Firefox.
But then worked fine when I tried it on my vanilla install Chrome instead!
(@necrevistonnezr ha! although I also had both ublock origin and Privacy Badger still running - so could've easily been them.... Edit: nope, same thing happened with them turned off too )
-
@jdaviescoates said in trouble adding Google Calendar to Cal.com App Store:
I did have that wrong, but even after correcting it still wasn't working... on Firefox.
So what was it supposed to be???