0
votes

I have a bot that consists of a Facebook Messenger connected to my bot code via the Microsoft Bot Framework. The bot works fine in the webchat, however on Facebook Messenger only about 1/3 of my messages get delivered to the bot.

That means that I have to send "hi" three or four times before the bot answers me once. Before it answers, the message shows as undelivered. There is nothing in the Bot Framework log in the web interface at dev.botframework.com, and my bot code (running on Azure) doesn't even receive anything from the bot framework - no HTTPS request whatsoever. When it does receive something (which, again, is about 1/3 of the times), the bot answers properly.

In facebook settings, I am using the standard endpoint (https://facebook.botframework.com/api/v1/bots/[my bot name]).

It just seems that most messages are somehow lost between Facebook and Bot Framework, and never reach my bot code.

There is no logging on the Facebook side so I'm out of ideas how to debug - there are no traces of any errors anywhere.

Update: the problem seems to occur only with bots registered using the Microsoft's new method of registering bots via Azure Portal. Bots registered at dev.botframework.com don't seem to be affected.

1
haven't considered that because my bot code simply doesn't receive incoming HTTPS requests from the Bot Framework server when a message is received, and my other bots are working normally. - user6269864

1 Answers

0
votes

In case the application is hosted in an Azure WebApp or Azure Function App, please turn on Always On for the application. Might be when you call the Bot API, it switches it from stand by mode to On, that might come with some latency since Microsoft idles it's WebApp by default. And by default, Always On is kept to OFF. Refer here to turn On , Always ON.

If you have not hosted the Bot Framework in Azure, then it might be a different issue altogether.