Bot Framework bot randomly doesn't answer messages - bots

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.

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.

Related

Talk to an Azure Cognitive services bot with a phone

I created an Azure bot with cognitive services, and enabled the direct speech client and skype channels.
I can talk to the bot using the Direct Speech Client application, but I would like to talk to it from my phone, via Skype. I mean place a call to it not text.
I know MS is deprecating the Skype and all its associated components but they are still available.
When I place a call to the bot i hear a MS Azure message saying "You cannot talk to this bot yet but we are working on it" Is there a way I can get it to work ?
I cannot find the documentation on Github either.
As said in the error message, they are working on it, so currently it is not available

ConversationUpdate not firing from Teams bot user added event NodeJs SDK v4

I've been trying to implement the preview version of Microsoft's BotFramework for NodeJS SDK v4 on Teams as mentioned here. I've set up the messaging endpoint in the Azure portal and I'm able to receive the message events just fine.
I've tried out other bots in the Teams Store such as Hipmunk and they seem to be able to proactively message the users as soon as they get added on to the work space.
I've been through the documentation already and I know that I would need to work upon a ConversationUpdate event that fires in the event of a bot user being added to a team, but unfortunately I haven't received any such events. I've wired it up to be able to receive it because the handlers do work when I test the bot in web chat on the Azure portal. Is this some sort of bug in the Teams client itself or is there any alternative documentation that I've been missing. Please let me know if any code samples or further links are required to aid you in helping me as this is a pretty critical integration for me and my company.

Facebook chatbot with node, express.js, ngrok and Dialogflow

I made this bot using express.js, node.js and ngrok. Its automatic answers are working fine, but this is happening only to my user, the user which created its facebook page, if other people message it, it won't respond.
I've already made it public, I have no idea what to do. What do I need to do so the bot respond to all users that message him?
I think its something about the Facebook configuration, because the bot is responding properly. How can I get help on this?
Before a Facebook app goes to live, you have to make sure by the facebook authority, the app is using data in an approved manner.
From your app dashboard, you have to submit the application for review.
Before you can switch your app to Live mode, we may need to make sure
that you will be using our products and data in an approved manner. To
achieve this goal, we require many apps to undergo App Review.
Without reviewing the application only the developers and the page associates can interact with the bot.
Check the docs here.

Slack messages do not reach Azure

So I have an issue to make the communication possible between Slack and BotFramework. I deploied once a bot on Slack to test the deployment and everything was working fine. I worked on another bot and when I try to deploy it there is no message reaching the bot on Azure.
Since I can not see errors on Azure or from Slack, I think my issue does not come from my code. What seems very strange is that I did not get any message from Slack telling me that the messages can not reach the bot and yet I can not see message reaching Azure.
I use this to install the bot on Slack https://learn.microsoft.com/en-us/azure/bot-service/bot-service-channel-connect-slack except that I did not suscribe to events which was working fine with my initial deployment.
I tried with a sample bot, I got the same issue. So I must be missing something about the configuration.
My bot is working fine with cortana and directline.
First thing I'd try is to find out if the problem is on the Slack side or the Bot Service side.
To test out the Bot Service side:
Have you tried running in the test chat?
Or tried debugging the bot service on your local machine?
If it helps, I've written up a little tutorial on how to debug a bot service.
Hope that helps!
Tim

New bot not answering messages in microsoft teams

I'm running a bot with Microsoft Teams and have it setup in Azure. It's a demo bot from the bot builder code Microsoft released. I'm pointing it to a local server that has ngrok running. This works fine when I test via Web Chat in Azure but it doesn't work at all when working with Teams.
The app sideloads properly and the manifest is accepted by teams. No response appears to be making it to the server. When I click to show the Bot Channels in Azure some kind of OPTIONS query is being sent to the server and the demo bot throws a 405 error.
The bot id is f22039b8-5400-4569-a0f2-5bdceb8431f2 but I can't talk to it in 1:1 chat either when I specify this ID.
There are no logs in Azure or teams- I don't see any errors, so I have no idea how to start debugging this.
This is a link to someone with the exact same question:
Bot not answering messages in microsoft teams
There is currently a bug in our bot registration code that is causing this. We are currently investigating its root cause.
As a workaround, add the Skype channel and the MS Teams channel to the bot.

Resources