microsoft / BotFramework-Services

Microsoft Bot Framework Services
Creative Commons Attribution 4.0 International
38 stars 11 forks source link

Only Facebook channel not working #6

Closed blueelvis closed 6 years ago

blueelvis commented 6 years ago

Bot Info

Issue Description

The issue which is happening is that whenever a message is sent to the bot from Facebook messenger, it seems to be received by the Azure Function on the backend but then nothing happens. Whereas, if this is tried via Webchat or Emulator, it works fine.

It stopped responding suddenly and it was working earlier fine. Any idea what could be wrong? We haven't touched any configuration as well when it stopped responding.

EricDahlvang commented 6 years ago

Have you tried debugging locally?
https://blog.botframework.com/2017/10/19/debug-channel-locally-using-ngrok/

Do you have Application Insights setup?
bot: https://docs.microsoft.com/en-us/azure/bot-service/bot-service-resources-app-insights-keys?view=azure-bot-service-4.0 web app: https://docs.microsoft.com/en-us/azure/application-insights/app-insights-nodejs

Have you checked the web app's diagnostic logs?
https://docs.microsoft.com/en-us/azure/app-service/web-sites-enable-diagnostic-log

blueelvis commented 6 years ago

@EricDahlvang -- As I said above, it works fine locally using the emulator in Debug mode.

I have checked App Insights and there isn't any error coming up on passing a message from Facebook. I see that the trace is generated when a message comes from FB but no error.

Yes, I have checked them as well. The function exits successfully.

EricDahlvang commented 6 years ago

There are numerous things that can cause a Facebook bot to stop responding as expected (even just changing a password: https://stackoverflow.com/questions/46598106/facebook-bot-stopped-working-after-password-reset ) The suggestions I've made will hopefully help you obtain more information about the underlying error. The emulator does not use the Bot Framework Facebook Connector Service, so it behaves differently and it is not likely to see the same issues when running locally. But if you run the bot locally, use ngrok, change the messaging endpoint, and message the bot from Facebook Messenger, you should be able to get more information.

Please ensure your bot's Facebook Page Access Token is correct. (this is sometimes changed by Facebook, and can cause your bot to no longer function properly)

image

blueelvis commented 6 years ago

@EricDahlvang - I have checked the tokens last week and they were the same. I am asking the creator of the app whether the password was changed or not. Meanwhile, if the password hasn't changed, what would be the other methods to troubleshoot? Asking because the bot created for the Staging environment from the same FB account is working fine.

blueelvis commented 6 years ago

@EricDahlvang -- The issue has been resolved. For some reason, my account (administrator) in Facebook app is having issues while trying to connect the app and the bot. The other administrator performed the same steps and it was successful. Do note that both me and the other person had same privileges everywhere.

Closing this.