Skip to content

[Bug]: LINE adapter crashes with AttributeError: 'LineAdapter' object has no attribute 'create_source' #23728

@mizgyo

Description

@mizgyo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/gatewayGateway runner, session dispatch, deliverycomp/pluginsPlugin system and bundled pluginstype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions