hermes - ✅(Solved) Fix [Bug]: weixin send file failed [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#13305Fetched 2026-04-23 07:21:44
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
3
Author
Participants
Timeline (top)
commented ×1cross-referenced ×1labeled ×1subscribed ×1

Error Message

2026-04-21 06:56:25,488 WARNING gateway.platforms.weixin: [Weixin] send chunk failed to=o9cq80yy attempt=1/3, retrying in 1.00s: iLink sendmessage error: ret=-2 errcode=None errmsg=unknown error 2026-04-21 06:56:26,656 WARNING gateway.platforms.weixin: [Weixin] send chunk failed to=o9cq80yy attempt=2/3, retrying in 2.00s: iLink sendmessage error: ret=-2 errcode=None errmsg=unknown error 2026-04-21 06:56:28,794 ERROR gateway.platforms.weixin: [Weixin] send failed to=o9cq80yy: iLink sendmessage error: ret=-2 errcode=None errmsg=unknown error

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

PR fix notes

PR #14384: fix: avoid cross-loop session reuse in Weixin direct sends

Description (problem / solution / changelog)

Summary

  • only reuse the live Weixin adapter when its send session belongs to the current event loop
  • fall back to a fresh one-shot aiohttp session for cross-loop media sends
  • add regression coverage for same-loop reuse and cross-loop fallback

Testing

  • python3 -m pytest -o addopts='' tests/gateway/test_weixin.py

Closes #13305.

Changed files

  • gateway/platforms/weixin.py (modified, +13/-0)
  • tests/gateway/test_weixin.py (modified, +81/-0)

Code Example

none

---
RAW_BUFFERClick to expand / collapse

Bug Description

I asked Hermes to write a document and send it to me as a Word file, but the sending failed. The log shows the following: 2026-04-21 06:56:25,488 WARNING gateway.platforms.weixin: [Weixin] send chunk failed to=o9cq80yy attempt=1/3, retrying in 1.00s: iLink sendmessage error: ret=-2 errcode=None errmsg=unknown error 2026-04-21 06:56:26,656 WARNING gateway.platforms.weixin: [Weixin] send chunk failed to=o9cq80yy attempt=2/3, retrying in 2.00s: iLink sendmessage error: ret=-2 errcode=None errmsg=unknown error 2026-04-21 06:56:28,794 ERROR gateway.platforms.weixin: [Weixin] send failed to=o9cq80yy: iLink sendmessage error: ret=-2 errcode=None errmsg=unknown error

Steps to Reproduce

1.chat with wexin 2.ask hermes send doc file to me 3.hermes say send file failed

Expected Behavior

I will get the doc file

Actual Behavior

failed

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

No response

Debug Report

none

Operating System

WSL2

Python Version

Python: 3.11.15

Hermes Version

send it to me

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

Investigate the iLink sendmessage error: ret=-2 errcode=None errmsg=unknown error in the Weixin gateway to resolve the file sending failure.

Guidance

  • Review the Weixin gateway configuration and logs to identify potential issues with the iLink sendmessage API.
  • Verify that the Hermes version is compatible with the Weixin gateway and the Python version (3.11.15) being used.
  • Check the network connectivity and firewall settings to ensure that the gateway can communicate with the Weixin servers.
  • Consider enabling additional logging or debugging in the Weixin gateway to gather more information about the unknown error.

Example

No code snippet is provided as the issue lacks specific technical details about the Weixin gateway implementation.

Notes

The root cause of the issue is unclear due to the lack of information about the Weixin gateway and the iLink sendmessage API. Further investigation is required to determine the cause of the unknown error.

Recommendation

Apply workaround: Investigate and resolve the iLink sendmessage error in the Weixin gateway, as it is the most likely cause of the file sending failure.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: weixin send file failed [1 pull requests, 1 comments, 2 participants]