Registering Bot on Facebook Messenger shows Error as Status with no Details
I am registering my bot (created through Microsoft's bot Developer framework) on Facebook Messenger, however, after successful authentication, I am receiving an error as the status with no details. Any pointers please ?
I'd like to second the report above. Below are the steps I took:
-Created a bot using vanilla solution from the blog. -Deployed it to azure websites. -Tested chat using chat emulator (with deployed site) and it worked fine. -registered bot on FB Messenger as a app, tied it with fb page exactly as per instructions. -authenticated app with FB successfully. -started sending messages to page and kept getting "Method not allowed" as per screenshot. -Enabled/disabled [BotAuthentication], re-deployed and tested but same result. -Tried with/without HTTPS still same result. -Checked Operation Logs to see a rule appear under ALERT called "ForbiddenRequests {appname}"
Please advise next steps?
Adding further to above, just tried to integrate with Slack which went through fine but when I talk to the bot, it returns the same message as above. Either I am doing something fundamentally wrong or it may be a bug? Please advise.
Your web service is rejecting POST as a method. This is either because you are not configured to allow POST or there is something in between which is blocking POST (like a proxy server)
Try doing a POST directly to your service using a tool like POSTMAN (chrome)
Hi Tom,
Thanks for your response :+1: I tried several environments and checked firewall, CORS etc, still no go :( Any further suggestions?
Much appreciate you looking into this.
Chitrang
This is happening for me. All of my other channels are working correctly but Facebook is still showing as "Error"
Please include your botid with your communications so we can better assist you.
@tomlm my botid is roboadvisorprototype
BTW: If you add an application insights key to your bot registration we will log these events and you will be able to see them.
Your bot is throwing an exception.
"exceptionMessage": "invalid need: expected Wait, have Done",
"exceptionType": "Microsoft.Bot.Builder.Internals.Fibers.InvalidNeedException",
"stackTrace": "
at Microsoft.Bot.Builder.Internals.Fibers.Wait1.ValidateNeed(Need need) at Microsoft.Bot.Builder.Internals.Fibers.Wait1.Microsoft.Bot.Builder.Internals.Fibers.IWait.Post[D](D item)
at Microsoft.Bot.Builder.Dialogs.Internals.DialogContext.
--- 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.Builder.Dialogs.Internals.Extensions.
--- 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.Builder.Dialogs.Conversation.
--- 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.Builder.Dialogs.Conversation.
--- 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 notarobot.MessagesController.
otarobot
otarobot\Controllers\MessagesController.cs:line 28
--- End of stack trace from previous location where exception was thrown
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at notarobot.MessagesController.
otarobot
otarobot\Controllers\MessagesController.cs:line 35
--- 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.Threading.Tasks.TaskHelpersExtensions.
--- 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.Web.Http.Controllers.ApiControllerActionInvoker.
--- 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.Web.Http.Controllers.ActionFilterResult.
--- 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.Web.Http.Dispatcher.HttpControllerDispatcher.
@tomlm but why would it work on all of the other channels and only throw this on Facebook?
@DavePilks my solution is delete de bot and create a new, is working fine now.
I suspect you had bad data state which was causing your bot to throw an exception. Deleting bot and re-registering your bot is rather heavy hammer to use to fix it. Reseting your data with /deleteprofile command is better solution
@tomlm I tried that, but re-register was only solution that solved the problem :(
@DavePilks BotData is per user per channel, so if he had bad data for the user he was testing with, he would have continued to get a repeated error on that channel. Are you also having the same problem?