whatsapp-api icon indicating copy to clipboard operation
whatsapp-api copied to clipboard

Webhook stops working

Open ejdoming opened this issue 1 year ago • 7 comments

When I start the service, the webhook runs well. But after an undetermined amount of time, it stops working. Is anyone else experiencing this? Ps: I am running with docker.

ejdoming avatar Sep 18 '24 18:09 ejdoming

None of my webhooks work. I enter the URL and nothing gets there. I'm also using docker.

klawdyo avatar Sep 19 '24 08:09 klawdyo

None of my webhooks work. I enter the URL and nothing gets there. I'm also using docker.

In this case, the problem might be in the settings. Check the environment variables related to webhooks. Run exec /bin/bash to open a terminal in your container, and try accessing the endpoint using curl from within it.

ejdoming avatar Sep 19 '24 14:09 ejdoming

This my settings. Both are correct. I have tested with curl in my local machine, linux 22, and from my vps.

API_KEY=XXXXXXXXXXXXXXXXXXXXXXXX
BASE_WEBHOOK_URL=https://webhook.site/XXXXXXXXXXXXXXXXXX
DISABLED_CALLBACKS=
ENABLE_LOCAL_CALLBACK_EXAMPLE=false
ENABLE_SWAGGER_ENDPOINT=true
MAX_ATTACHMENT_SIZE=10000000
PORT=3000
RATE_LIMIT_MAX=1000
RATE_LIMIT_WINDOW_MS=1000
RECOVER_SESSIONS=true
SESSIONS_PATH=./sessions
SET_MESSAGES_AS_SEEN=false
WEB_VERSION='2.2328.5'
WEB_VERSION_CACHE_TYPE=none

Inside docker, I don't have curl. Is it required?

klawdyo avatar Sep 21 '24 12:09 klawdyo

This my settings. Both are correct. I have tested with curl in my local machine, linux 22, and from my vps.

API_KEY=XXXXXXXXXXXXXXXXXXXXXXXX
BASE_WEBHOOK_URL=https://webhook.site/XXXXXXXXXXXXXXXXXX
DISABLED_CALLBACKS=
ENABLE_LOCAL_CALLBACK_EXAMPLE=false
ENABLE_SWAGGER_ENDPOINT=true
MAX_ATTACHMENT_SIZE=10000000
PORT=3000
RATE_LIMIT_MAX=1000
RATE_LIMIT_WINDOW_MS=1000
RECOVER_SESSIONS=true
SESSIONS_PATH=./sessions
SET_MESSAGES_AS_SEEN=false
WEB_VERSION='2.2328.5'
WEB_VERSION_CACHE_TYPE=none

Inside docker, I don't have curl. Is it required?

It`s required for testing only

ejdoming avatar Sep 21 '24 23:09 ejdoming

So where is the error?

klawdyo avatar Sep 22 '24 00:09 klawdyo

I have two computers with Windows 11, Node 22 and PM2. They have been running since May of this year and one of them no longer triggers the webhook, it does not send any data, it does not even call the URL that was previously configured and working. I have not updated anything, nor changed the configuration, both computers work to send Whatsapp without problems, but only one of them does not have the webhook working.

gabrielaltea avatar Oct 01 '24 08:10 gabrielaltea

To solve this issue, I forked the project and modified the code to write the webhook data directly to the database.

ejdoming avatar Oct 01 '24 12:10 ejdoming