Closed Enghouse-CCSP-PS closed 3 years ago
Transferring to the BotFramework-Services repo.
Hi @Enghouse-CCSP-PS
I'm not aware of anything which might be causing this, but it seems unlikely to be the Bot Builder sdk.
@Enghouse-CCSP-PS -
@Enghouse-CCSP-PS - Can you post any screenshots of what you're seeing in the Messenger window? Is the bot not responding or responding with an error message or what?
The issue presented itself like this Exception, other than the Facebook API error message not much to go on:
Microsoft.Rest.HttpOperationException: **Facebook API error**
at Microsoft.Bot.Connector.ErrorHandling.<HandleErrorAsync>d__2`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Bot.Connector.ConversationsExtensions.<ReplyToActivityAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
However, we have used the stack-trace to locate that the issue is coming from trying to set the Typing indicator (not new code for us):
var reply = ((Activity)activity).CreateReply();
reply.Type = ActivityTypes.Typing;
await connector.Conversations.ReplyToActivityAsync(reply);
When we comment this section out the subsequent Dialog works fine. I tried adding a 3s delay between Typing and subsequent Dialog, in case related to the speed between the 2 activities, but it seemed throw the same Exception ~0.5s after setting the Typing anyway.
@Enghouse-CCSP-PS
That's very strange that typing activities would suddenly start returning errors for you. Facebook typing indicators are working fine for me, and I've tested in a v4 bot and in Postman. It's possible that the problem is unique to the v3 SDK, but you will notice in the readme that v3 has been deprecated and long-term support has ended. There are some other possibilities besides the v3 SDK that could explain what's going wrong. Here are some troubleshooting steps for you to take:
Regardless of what happens, the general advice for v3 bots is always to migrate to v4.
@Enghouse-CCSP-PS - Are you still working on this?
Version
What package version of the SDK are you using. 3.12.2.4
Describe the bug
suddenly all our FB bot stop to work on FB channel with error Microsoft.Rest.HttpOperationException Facebook API error in app insight we see below log:
To Reproduce
Steps to reproduce the behavior: just start to chat to bot