7
votes

I am working on Bot framework technology, recently Microsoft announced the new version (V3) of bot. I was already developed bots using old version, now I am trying to upgrade my bots to newer version. For that everything working fine but after published my bot into azure, then by using the publish URL I am trying to test in bot framework channel emulator (3.0.0.54) it gives always "500, internal server error". But when I added skype channel to my bot then it will working fine.

Only the problem is when I am testing in bot framework channel emulator with Published URL of my bot application, then only I got the error as "Internal server error".

I think there may be problem with latest version bot framework channel emulator

7
checked with port number and the URL?SilentCoder
I already checked those details. that details are correct from my side.Pradeep
Did this work with the old version? I'm not sure the emulator can be used for non-local testing. To my understanding, the emulator bypasses the Bot Connector, so I don't think your service can actually send messages back to it (activity.ServiceUrl will be localhost).Thegaram
I have the same problem, and it used to work :)Michael Washington
yes its working with old version fine. and my bot send messages back to it, in old version.Pradeep

7 Answers

4
votes

ngrok http -host-header=rewrite 9000

screenshot

  • As seen in screenshot copy Forwarding URL with https and paste it in Emulator url
  • Emulator port should be in 9000 and emulator Url should contain ngrok forwarding Https URL

Note :ngrok should be in running state .if your getting same 500 error while trying next time please start from step 1. For more reference .https//docs.botframework.com/en-us/tools/bot-framework-emulator/#navtitle

2
votes

I discovered that a single public method apart from Post in Controller makes Bot Framework throw 500 InternalServerError. Simply keep only private and public Post method in your Controller and that should fix it.

1
votes

Druing the debugging, you just dont disable the appid and password, rather make them blank and rebuild the same , you will be able to debug via emulator Keep like given below

Dont just disable the BotId,AppID, Password rather make them blank like given below

<add key="BotId" value="" />
<add key="MicrosoftAppId" value="" />
<add key="MicrosoftAppPassword" value="" />
1
votes

ngrok solution did not work for me. I just commented the botAuthentication and then it worked for me locally.

  //[BotAuthentication]
    public class MessagesController : ApiController
    {
0
votes

They just released an updated version of the framework (3.0.1) that addressed a few issues introduced with 3.0.0. Try updating to 3.0.1 and see if that will solve your issue (it fixed mine). source

You may also need to follow this tutorial and use ngrok to allow you to access your published chatbot from the emulator. There is a screenshot in that tutorial that shows the BotId being used in the emulator, its not required so you can omit it.

0
votes

The developer posted an answer on this thread.

Basically you can type 'disable' to disable AppId/AppPassword

0
votes

It seems that if you deploy your bot to the cloud and try to test it from the emulator it will give this error. The emulator seemed to work in 2 cases:

1- Localhost with security disabled (remove appid and app password)

2- localhost with security enabled (add appid and app password)

both endpoints via http only because it's localhost. If you deploy to the cloud you can test it in the emulator available on the Bot Portal. Make sure the endpoint for the hosted bot is https enabled.

I followed the steps in this troubleshoot guide and it fixed it for me: https://docs.microsoft.com/en-us/bot-framework/troubleshoot-authentication-problems

I didn't understand what actually caused the problem though. What I noticed was: desktop emulator works with localhost only.