I am running a bot using Bot Framework + C#, deployed to Azure, connected to Facebook Messenger.
Today my code started randomly throwing this exception, in different scenarios and in response to different user inputs. I can't seem to pinpoint the exact reproducible scenario. The line that throws the exception is await context.PostAsync(message);.
SendActivityToUserAsync FAILED: {"error":{"message":"(#-1) Unexpected internal error","type":"OAuthException","code":-1,"error_subcode":2018012,"fbtrace_id":"FN44Viuxibg"}} at Microsoft.Bot.Connector.ErrorHandling.d*2`1.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.d*7.MoveNext() --- End of stack trace from previous location...
When I go through the same scenario in the bot, the error may or may not happen again. It seems completely random.
What could be the reason that facebook returns OAuthException?