Bot Framework Emulator (v4) not working - POST 202

匿名 (未验证) 提交于 2019-12-03 01:23:02

问题:

I recently created a chatbot using Microsoft Azure's Cognitive Services and Bot Framework, using as the main tool QnA Maker. After some weeks developing and even publishing the bot, I decided to go to the next steps and make some changes and optimizations that requires the bot running locally. I managed to download the source code from Azure's portal as a .zip file, using as IDE Visual Studio 2017 and using as my test tool Bot Framework Emulator (V4).

After some time (and a lot of issues, solved in Azure Bot Framework Emulator Error - System.ArgumentNullException: Value cannot be null), I finally made the code run locally. Still, I am being unable to properly communicate with it using Bot Framework Emulator. It seems to be connected, but everytime I send a message, I get no answer but a POST 202 directline.postActivity, as the image below shows:

As a consequence, I am unable to test my bot in the Bot Framework Emulator... Could anyone help me to find out what is going on? Thank you very much!

回答1:

To troubleshoot the issue, you could set the breakpoint in MessagesController and check if it can be hit, and debug your code to check if the message you sent can reach your QnAMakerDialog.

download the source code from Azure's portal as a .zip file, using as IDE Visual Studio 2017 and using as my test tool Bot Framework Emulator (V4).

I create a bot service using Question and Answer (C#) template on Azure portal and download the source code, then modify the code and run&test it on local host with Bot Framework Emulator, which works for me. You can compare my code with yours, or test my code with your QnA Maker knowledge base to check if it can work for you.

Test Result:



回答2:

When you're debugging locally, try commenting out the Azure Table Storage set up part of your code if you haven't already. This should solve your problem.

Or else, if you don't want to comment out your stuff, you can try this:

// Basically you need to check the environment if(process.env.BotEnv === 'prod') { bot.set('storage', tableStorage); }



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!