hermes - 💡(How to fix) Fix [Bug]: LINE adapter crashes with AttributeError: 'LineAdapter' object has no attribute 'create_source'

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…

The LINE Messaging API adapter (introduced in #23197, merged 2026-05-10) crashes on every incoming webhook event with:

AttributeError: 'LineAdapter' object has no attribute 'create_source'

As a result, no inbound LINE message is ever dispatched to the agent — webhooks return 200 but the user receives no reply.

Error Message

AttributeError: 'LineAdapter' object has no attribute 'create_source'

Root Cause

plugins/platforms/line/adapter.py:962 calls self.create_source(...), but the base adapter exposes this factory as build_source(...) — see plugins/platforms/irc/adapter.py:495 and plugins/platforms/teams/adapter.py for the established pattern. No create_source method exists anywhere in plugins/platforms/.

Fix Action

Fix

One-line: rename the call to self.build_source(...). Verified locally — once patched, LINE messages are dispatched and the agent replies as expected. PR incoming.

Code Example

AttributeError: 'LineAdapter' object has no attribute 'create_source'

---

ERROR hermes_plugins.line_platform.adapter: LINE: dispatch_event failed
Traceback (most recent call last):
  File "/opt/hermes/plugins/platforms/line/adapter.py", line 877, in _handle_webhook
    await self._dispatch_event(event)
  File "/opt/hermes/plugins/platforms/line/adapter.py", line 910, in _dispatch_event
    await self._handle_message_event(event)
  File "/opt/hermes/plugins/platforms/line/adapter.py", line 962, in _handle_message_event
    source_obj = self.create_source(
                 ^^^^^^^^^^^^^^^^^^
AttributeError: 'LineAdapter' object has no attribute 'create_source'
RAW_BUFFERClick to expand / collapse

Summary

The LINE Messaging API adapter (introduced in #23197, merged 2026-05-10) crashes on every incoming webhook event with:

AttributeError: 'LineAdapter' object has no attribute 'create_source'

As a result, no inbound LINE message is ever dispatched to the agent — webhooks return 200 but the user receives no reply.

Reproduction

  1. Configure a LINE Messaging API channel and set the webhook URL to a running Hermes gateway (nousresearch/hermes-agent:latest).
  2. Set LINE_CHANNEL_SECRET, LINE_CHANNEL_ACCESS_TOKEN, LINE_PUBLIC_URL, LINE_ALLOWED_USERS in .env.
  3. Send any text message to the bot from LINE.

Observed

ERROR hermes_plugins.line_platform.adapter: LINE: dispatch_event failed
Traceback (most recent call last):
  File "/opt/hermes/plugins/platforms/line/adapter.py", line 877, in _handle_webhook
    await self._dispatch_event(event)
  File "/opt/hermes/plugins/platforms/line/adapter.py", line 910, in _dispatch_event
    await self._handle_message_event(event)
  File "/opt/hermes/plugins/platforms/line/adapter.py", line 962, in _handle_message_event
    source_obj = self.create_source(
                 ^^^^^^^^^^^^^^^^^^
AttributeError: 'LineAdapter' object has no attribute 'create_source'

Root cause

plugins/platforms/line/adapter.py:962 calls self.create_source(...), but the base adapter exposes this factory as build_source(...) — see plugins/platforms/irc/adapter.py:495 and plugins/platforms/teams/adapter.py for the established pattern. No create_source method exists anywhere in plugins/platforms/.

Fix

One-line: rename the call to self.build_source(...). Verified locally — once patched, LINE messages are dispatched and the agent replies as expected. PR incoming.

Environment

  • Image: nousresearch/hermes-agent:latest (pulled 2026-05-11)
  • Platform: macOS host (arm64) via Docker, cloudflared quick tunnel

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 - 💡(How to fix) Fix [Bug]: LINE adapter crashes with AttributeError: 'LineAdapter' object has no attribute 'create_source'