[Skype For Business, Question] Double replies using Skype for Business on Windows Phone client?
System Information
- SDK Language: .NET
- SDK Version: 3.9
- Development Environment: Azure Bot Service
Bot Info
- Connected channels: Skype, Web Chat, Skype for Business, Cortana
Issue Description
I'm seeing double responses from the bot when using Skype for Business on a Windows Phone, for almost every response issued by the bot. For example, the bot will send a reply prior to doing a search, then send the results of the search shortly after. Almost invariably, the please wait and the results are sent, followed after a delay then the same please wait and the results again.
The iOS client seems to be have the same issue, but rather less often.
I've not yet seen this behaviour in Skype for Business on Windows, or indeed other channels in general.
I'm wondering if it relates to the bot 'waking up' after a lull in conversations, as sometimes a question following up a previous double response works correctly.
Reason for Question
My query is really to determine if this is a issue under my control (i.e. is it coding issue that needs solving), or is it a quirk of the channel or client software (i.e. not under my control).
The behaviour occurred while showing a business sponsor our progress, so hoping to feedback with an explanation.
Expected Behavior
To get exactly one response in the client application, for each response sent from the bot.
Is there any way you could share your code so we can take a look?
Jason, thanks for replying.
Even this simple code will reply with 'You selected....' twice:
[LuisIntent("Root.IWantTo")]
public async Task IWantTo(IDialogContext context, LuisResult result)
{
IMessageActivity activity = context.MakeMessage();
activity.Text = "You selected the IWantTo intent";
await context.PostAsync(activity);
context.Wait(MessageReceived);
}
Mark
I am unable to repro this as I do not have a windows phone to test with. Looking at your code the only thing I can think of trying would be to maybe use CreateReply() instead of MakeMessage()
We have encounter this problem.
If the client is using Skype on iOS and send one message, our micro-service would receive that message twice. Therefore, our microservice would replay (twice) and the client would see two response from our microservices.
One hypothesis is that the MS bot is waiting for the sendTyping signal immediately after sending the message to the microservice. Since it doesn't receive anything in a time frame, it timeout and resend the message.
If ensuring that sendTyping flag is send to every message received from the MS bot, immediatly, do not solve the problem then there could be another solution. This solution would be to treat this problem as the button bouncing (aka. contact bounce) issue. When you receive two identical messages from the MS bot, check the time frame between them. If the time frame between both messages is short, then ignore the second message.
I know, it is ugly as hell. I will post a solution if I find it.
This happens on Android, Mac, iOS clients as well. Can you guys please resolve this asap.
Thank you for opening an issue against the Bot Framework SDK v3. As part of the Bot Framework v4 release, we’ve moved all v3 work to a new repo located at https://github.com/microsoft/botbuilder-v3. We will continue to support and offer maintenance updates to v3 via this new repo.
From now on, https://github.com/microsoft/botbuilder repo will be used as hub, with pointers to all the different SDK languages, tools and samples repos.
As part of this restructuring, we are closing all tickets in this repo.
For defects or feature requests, please create a new issue in the new Bot Framework v3 repo found here: https://github.com/microsoft/botbuilder-v3/issues
For Azure Bot Service Channel specific defects or feature requests (e.g. Facebook, Twilio, Teams, Slack, etc.), please create a new issue in the new Bot Framework Channel repo found here: https://github.com/microsoft/botframework-services/issues
For product behavior, how-to, or general understanding questions, please use Stackoverflow. https://stackoverflow.com/search?q=bot+framework
Thank you.
The Bot Framework Team