larksuite / larksuite/cli

lark-cli 1.0.95: event consume — bus Event received 但 consumer RECEIVED/DROPPED 恒 0(事件未分发)

Open
#2,740 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain/event domain/im
Dominant language
Go
Stars
17.3k
Forks
1.4k
Avg merge
2d 4h
Merged PRs (30d)
105

Description

现象

lark-cli event consume im.message.receive_v1 --as bot 的 consumer 永远收不到事件,但 bus.log 持续出现 Event received。

环境

  • lark-cli 1.0.95(最新)
  • Windows 10 Build 19044, pwsh 7.4
  • 飞书自建 bot, 事件订阅走长连接(WebSocket)

可复现证据

  1. bus.log 持续: 2026-09-16 02:5x:xx Event received: type=im.message.receive_v1 id=
  2. lark-cli event status:
    Bus: running (PID 28032) pid=25692 im.message.receive_v1 SUB=- RECEIVED=0 DROPPED=0 pid=23184 card.action.trigger SUB=- RECEIVED=0 DROPPED=0
    多次向 bot 私聊发消息(message_id 已生成,飞书侧确认送达),RECEIVED 始终不涨,DROPPED 也 0。
  3. --output-dir 抓不到: vent consume im.message.receive_v1 --as bot --max-events 3 --timeout 40s --output-dir 发 1 条后 下 0 个事件文件。
  4. stdout NDJSON 恒 0 字节。

关联现象(card)

card.action.trigger 同 bus 出现过 WARN: event dropped: malformed payload。与 im 的"收到但不分发"可能同根因。

期望

Event received 后 consumer RECEIVED 应 +1,stdout 输出 NDJSON 行,--output-dir 写出事件文件。

已尝试

  • 重启 bus / 清 consumer / 重建 WebSocket — 无效
  • 升级到 1.0.95(已最新)— 无效
  • --output-dir / stdout / --jq 投影 — 均抓不到

提问

consumer 的 SUB 列恒为 -(空)是否代表未注册到分发链路?是 bus payload 校验缺陷还是 PreConsume/required_console_events 配置问题?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing with lark-cli event consume im.message.receive_v1 --as bot, then compare event status with the bus.log entries and the reported stdout and --output-dir results. Trace how the consumer is registered and how Event received entries reach the consumer; done means RECEIVED increments, stdout emits NDJSON, and --output-dir contains the event file.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.