Webhooks not sent in local setup

I tried setting webhooks in Settings to be sent to https://webhook.site to check @Skyfox675's problem with duplicated webhooks but upon setting them, no webhook was sent to specific address. From what I know, there's no need to set any kind of authorization as they're basically a callbacks. What am I setting wrong?
Webhook.site - Test, transform and automate Web requests and emails
Instantly generate a free, unique URL and email address to test, inspect, and automate (with a visual workflow editor and scripts) incoming HTTP requests and emails
41 Replies
charles
charles3mo ago
@ɃØĦɆᵾS do you have your worker running?
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
The app itself is running fine if that's what you mean by worker, I set the URL in UI, not in .env in twenty-server
charles
charles3mo ago
no I mean that for webhooks to work you shoud also run: - npx nx run twenty-server:worker in parallel with: - npx nx run twenty-server:start the worker is handling all async jobs (including webhooks!)
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Oh, no, it's not running, I'll check it and brb
charles
charles3mo ago
cool, that should be it!
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
I have running npx nx start in one terminal and run npx nx run twenty-server:worker in another but worker exits with no problems, I guess this shouldn't happen if it's supposed to be running in parallel Also tried running npx nx run twenty-server:start npx nx run twenty-front:start and npx nx run twenty-server:worker in separate terminals but again, worker exits after ~15 sec
charles
charles3mo ago
oh, are you running out of memory on your machine? Right now it's a nightmare: the front takes 6GB, the server 1.7GB and the worker 1.7GB too, I'm on a mission this week-end to get it back to some normal level and identify the issue npx nx run twenty-server:worker should stay up and running like npx nx run twenty-server:start is can you try to run npx nx run twenty-front:start in a terminal and npx nx run twenty-server:worker in another one You'll miss the server but it will confirm if you don't have enough memory for the 3 running together
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
No, I have way more memory than normal user needs 😄
charles
charles3mo ago
okay! could you share a screen of your npx nx run twenty-server:worker terminal?
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Sure, I can But what's weirder for me is a fact that I turned off server, run worker in different terminal and it "Successfully ran target"
charles
charles3mo ago
weird, could you share your screens?
charles
charles3mo ago
it should look like this
No description
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Meanwhile I'm testing webhooks on demo and found another bug 😆
charles
charles3mo ago
there is something wrong, your worker is triggering your server have you touched your configuration ? are you on main branch?
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Yes, I'm on main And by configuration, you mean .env in twenty-server?
charles
charles3mo ago
more nx stuff such as nx.json or project.json
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
No, I'm not nowhere near them, they're too scary for me
charles
charles3mo ago
haha oooh hold on I see that you are using MESSAGE_QUEUE_TYPE=sync which is the default but we are deprecating it do you have redis ? that would be the best setup if you can add it and then MESSAGE_QUEUE_TYPE=bull-mq
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Nope, only postgres
charles
charles3mo ago
is your postgres on docker or local?
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Postgres is in docker
charles
charles3mo ago
perfecg so can you also add a redis ? a basic redis would do it
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
To docker? Why not, I'll check how
charles
charles3mo ago
a redis container yes it's something I want to add by default in all configurations for self-host and production it improves a lot Twenty performance and it's super easy to setup
charles
charles3mo ago
$ docker run -d --name my-redis-stack -p 6379:6379 redis/redis-stack-server:latest and so your server can use it in your .env: REDIS_HOST=127.0.0.1 REDIS_PORT=6379 MESSAGE_QUEUE_TYPE=bull-mq this will set up your queue (processed by the worker) to use bull-mq which is using redis and if you want you can also use redis for cache: CACHE_STORAGE_TYPE=redis This week-end I will remove this sync driver and add redis to all default configurations
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Okay, I'm checking it, I had to create the bug https://github.com/twentyhq/twenty/issues/6726
GitHub
Missing creator's data in webhooks · Issue #6726 · twentyhq/twenty
Found on demo, probably reproducible on self-hosted Scenario: Log in Go to https://webhook.site/ and copy unique URL Go to Settings > Developers, add copied URL to webhooks Create any object (Pe...
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Now it works, geez
charles
charles3mo ago
interesting! thanks for reporting the issue, Jeremy will look into that next week
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
No problem, checked it already on self-host and I can't reproduce it there 🤔 Create an issue for updating the documentation for developers? I think it's important of these changes in case somebody will want to have webhooks working on self-hosted
charles
charles3mo ago
I will do this we! disconnecting for tonight! Have a great we @ɃØĦɆᵾS 🙂
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Thanks for the help and also, have a nice weekend! 👍
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
GitHub
Update dev's documentation for enabling webhooks on self-hoster · I...
Based on conversation in Discord server https://discord.com/channels/1130383047699738754/1276587741144154193 Right now, there's no documentation regarding enabling webhooks on self-hosted. As i...
Skyfox675
Skyfox6753mo ago
Hey @ɃØĦɆᵾS sorry just now seeing this been swamped today, glad to see you got it fixed!
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Chill and thanks (but still that's thanks to @charles help)
Skyfox675
Skyfox6753mo ago
@charles I can take a run at the doc updates if it's helpful
Skyfox675
Skyfox6753mo ago
@ɃØĦɆᵾS I just finished a fairly basic N8n workflow that triggers on incoming webhook, uses a few If's to filter eventName's and IP CIDR's, then leverages the TwentyCRM Rest API a few times and creates a Trello card from a template. Not sure if direct import will work for you or not, since you won't have access to the credential objects but you can give this a try to get up and running if it helps:
ɃØĦɆᵾS
ɃØĦɆᵾSOP3mo ago
Nice, but you should at least do some basic anonymization, just saying 🙂 And let's move to other thread as I got my problem solved @charles something to take care of as I just found out: Redis must support rebuilding from schema, I had to reset whole Postgres due to shenanigans, launched Redis again and I got many errors about wrong workspace but when I added webhook URL to new workspace, it literally spammed my terminal despite not sending webhook
Skyfox675
Skyfox6753mo ago
Ehhh it's one of a 100 emails, they're disposable 😎 thanks for pointing it out though appreciate it!
charles
charles3mo ago
interesting!
Want results from more Discord servers?
Add your server