@Abdhaheer Kabeer Thanks for getting back and sharing the updates on the suggested action plans.
Observation 1:
If the test in webchat ,itself is failing with InternalServer error there seems to be an application level exception which is triggered. To troubleshoot exceptions in the Azure Bot Service follow this article. You can enable the diagnostic logging for your Azure App service as explained in this article and check for any errors.
Observation 2:
You can try to isolate this issue by disabling the Enhanced token authentication for now and try directly accessing it using the directline secret (Though its not recommended). Atleast this will help you to isolate and track the issue. Update the secret in the below and test your endpoint and check in console and Network tab for any errors.
<!DOCTYPE html>
<html>
<head>
<script
crossorigin="anonymous"
src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js">
</script>
<style>
html,
body {
height: 100%;
}
body {
margin: 0;
}
#webchat {
height: 100%;
width: 100%;
}
</style>
</head>
<body>
<div id="webchat" role="main"></div>
<script>
window.WebChat.renderWebChat(
{
directLine: window.WebChat.createDirectLine({
token: 'JuU8ygZh_h0XXXXXXXXXXXXXXXXXXXXXcxvkNQr6xbmVs'
}),
userID: 'YOUR_USER_ID',
username: 'Web Chat User',
locale: 'en-US'
},
document.getElementById('webchat')
);
</script>
</body>
</html>
Awaiting your reply.