Skip to content

飞书桥接无回应,chat界面可运行 #199

@kanemaverick

Description

@kanemaverick
Image Image Image

[Bug] 飞书桥接长连接无法接收消息

环境信息

  • 操作系统:Windows 11
  • CodePilot 版本:最新版(从 GitHub 下载)
  • 飞书平台:飞书个人版(feishu.cn)
  • 事件订阅方式:长连接

问题描述

飞书桥接显示连接成功且适配器状态为"运行中",但机器人对飞书中发送的任何消息均无响应。

复现步骤

  1. 在 CodePilot 飞书设置中填入有效的 App ID 和 App Secret
  2. 在远程桥接页面启用飞书渠道
  3. 启动桥接,状态显示已连接,飞书适配器显示运行中
  4. 在飞书中向机器人发送消息(私聊和群聊 @ 均已测试)
  5. 机器人无任何回应

期望行为

机器人应能接收消息并通过 Claude 进行回复。

实际行为

机器人无回应。查看飞书开放平台日志(运营监控 → 日志检索),只能看到反复的 token 获取和 bot 信息查询:

GET  /open-apis/bot/v3/info/                          → SUCCESS
POST /open-apis/auth/v3/tenant_access_token/internal  → SUCCESS

完全没有任何消息相关的 API 调用(如 /im/v1/messages),说明 CodePilot 并未通过长连接真正接收到消息推送事件,尽管界面显示"运行中"。

配置信息

  • 飞书应用事件订阅方式:长连接
  • 已订阅事件:im.message.receive_v1
  • 所有所需权限已开通(im:message、im:message.p2p_msg:readonly 等)
  • 应用已发布上线,可用范围为所有人
  • 默认模型已设置为 claude-sonnet-4-6

疑似原因

尽管 UI 显示"运行中",长连接可能并未真正建立。CodePilot 似乎没有连接到飞书的 WebSocket 端点或注册消息推送,导致所有传入消息被静默丢弃。

补充说明

  • 重启桥接后问题依旧
  • CodePilot 界面中没有任何报错提示
  • 飞书日志截图见附件
  • 开启的权限JSON:
  • {
    "scopes": {
    "tenant": [
    "aily:file:read",
    "aily:file:write",
    "application:application.app_message_stats.overview:readonly",
    "application:application:self_manage",
    "application:bot.menu:write",
    "contact:contact.base:readonly",
    "contact:department.base:readonly",
    "contact:user.assign_info:read",
    "contact:user.base:readonly",
    "contact:user.department:readonly",
    "contact:user.dotted_line_leader_info.read",
    "contact:user.email:readonly",
    "contact:user.employee:readonly",
    "contact:user.employee_id:readonly",
    "contact:user.employee_number:read",
    "contact:user.gender:readonly",
    "contact:user.id:readonly",
    "contact:user.job_family:readonly",
    "contact:user.job_level:readonly",
    "contact:user.phone:readonly",
    "contact:user.subscription_ids:write",
    "contact:user.user_geo",
    "event:ip_list",
    "helpdesk:all:readonly",
    "im:chat",
    "im:chat.access_event.bot_p2p_chat:read",
    "im:chat.announcement:read",
    "im:chat.announcement:write_only",
    "im:chat.chat_pins:read",
    "im:chat.chat_pins:write_only",
    "im:chat.collab_plugins:read",
    "im:chat.collab_plugins:write_only",
    "im:chat.managers:write_only",
    "im:chat.members:bot_access",
    "im:chat.members:read",
    "im:chat.members:write_only",
    "im:chat.menu_tree:read",
    "im:chat.menu_tree:write_only",
    "im:chat.moderation:read",
    "im:chat.tabs:read",
    "im:chat.tabs:write_only",
    "im:chat.top_notice:write_only",
    "im:chat.widgets:read",
    "im:chat.widgets:write_only",
    "im:chat:create",
    "im:chat:delete",
    "im:chat:moderation:write_only",
    "im:chat:operate_as_owner",
    "im:chat:read",
    "im:chat:readonly",
    "im:chat:update",
    "im:message",
    "im:message.group_at_msg:readonly",
    "im:message.group_msg",
    "im:message.p2p_msg:readonly",
    "im:message.pins:read",
    "im:message.pins:write_only",
    "im:message.reactions:read",
    "im:message.reactions:write_only",
    "im:message.urgent",
    "im:message.urgent.status:write",
    "im:message.urgent:phone",
    "im:message.urgent:sms",
    "im:message:readonly",
    "im:message:recall",
    "im:message:send_as_bot",
    "im:message:send_multi_depts",
    "im:message:send_multi_users",
    "im:message:send_sys_msg",
    "im:message:update",
    "im:resource"
    ],
    "user": []
    }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions