📦 Weixin Runtime Fix — 微信运行时修复
v2.4.2修复 @tencent-weixin/openclaw-weixin@2.4.1 在 OpenClaw 2026.5.4+ 上的两个关键 bug: 1. Runtime 模块隔离导致 waitForWeixinRuntime 超时 2. undici 8.2.0 拒绝手动设置的 Content-Length 头...
0· 0·0 当前·0 累计
运行时依赖
无特殊依赖
安装命令
点击复制官方npx clawhub@latest install weixin-runtime-fix
镜像加速npx clawhub@latest install weixin-runtime-fix --registry https://cn.longxiaskill.com镜像同步中
技能文档
openclaw-weixin-fix 修复了 @tencent-weixin/openclaw-weixin@2.4.1 在 OpenClaw 2026.5.4+ 上的关键 bug。
问题包括:
- Runtime 模块隔离:runtime.ts 被加载两次,waitForWeixinRuntime() 读取的实例与 setWeixinRuntime() 写入的实例不同,导致超时
- Content-Length 拒绝:undici 8.2.0 不允许手动设置 Content-Length 头
修复内容:
- 改动1:channel.js — 传递 channelRuntime
- 改动2:monitor.js — 优先使用传入的 channelRuntime
- 改动3:api.js — 删除 Content-Length 头
验证结果: ✅ 微信消息接收正常 ✅ 微信回复发送成功 ✅ 文件上传正常 ✅ openclaw health --json 显示 lastError: null
注意事项: 每次 openclaw plugins install 重装插件后,需要重新运行此修复 备份文件:channel.js.bak 和 monitor.js.bak
相关链接: GitHub Issue: https://github.com/openclaw/openclaw/issues/78376 修复报告: https://github.com/user-attachments/files/27447892/openclaw-weixin-fix-report.md