I am new to C# and the Bot Framework (V3) and have been asked to begin testing an existing bot on a project I have joined. The bot itself works fine on the Bot Emulator and when hosted on Skype, but for some reason the web chat on Azure does not work. As the web chat uses the Direct Line, it kind of puts a halt to running tests for now. I have spent a lot of time scouring the V3 Github page and here on SO but I've not been able to find a solution.
The conversation seems to initiate OK to begin, as the Bot sends the user a message but all user responses don't get sent and the Bot responds with the error message 'Sorry, my bot code is having an issue'. See -
Azure lists it as a 500 error - internal server error. see
Error messages in Azure
I then looked at the messages in the Chrome Dev Tools tab and get the same error as well as a 502 error and, more recently (or I never noticed it before), a CORS error as well. See
Chrome Dev Tools console
After this I used Application Insights on Azure and for each instance when I tried to use the Web Chat there would be three items;
As I'm not very familiar with the whole set-up between C# and the Bot Framework I'm not really sure where the issue lies. Here's some screenshot of what the exception message looks like -
Messages of single operationId
Exception details (1)
Exception details (2)
Exception details (3)
Exception details (4)
I had some thoughts on these messages:
If anyone has any thoughts on this and what the cause of the issue might be I would really appreciate it.
Additionally, here's two things I've tried to do to fix this that haven't made any difference;
So the resolution to my problem was as per Steven Kanberg's suggestions in the comments above. While our state management had been using the deprecated version (which is now updated), it was a CORS issue caused by the bots being in different deployment slots to the app services. Once the URIs of the app services were added as Trusted Origins the problem was solved. Thanks to Steven Kanberg for all the help.