Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Cal.com
  3. trouble adding Google Calendar to Cal.com App Store

trouble adding Google Calendar to Cal.com App Store

Scheduled Pinned Locked Moved Solved Cal.com
13 Posts 8 Posters 3.4k Views 8 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      S Offline
      sparkwise
      wrote on last edited by
      #1

      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 current env file in Cloudron), but still no luck.

      I'm curious to hear if anyone else has been able to successfully connect Google Calendar.

      1 Reply Last reply
      1
      • nebulonN nebulon marked this topic as a question on
      • 3699n3 Offline
        3699n3 Offline
        3699n
        wrote on last edited by 3699n
        #2

        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.

        successful setup

        1 Reply Last reply
        1
        • 3699n3 Offline
          3699n3 Offline
          3699n
          wrote on last edited by
          #3

          After switching the Google OAuth Screen App from Internal to External with testing, adding my Google accounts to the list of testing users, I have been able to add all 3 of Google accounts across different orgs. Everything seems to be working well!

          1 Reply Last reply
          3
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #4

            Nice, thanks for sharing that. @sparkwise does it work for you then as well with this info?

            S 1 Reply Last reply
            2
            • R Offline
              R Offline
              robertdoneill
              wrote on last edited by
              #5

              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.

              girishG 1 Reply Last reply
              0
              • R robertdoneill

                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.

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #6

                @robertdoneill Use the filemanager to edit /app/data/env

                1 Reply Last reply
                0
                • nebulonN nebulon

                  Nice, thanks for sharing that. @sparkwise does it work for you then as well with this info?

                  S Offline
                  S Offline
                  sparkwise
                  wrote on last edited by
                  #7

                  @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!

                  1 Reply Last reply
                  1
                  • 3699n3 Offline
                    3699n3 Offline
                    3699n
                    wrote on last edited by
                    #8

                    @jessencan I never reseeded the app store after adding the GOOGLE_API_CREDENTIALS to env file. It's not necessary. Simply restart the App and sign in with your admin account. Then you can enable the Google Calendar integration in the admin settings.

                    1 Reply Last reply
                    1
                    • S sparkwise referenced this topic on
                    • girishG girish has marked this topic as solved on
                    • jdaviescoatesJ Offline
                      jdaviescoatesJ Offline
                      jdaviescoates
                      wrote on last edited by
                      #9

                      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:

                      image.png

                      I've no idea what I'm supposed to enter in those fields?

                      I use Cloudron with Gandi & Hetzner

                      M 1 Reply Last reply
                      0
                      • jdaviescoatesJ jdaviescoates

                        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:

                        image.png

                        I've no idea what I'm supposed to enter in those fields?

                        M Offline
                        M Offline
                        msbt
                        App Dev
                        wrote on last edited by
                        #10

                        @jdaviescoates you need credentials to use the API: https://cal.com/docs/introduction/quick-start/self-hosting/install-apps/google

                        jdaviescoatesJ 1 Reply Last reply
                        1
                        • M msbt

                          @jdaviescoates you need credentials to use the API: https://cal.com/docs/introduction/quick-start/self-hosting/install-apps/google

                          jdaviescoatesJ Offline
                          jdaviescoatesJ Offline
                          jdaviescoates
                          wrote on last edited by jdaviescoates
                          #11

                          @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:

                          f12d6a1a-101d-4255-90c2-de1891b8b41c-image.png

                          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:

                          Screenshot from 2023-10-06 10-25-57.png

                          I use Cloudron with Gandi & Hetzner

                          jdaviescoatesJ 1 Reply Last reply
                          0
                          • jdaviescoatesJ jdaviescoates

                            @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:

                            f12d6a1a-101d-4255-90c2-de1891b8b41c-image.png

                            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:

                            Screenshot from 2023-10-06 10-25-57.png

                            jdaviescoatesJ Offline
                            jdaviescoatesJ Offline
                            jdaviescoates
                            wrote on last edited by
                            #12

                            @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 🤦 )

                            I use Cloudron with Gandi & Hetzner

                            jordankruegerJ 1 Reply Last reply
                            0
                            • jdaviescoatesJ jdaviescoates

                              @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 🤦 )

                              jordankruegerJ Offline
                              jordankruegerJ Offline
                              jordankrueger
                              wrote on last edited by
                              #13

                              @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???

                              1 Reply Last reply
                              1
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Bookmarks
                                • Search