Messenger Platform: Webhook failing

764 views Asked by At

My question is kinda like this.

Your Webhooks subscription for callback URL https://{domain}/bot has not been accepting updates for at least 2 days. Please verify that your callback server is functioning. Visit our reference documentation to learn how to update your callback URL.

If your callback URL is still failing after 12 hours your subscription will be disabled. To reactivate, just make a POST request with the same parameters or visit the Webhooks tab in the app dashboard.

However, I am very sure that I've returned status 200 to every request, here is part of my code:

router.post("/bot", (req, res) => {
    Promise.map(req.body["entry"], eachEntry => {
        return Promise.map(eachEntry["messaging"], eachMessage => {
           // some postback and quick_replies handling, send messages...
        });
    })
    .then(() => res.sendStatus(200))
    .catch(err => {
        console.error(err.stack);
        res.sendStatus(200);
    });
});

I only subscribed events like messages, messaging_postbacks , message_deliveries. I think even there are something I didn't handle, these requests will get status 200 eventually.

But what I don't understand is, every time I received the webhook failing alert, I didn't see errors or anything which wasn't returned as status 200 in the log.

I also tried change res.sendStatus(200) to res.end() or res.status(200).end() but it didn't help neither.

Thank you in advance!

1

There are 1 answers

0
Виктор Иванов On BEST ANSWER

I have been dealing with this issue for the past 2 weeks and it was driving me crazy as I knew that all is working well on our server and the webhook response was always 200 OK...

So I found this thread: https://developers.facebook.com/bugs/594288957423128/ ... and apparently a lot of people are having this issue. Turns out it was a fault on the Messenger Platform side.

Here is what one from the facebook team wrote:

Hi Eugene and others,

We have a fix for this issue and it will be pushed next Tuesday. Stay tuned.

Shireesh 5 hours ago · (4 Jan 2017)

So fingers crossed... the issue should be resolved soon! ;)