openclaw - 💡(How to fix) Fix Bug: channel already registered error shows misleading plugin ID and doctor does not detect stale plugin references [1 pull requests]

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…

Error Message

When a plugin registers a channel that conflicts with another registration, the error message is misleading, and doctor does not help detect the root cause.

Issue 1: Misleading error message

The error reports: ERROR openclaw-lark: channel already registered: feishu (feishu) Here existingRuntime.pluginId is the channel plugin's internal id (e.g., "feishu" from feishuPlugin.id), not the host plugin id (e.g., "openclaw-lark"). This makes the error message unactionable — users cannot identify which plugin is causing the collision.

  1. The channel already registered error message showing the wrong plugin ID ERROR openclaw-lark: channel already registered: feishu (feishu) The plugin source path correctly identifies openclaw-lark, but the error body (feishu) points to the wrong plugin ID.
  2. Error message should show the host plugin id that registered the channel, e.g.:

Root Cause

  • src/plugins/registry.ts:477-483: The duplicate channel check uses existingRuntime.pluginId which is the ChannelPlugin's internal id field, not the host plugin record's id. Both the existing and new registration come from the same host plugin (openclaw-lark), suggesting a setup-vs-runtime registration collision within the plugin loader.
  • The loader at src/plugins/loader.ts processes both setup-source and runtime-source registrations for the same plugin, and both paths call api.registerChannel(), potentially registering the same channel twice.

Fix Action

Fixed

Code Example

ERROR openclaw-lark: channel already registered: feishu (feishu)

---

message: \`channel already registered: \${id} (\${existingRuntime.pluginId})\`

---

ERROR openclaw-lark: channel already registered: feishu (feishu)
  (C:\Users\...\.openclaw\extensions\feishu-openclaw-plugin\index.js)

---

channel already registered: feishu (host plugin: openclaw-lark, previously registered by: openclaw-lark)
RAW_BUFFERClick to expand / collapse

Bug Description

When a plugin registers a channel that conflicts with another registration, the error message is misleading, and doctor does not help detect the root cause.

Issue 1: Misleading error message

The error reports:

ERROR openclaw-lark: channel already registered: feishu (feishu)

The parenthetical (feishu) claims the channel was already registered by a plugin with id feishu. However, the actual plugin that registered the channel is openclaw-lark itself.

The issue is in src/plugins/registry.ts around line 483:

message: \`channel already registered: \${id} (\${existingRuntime.pluginId})\`

Here existingRuntime.pluginId is the channel plugin's internal id (e.g., "feishu" from feishuPlugin.id), not the host plugin id (e.g., "openclaw-lark"). This makes the error message unactionable — users cannot identify which plugin is causing the collision.

Issue 2: Doctor does not detect stale plugin references

When plugins.allow or plugins.entries contain references to non-existent or alias-mismatched plugin IDs (e.g., "feishu" instead of the actual plugin ID "openclaw-lark"), doctor:

  1. Does not flag these as stale/dangling references
  2. Does not suggest the correct plugin ID
  3. The plugins.allow is empty warning fires even when allow has entries, because none of them match discovered plugin IDs

This is related to #68352 (misleading plugin warnings) and #77806 (doctor auto-installing duplicate plugins), but covers two distinct sub-issues:

  1. The channel already registered error message showing the wrong plugin ID
  2. Doctor lacking a stale-reference detection check for plugins.allow/plugins.entries

Reproduction Steps

  1. Install an external feishu/lark plugin (e.g., feishu-openclaw-plugin in ~/.openclaw/extensions/)
  2. Configure plugins.allow with ["openclaw-lark"] and plugins.entries.openclaw-lark.enabled = true
  3. Also have channels.feishu configured
  4. Run openclaw doctor

Observed Behavior

ERROR openclaw-lark: channel already registered: feishu (feishu)
  (C:\Users\...\.openclaw\extensions\feishu-openclaw-plugin\index.js)

The plugin source path correctly identifies openclaw-lark, but the error body (feishu) points to the wrong plugin ID.

Expected Behavior

  1. Error message should show the host plugin id that registered the channel, e.g.:

    channel already registered: feishu (host plugin: openclaw-lark, previously registered by: openclaw-lark)
  2. Doctor should detect and suggest cleanup for stale plugin references in plugins.allow and plugins.entries that don't match any discovered plugin IDs.

Environment

  • OS: Windows 10 Education 10.0.19045
  • OpenClaw: 2026.4.16 (95d6596)
  • Node.js: bundled

Root Cause Analysis

  • src/plugins/registry.ts:477-483: The duplicate channel check uses existingRuntime.pluginId which is the ChannelPlugin's internal id field, not the host plugin record's id. Both the existing and new registration come from the same host plugin (openclaw-lark), suggesting a setup-vs-runtime registration collision within the plugin loader.
  • The loader at src/plugins/loader.ts processes both setup-source and runtime-source registrations for the same plugin, and both paths call api.registerChannel(), potentially registering the same channel twice.

Related Issues

  • #77806 — doctor --fix auto-installing feishu/lark plugins creates duplicate plugin ID conflict
  • #68352 — UX: misleading plugin warnings when allowlist entries don't match discovered plugin IDs

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

openclaw - 💡(How to fix) Fix Bug: channel already registered error shows misleading plugin ID and doctor does not detect stale plugin references [1 pull requests]