twentyhq / twenty

Building a modern alternative to Salesforce, powered by the community.
https://twenty.com
GNU Affero General Public License v3.0
15.01k stars 1.48k forks source link

Error Message When Click on Connect WIth Google Button #5993

Open weir1 opened 2 weeks ago

weir1 commented 2 weeks ago

Bug Description

{"statusCode":404,"message":"Google apis auth is not enabled","error":"Not Found"} getting above message after I entered into setting & trying to add my email

Expected behavior

It should let me add my gmail account

...

I tried installation via a single click script

greptile-apps[bot] commented 2 weeks ago

The error message 'Google apis auth is not enabled' is thrown in the GoogleAPIsProviderEnabledGuard. Ensure that the environment variables MESSAGING_PROVIDER_GMAIL_ENABLED and CALENDAR_PROVIDER_GOOGLE_ENABLED are set to true.

References

/packages/twenty-server/src/engine/core-modules/auth/guards/google-apis-provider-enabled.guard.ts /packages/twenty-server/src/engine/core-modules/auth/controllers/google-apis-auth.controller.ts

Ask Greptile

weir1 commented 2 weeks ago

The error message 'Google apis auth is not enabled' is thrown in the GoogleAPIsProviderEnabledGuard. Ensure that the environment variables MESSAGING_PROVIDER_GMAIL_ENABLED and CALENDAR_PROVIDER_GOOGLE_ENABLED are set to true.

References

/packages/twenty-server/src/engine/core-modules/auth/guards/google-apis-provider-enabled.guard.ts /packages/twenty-server/src/engine/core-modules/auth/controllers/google-apis-auth.controller.ts

Ask Greptile

I am using twenty via script aka docker root@twenty:~/twenty# ls -la total 16 drwxr-xr-x 2 root root 4096 Jun 23 15:02 . drwx------ 6 root root 4096 Jun 23 15:01 .. -rw-r--r-- 1 root root 1072 Jun 23 15:02 .env -rw-r--r-- 1 root root 2761 Jun 23 14:23 docker-compose.yml root@twenty:~/twenty#

but I didnt find anywhere to enable these settings in .env file or docker-compose file

how to access those settings so that I can make them true

weir1 commented 2 weeks ago

I added these 2 lines in .env MESSAGING_PROVIDER_GMAIL_ENABLED=true CALENDAR_PROVIDER_GOOGLE_ENABLED=true

also in compose file i added MESSAGING_PROVIDER_GMAIL_ENABLED: ${MESSAGING_PROVIDER_GMAIL_ENABLED} CALENDAR_PROVIDER_GOOGLE_ENABLED: ${CALENDAR_PROVIDER_GOOGLE_ENABLED}

when I run twenty then I am getting This page isn’t working s currently unable to handle this request. HTTP ERROR 500

volfadar commented 1 week ago

I added these 2 lines in .env MESSAGING_PROVIDER_GMAIL_ENABLED=true CALENDAR_PROVIDER_GOOGLE_ENABLED=true

also in compose file i added MESSAGING_PROVIDER_GMAIL_ENABLED: ${MESSAGING_PROVIDER_GMAIL_ENABLED} CALENDAR_PROVIDER_GOOGLE_ENABLED: ${CALENDAR_PROVIDER_GOOGLE_ENABLED}

when I run twenty then I am getting This page isn’t working s currently unable to handle this request. HTTP ERROR 500

i suspect you didn't fill the AUTH_GOOGLE_CLIENT_ID, AUTH_GOOGLE_CLIENT_SECRET, and AUTH_GOOGLE_APIS_CALLBACK_URL. https://github.com/twentyhq/twenty/blob/158e7a31f4ea3d02367db2599f43e9176d95a078/packages/twenty-server/src/engine/core-modules/auth/strategies/google-apis.auth.strategy.ts#L56-L62

weir1 commented 1 week ago

I added these 2 lines in .env MESSAGING_PROVIDER_GMAIL_ENABLED=true CALENDAR_PROVIDER_GOOGLE_ENABLED=true also in compose file i added MESSAGING_PROVIDER_GMAIL_ENABLED: ${MESSAGING_PROVIDER_GMAIL_ENABLED} CALENDAR_PROVIDER_GOOGLE_ENABLED: ${CALENDAR_PROVIDER_GOOGLE_ENABLED} when I run twenty then I am getting This page isn’t working s currently unable to handle this request. HTTP ERROR 500

i suspect you didn't fill the AUTH_GOOGLE_CLIENT_ID, AUTH_GOOGLE_CLIENT_SECRET, and AUTH_GOOGLE_APIS_CALLBACK_URL.

https://github.com/twentyhq/twenty/blob/158e7a31f4ea3d02367db2599f43e9176d95a078/packages/twenty-server/src/engine/core-modules/auth/strategies/google-apis.auth.strategy.ts#L56-L62

No I didnt should I add these in .env or compose file?

weir1 commented 1 week ago

OK Now I can see authentic with google but after connecting it shows 404 off the beaten path

weir1 commented 1 week ago

I added these 2 lines in .env MESSAGING_PROVIDER_GMAIL_ENABLED=true CALENDAR_PROVIDER_GOOGLE_ENABLED=true also in compose file i added MESSAGING_PROVIDER_GMAIL_ENABLED: ${MESSAGING_PROVIDER_GMAIL_ENABLED} CALENDAR_PROVIDER_GOOGLE_ENABLED: ${CALENDAR_PROVIDER_GOOGLE_ENABLED} when I run twenty then I am getting This page isn’t working s currently unable to handle this request. HTTP ERROR 500

i suspect you didn't fill the AUTH_GOOGLE_CLIENT_ID, AUTH_GOOGLE_CLIENT_SECRET, and AUTH_GOOGLE_APIS_CALLBACK_URL. https://github.com/twentyhq/twenty/blob/158e7a31f4ea3d02367db2599f43e9176d95a078/packages/twenty-server/src/engine/core-modules/auth/strategies/google-apis.auth.strategy.ts#L56-L62

No I didnt should I add these in .env or compose file?

I am attaching a my screen to show exact issue please check

Animation

weir1 commented 1 week ago

@volfadar please help

volfadar commented 1 week ago

I'm sorry i can't help right now, and now i'm not actively working with twenty right now.