T
Twenty4d ago
Denis

Webhook not working

Hello, I am using the open source version and its wonderful, now as we want to keep contacts in sync with the latest changes in the crm, we started to impleement a webhook strategy for people and companies but, the webhook dont trigger at all. Any ideea what we can do regarding this?
No description
No description
No description
30 Replies
Denis
DenisOP4d ago
p.s the issue remain even if I chosee all events to be triggered.
charles
charles4d ago
@martmull 🙂
martmull
martmull4d ago
Hey @Denis , is your worker running?
martmull
martmull4d ago
worker is needed for webhooks to work
Denis
DenisOP4d ago
Hmm, fair enough, mostlikely It was never addded in the docker-compose file as I deployed it via coolify. - I will check and implement it - I will come back with a answer regarding this. thanks 💫
Denis
DenisOP4d ago
I was looking in the worker log and eveything its working as it should (or at least, no error appear) - any idea on how to fix this?
No description
Denis
DenisOP4d ago
Google Docs
version: '3
version: '3.9' services: twenty: image: 'twentycrm/twenty:latest' environment: - SERVICE_FQDN_TWENTY_3000=domain.tld - SERVER_URL=https://domain.tld - FRONT_BASE_URL=https://domain.tld - ENABLE_DB_MIGRATIONS=true - 'CACHE_STORAGE_TYPE=${CACHE_STORAGE_TYPE:...
martmull
martmull3d ago
you should be able to see worker log lines like this one
No description
martmull
martmull3d ago
can you explore your database? What contains your <workspace_schema>.webhook table?
Denis
DenisOP3d ago
hmm. in the worker image I have just (see the txt attached)
Denis
DenisOP2d ago
@martmull I was keep looking in the logs to see what I am missing and I see: 2024-11-19T11:55:11.318508295Z ForbiddenException: Forbidden resource 2024-11-19T11:55:11.318512252Z at canActivateFn (/app/node_modules/@nestjs/core/helpers/external-context-creator.js:157:23) 2024-11-19T11:55:11.318525006Z at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2024-11-19T11:55:11.318528222Z at async target (/app/node_modules/@nestjs/core/helpers/external-context-creator.js:73:31) 2024-11-19T11:55:11.318531187Z at async Object.currentUser (/app/node_modules/@nestjs/core/helpers/external-proxy.js:9:24) 2024-11-19T11:55:11.318534143Z at async field.resolve (/app/node_modules/@envelop/on-resolve/cjs/index.js:36:42) 2024-11-19T11:55:11.318537079Z at async /app/node_modules/@graphql-tools/executor/cjs/execution/promiseForObject.js:18:35 2024-11-19T11:55:11.318540004Z at async Promise.all (index 0) { 2024-11-19T11:55:11.318542839Z path: undefined, 2024-11-19T11:55:11.318545655Z locations: undefined, 2024-11-19T11:55:11.318548500Z extensions: { code: 'INTERNAL_SERVER_ERROR', response: 'Forbidden resource' } 2024-11-19T11:55:11.318551455Z } 2024-11-19T11:55:11.318554201Z ] I see at process.processTicksAndRejections (node:internal/process/task_queues:95:5), it can be the reason why the worker is not triggering?
martmull
martmull2d ago
Mmh, is that a worker log error? It looks like a server error
Denis
DenisOP2d ago
Well, the worker dont show any error, just modules that were initialized.
martmull
martmull2d ago
so, to sumup, your worker is running, you have created a webhook that send POST payload to webhook.site/... on C_UD people, and when you create a person, you don't see anything, either in logs or in webhook.site Can you double check the MESSAGE_QUEUE_TYPE=pg-boss env variable?
martmull
martmull2d ago
what does it mean when defined like this? - 'MESSAGE_QUEUE_TYPE=${MESSAGE_QUEUE_TYPE:-pg-boss}'
No description
Denis
DenisOP2d ago
Yes, thats right, I will hardcode the variable in docker-compose as well but, small chances for this to be the issue as in the same way I send other variables like app_secret, SERVER_URL, FRONT_BASE_URL and ther est
No description
Denis
DenisOP2d ago
I changed it to: " - 'MESSAGE_QUEUE_TYPE=pg-boss'" and the issue remain the same.
martmull
martmull2d ago
ok, server and workers need to be restarted to take into account new environment variables think might be the issue in fact, as MESSAGE_QUEUE_TYPE now defaults to bull-mq, and bull-mq needs redis
Denis
DenisOP2d ago
Hm, I was reloading the docker images everytime but fair enough, I will give this a shot as well, p.s thank you for your kindness, we reached 20 messages in this thread 🫶 sadly the issue still persist 😦
martmull
martmull2d ago
@charles any idea on that?
Marcelo Tate
Marcelo Tate2d ago
I have the same issue!!
charles
charles2d ago
@martmull @Marcelo Tate @Denis pg-boss is depreciated, could you guys switch to bull-mq? (you should have redis already present in your docker-compose on latest versions) you are on v0.32 right? (there is actually an issue in our docker build commands and v0.32 container actually containers v0.33-canary
Denis
DenisOP2d ago
nope, we used the :latest tag in the docker-compose for all the images.
No description
charles
charles2d ago
ok! It's fine 🙂 this should point to the v0.32 but we have an issue with the build commands so you get the v0.33 you should not have any issue with webhooks on this version could you make sure to use bull-mq? MESSAGE_QUEUE_TYPE=bull-mq this is what your docker-compose should look like now: https://github.com/twentyhq/twenty/blob/main/packages/twenty-docker/docker-compose.yml And associated .env: https://github.com/twentyhq/twenty/blob/main/packages/twenty-docker/.env.example if you don't specify MESSAGE_QUEUE_TYPE it will default to bull-mq Note: keep your current twenty-postgres container, no need to upgrade to twenty-postgres-spilo yet
Marcelo Tate
Marcelo Tate23h ago
I gave it a try but still not working 😦
charles
charles23h ago
@Marcelo Tate let's schedule a call to fix this with you, when would you be availble?
Marcelo Tate
Marcelo Tate22h ago
Sure! Im available now ill send you a pm 🙂
Denis
DenisOP20h ago
This is the same for me as well :/
charles
charles19h ago
we have a call at 5PM Paris time tomorrow, would you like to join? We will be on Discord #voice channel
Want results from more Discord servers?
Add your server