5
votes

I'm developing a chatbot using Microsoft.Bot.Builder v3.15.2.2, QnA Maker (preview mode, aka 'old') and QnAMakerDialog (from Microsoft.Bot.Builder.CognitiveServices v1.1.7). I'm using Direct API as a channel and BotFramework-WebChat to embed my chatbox in a web page. I've also implemented a custom bot data store to persist the bot's state.

From time to time (I cannot establish a pattern), during a conversation with the bot, I receive the following error:

Microsoft.Bot.Connector.ErrorResponseException: Operation returned an invalid status code 
'Unauthorized' at Microsoft.Bot.Connector.Conversations.
<ReplyToActivityWithHttpMessagesAsync>d__9.MoveNext() --- End of stack trace from previous 
location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.
ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.
HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Bot.Connector.
ConversationsExtensions.<ReplyToActivityAsync>d__9.MoveNext() --- End of stack trace from 
previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.
TaskAwaiter`1.GetResult() at UCB.ChatBot.Bot.Controllers.MessagesController.<Post>d__3.
MoveNext() in [...]Bot\Controllers\MessagesController.cs:line 39

After this error shows up, the bot keeps replying 'Sorry! Not able to match any of the options.' or, keeps giving you an answer to a question asked way before, in the beginning of the conversation. A Ctrl + F5 fixes this issue and the bot returns to the expected behavior.

This happens sporadically - as I said, I cannot establish a pattern or reproduce it. Maybe once or twice a day or a week.

Any thoughts or hints are very welcomed.

1
Hi Diana, this is a known issue with the SDK we are actively working on a fix for. The next package we release should have a fix for this, no ETA at this time.D4RKCIDE
Jason, thank you very much for your reply!Diana

1 Answers

4
votes

We have released a new package 3.15.2.3 that we believe addresses this issue. Please let us know if you are still experiencing this issue after upgrading by commenting in this GitHub issue on the botbuilder repository