You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Bot Framework Composer开发的Bot部署Azure Web App后Web Chat无响应排查

Bot Framework Composer部署Azure Web App后无响应问题排查

问题概述

我用Bot Framework Composer创建了一个Bot,通过「Create resources」和「Import resources」部署时遇到诸多问题,最终通过GitHub将其部署到Azure Web App。但现在在关联的Azure Bot门户「Test Web Chat」中测试时,Bot没有任何响应——此前在Bot Framework Composer内运行完全正常。

该Bot的功能是接收用户消息并发送到我的外部API,再将API回复返回给用户,但目前无法正常工作。查看Web App的Log Stream时发现:每次重启都会创建、启动然后停止容器,发送消息后没有任何日志记录,我无法调试Bot是否读取到消息,也不确定它是否调用了在Bot Framework Composer中关联的API。

错误日志截图

  • 第一页错误:第一页错误
  • 第二页错误:第二页错误
  • 第三页错误:第三页错误

相关背景

此前已在Stack Overflow上解决了Bot部署到Azure Web App的问题。

AppName.dialog配置文件内容

{
  "$kind": "Microsoft.AdaptiveDialog",
  "$designer": {
    "name": "AppName",
    "description": "",
    "id": "xxx"
  },
  "autoEndDialog": true,
  "defaultResultProperty": "dialog.result",
  "triggers": [
    {
      "$kind": "Microsoft.OnConversationUpdateActivity",
      "$designer": {
        "id": "xxx",
        "comment": "This trigger runs when a conversation update activity is sent to the bot. This indicates a user or bot being added or removed from a conversation."
      },
      "actions": [
        {
          "$kind": "Microsoft.Foreach",
          "$designer": {
            "id": "xxx",
            "name": "Loop: for each item",
            "comment": "For each member added to the conversation."
          },
          "itemsProperty": "turn.Activity.membersAdded",
          "actions": [
            {
              "$kind": "Microsoft.IfCondition",
              "$designer": {
                "id": "xxx",
                "name": "Branch: if/else",
                "comment": "Checks that that member added ID does not match the bot ID. This prevents the greeting message from being sent when the bot is added to a conversation."
              },
              "condition": "=string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)",
              "actions": [
                {
                  "$kind": "Microsoft.SetProperty",
                  "$designer": {
                    "id": "xxx"
                  },
                  "property": "user.isNew",
                  "value": true
                },
                {
                  "$kind": "Microsoft.SendActivity",
                  "$designer": {
                    "id": "xxx",
                    "name": "Send a response"
                  },
                  "activity": "${SendActivity_Greeting()}"
                }
              ]
            }
          ],
          "value": "dialog.foreach.value"
        }
      ]
    },
    {
      "$kind": "Microsoft.OnUnknownIntent",
      "$designer": {
        "id": "xxx",
        "comment": "This trigger fires when an incoming activity is not handled by any other trigger."
      },
      "actions": [
        {
          "$kind": "Microsoft.IfCondition",
          "$designer": {
            "id": "xxx",
            "comment": "whatever user has said"
          },
          "condition": "=turn.activity.text == \"refresh\" || user.isNew",
          "actions": [
            {
              "$kind": "Microsoft.SetProperty",
              "$designer": {
                "id": "xxx"
              },
              "property": "user.isNew",
              "value": false
            },
            {
              "$kind": "Microsoft.SetProperty",
              "$designer": {
                "id": "xxx"
              },
              "property": "user.data",
              "value": [
                {
                  "role": "user",
                  "message": "${turn.activity.text}"
                }
              ]
            },
            {
              "$kind": "Microsoft.LogAction",
              "$designer": {
                "id": "logAction"
              },
              "text": "User Data: ${user.data}"
            }
          ],
          "elseActions": [
            {
              "$kind": "Microsoft.SetProperty",
              "$designer": {
                "id": "xxx"
              },
              "property": "turn.newInput",
              "value": [
                {
                  "role": "user",
                  "message": "${turn.activity.text}"
                }
              ]
            },
            {
              "$kind": "Microsoft.SetProperty",
              "$designer": {
                "id": "xxx"
              },
              "property": "user.data",
              "value": "=union(user.data,turn.newInput)"
            }
          ]
        },
        {
          "$kind": "Microsoft.HttpRequest",
          "$designer": {
            "id": "xxx"
          },
          "method": "POST",
          "resultProperty": "turn.results",
          "contentType": "application/json",
          "body": {
            "data": "${user.data}"
          },
          "url": "https://my_api_service/user_prompt"
        },
        {
          "$kind": "Microsoft.SendActivity",
          "$designer": {
            "id": "xxx"
          },
          "activity": "${SendActivity_xxx()}"
        },
        {
          "$kind": "Microsoft.SetProperty",
          "$designer": {
            "id": "xxx"
          },
          "property": "turn.output",
          "value": [
            {
              "role": "assistant",
              "message": "${turn.results.content}"
            }
          ]
        },
        {
          "$kind": "Microsoft.SetProperty",
          "$designer": {
            "id": "xxx"
          },
          "property": "user.data",
          "value": "=union(user.data,turn.output)"
        }
      ]
    }
  ],
  "generator": "AppName.lg",
  "id": "AppName",
  "recognizer": "AppName.lu.qna"
}

内容的提问来源于stack exchange,提问作者Pranavi

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.20 02:47:03