I created a Web app bot in Azure portal. LUIS, App service, Insights got created automatically. This is a Basic bot using SDK-V4. It got created successfully. But after it when i tried to test the bot using "Test in Web Chat" it gave the "Failed to send activity: bot returned an error". I didn't even deployed any code for the bot. PFB the screenshot of the issue below.
I just downloaded the bot source code and did some changes. It is working fine in Emulator by getting connected to LUIS. But in "Test using web chat" it is not working even with or without deployment of code. I checked the following already:
- Message Endpoints.
- MS App ID and MS App Password in App service.
Actual getting results:
In App Insights:
Message : POST to SAP_Bot-DEV failed: POST to the bot's endpoint failed with
HTTP status 500 POST to the bot's endpoint failed with HTTP status
500.
Failed Message: Microsoft.Bot.ChannelConnector.BotAPI.ThrowOnFailedStatusCode
Call Stack:
Microsoft.Bot.Schema.BotException:
at Microsoft.Bot.ChannelConnector.BotAPI+<PostActivityToBotAsync>d__31.MoveNext (Microsoft.Bot.Base.ChannelConnector, Version=3.2.3.0, Culture=neutral, PublicKeyToken=null)
Inner exception System.Exception handled at Microsoft.Bot.ChannelConnector.BotAPI+<PostActivityToBotAsync>d__31.MoveNext:
at Microsoft.Bot.ChannelConnector.BotAPI.ThrowOnFailedStatusCode (Microsoft.Bot.Base.ChannelConnector, Version=3.2.3.0, Culture=neutral, PublicKeyToken=null)
at Microsoft.Bot.ChannelConnector.BotAPI+<PostActivityToBotAsync>d__31.MoveNext (Microsoft.Bot.Base.ChannelConnector, Version=3.2.3.0, Culture=neutral, PublicKeyToken=null)
In Browser:
{error: {code: "BotError", message: "Failed to send activity: bot returned an error"},…}
error: {code: "BotError", message: "Failed to send activity: bot returned an error"}
httpStatusCode: 500[In Browser][1]
[App Insights Screenshot][2]
Deployment/Scripts
folder with atemplate-with-preexisting-rg.json
file in it. The instructions are here. – Matt Stannett