Bot framework Direct Line 502 error

◇◆丶佛笑我妖孽 提交于 2019-12-24 11:16:23

问题


I have been trying to connect to my bot via DirectLine using this code on an html.

<!DOCTYPE html>
<html>
  <head>
    <link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" />
  </head>
  <body>
    <div id="bot"/>
    <script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
    <script>
      BotChat.App({
        directLine: { secret: 'xxxxx' },
        user: { id: 'userid' },
        bot: { id: 'botid' },
        resize: 'detect'
      }, document.getElementById("bot"));
    </script>
  </body>
</html>

I already checked the direct line secret and it is okay. When I test this code, the chat appears and I recieve the Hello! message I set up on the bot but when I try to send a message to the bot I get this error on console from web browser

How can I use the DirectLine properly or what am I missing from the code for it to send the messages?


回答1:


I checked the Azure status history and find a issue with bot service appeared on 6/14, which might cause communicating with bot not work as expected.



来源:https://stackoverflow.com/questions/50868674/bot-framework-direct-line-502-error

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