openclaw - 💡(How to fix) Fix Bug: Discord plugin not discovered/loaded by gateway despite correct v2026.5.3 package with dist/ files [2 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
openclaw/openclaw#77257Fetched 2026-05-05 05:50:37
View on GitHub
Comments
2
Participants
2
Timeline
5
Reactions
2
Timeline (top)
commented ×2closed ×1cross-referenced ×1subscribed ×1

After the original packaging issue (#77044) was fixed in @openclaw/[email protected] (the npm tarball now includes dist/index.js, dist/setup-entry.js, and openclaw.runtimeExtensions metadata), the Discord channel still does not load in the gateway.

The plugin is installed correctly but the gateway plugin loader does not discover or import it — with no error or warning in the logs.

Error Message

The plugin is installed correctly but the gateway plugin loader does not discover or import it — with no error or warning in the logs. No error, no warning — the plugin is silently skipped.

Root Cause

$ openclaw plugins update --all
Installing @openclaw/discord into /root/.openclaw/npm…
WARNING: Plugin "discord" contains dangerous code patterns: Environment variable access combined with network send — possible credential harvesting
WARNING: Plugin "discord" installation allowed because it is an official OpenClaw package
Linked peerDependency "openclaw" -> /usr/lib/node_modules/openclaw
discord already at 2026.5.3.
Restart the gateway to load plugins and hooks.

Code Example

Channels
┌──────────┬─────────┬────────┬────────────────────────────────────────────────────────────────────────────────────────┐
ChannelEnabledStateDetail├──────────┼─────────┼────────┼────────────────────────────────────────────────────────────────────────────────────────┤
TelegramONOK     │ token config (8530MSMQ · len 46) · accounts 1/1└──────────┴─────────┴────────┴────────────────────────────────────────────────────────────────────────────────────────┘

---

[gateway] http server listening (7 plugins: browser, device-pair, file-transfer, memory-core, phone-control, talk-voice, telegram; 3.9s)
[gateway] starting channels and sidecars...

---

$ node -e "const d=require(/root/.openclaw/npm/node_modules/@openclaw/discord/package.json); console.log(JSON.stringify({version:d.version, main:d.main, openclaw_extensions:d.openclaw?.extensions, openclaw_runtimeExtensions:d.openclaw?.runtimeExtensions, openclaw_runtimeSetupEntry:d.openclaw?.runtimeSetupEntry}, null, 2))"
{
  "version": "2026.5.3",
  "main": null,
  "openclaw_extensions": ["./index.ts"],
  "openclaw_runtimeExtensions": ["./dist/index.js"],
  "openclaw_runtimeSetupEntry": "./dist/setup-entry.js"
}

$ ls /root/.openclaw/npm/node_modules/@openclaw/discord/dist/index.js /root/.openclaw/npm/node_modules/@openclaw/discord/dist/setup-entry.js
/root/.openclaw/npm/node_modules/@openclaw/discord/dist/index.js
/root/.openclaw/npm/node_modules/@openclaw/discord/dist/setup-entry.js

---

{
  "enabled": true,
  "token": "MTQ3Nj…7Ark",
  "groupPolicy": "allowlist",
  "streaming": { "mode": "off" },
  "guilds": {
    "my-server": {},
    "xxxxxxx": {
      "requireMention": true,
      "users": ["55421533xxxxxx"]
    }
  }
}

---

$ openclaw plugins update --all
Installing @openclaw/discord into /root/.openclaw/npm…
WARNING: Plugin "discord" contains dangerous code patterns: Environment variable access combined with network send — possible credential harvesting
WARNING: Plugin "discord" installation allowed because it is an official OpenClaw package
Linked peerDependency "openclaw" -> /usr/lib/node_modules/openclaw
discord already at 2026.5.3.
Restart the gateway to load plugins and hooks.
RAW_BUFFERClick to expand / collapse

Description

After the original packaging issue (#77044) was fixed in @openclaw/[email protected] (the npm tarball now includes dist/index.js, dist/setup-entry.js, and openclaw.runtimeExtensions metadata), the Discord channel still does not load in the gateway.

The plugin is installed correctly but the gateway plugin loader does not discover or import it — with no error or warning in the logs.

Environment

  • OpenClaw: 2026.5.3 (06d46f7)
  • @openclaw/discord: 2026.5.3
  • OS: Linux 6.17.0-19-generic (x64)
  • Node: 22.22.0

Steps to Reproduce

  1. npm install -g openclaw@latest (upgrades to 2026.5.3)
  2. cd /root/.openclaw/npm && npm install @openclaw/discord@latest
  3. openclaw plugins update --all
  4. openclaw gateway restart
  5. openclaw status

Expected Behavior

Discord channel appears in the Channels table with state ON/OK, alongside Telegram.

Actual Behavior

Only Telegram appears. Discord is completely absent:

Channels
┌──────────┬─────────┬────────┬────────────────────────────────────────────────────────────────────────────────────────┐
│ Channel  │ Enabled │ State  │ Detail                                                                                 │
├──────────┼─────────┼────────┼────────────────────────────────────────────────────────────────────────────────────────┤
│ Telegram │ ON      │ OK     │ token config (8530…MSMQ · len 46) · accounts 1/1                                       │
└──────────┴─────────┴────────┴────────────────────────────────────────────────────────────────────────────────────────┘

Gateway startup log shows only 7 plugins loaded, discord not among them:

[gateway] http server listening (7 plugins: browser, device-pair, file-transfer, memory-core, phone-control, talk-voice, telegram; 3.9s)
[gateway] starting channels and sidecars...

No error, no warning — the plugin is silently skipped.

Verification of Package Integrity

$ node -e "const d=require(/root/.openclaw/npm/node_modules/@openclaw/discord/package.json); console.log(JSON.stringify({version:d.version, main:d.main, openclaw_extensions:d.openclaw?.extensions, openclaw_runtimeExtensions:d.openclaw?.runtimeExtensions, openclaw_runtimeSetupEntry:d.openclaw?.runtimeSetupEntry}, null, 2))"
{
  "version": "2026.5.3",
  "main": null,
  "openclaw_extensions": ["./index.ts"],
  "openclaw_runtimeExtensions": ["./dist/index.js"],
  "openclaw_runtimeSetupEntry": "./dist/setup-entry.js"
}

$ ls /root/.openclaw/npm/node_modules/@openclaw/discord/dist/index.js /root/.openclaw/npm/node_modules/@openclaw/discord/dist/setup-entry.js
/root/.openclaw/npm/node_modules/@openclaw/discord/dist/index.js
/root/.openclaw/npm/node_modules/@openclaw/discord/dist/setup-entry.js

The package is structurally correct — the original #77044 packaging issue is resolved. This is a different problem: the gateway plugin loader does not pick it up.

Channel Config

{
  "enabled": true,
  "token": "MTQ3Nj…7Ark",
  "groupPolicy": "allowlist",
  "streaming": { "mode": "off" },
  "guilds": {
    "my-server": {},
    "xxxxxxx": {
      "requireMention": true,
      "users": ["55421533xxxxxx"]
    }
  }
}

Plugin Install Metadata

$ openclaw plugins update --all
Installing @openclaw/discord into /root/.openclaw/npm…
WARNING: Plugin "discord" contains dangerous code patterns: Environment variable access combined with network send — possible credential harvesting
WARNING: Plugin "discord" installation allowed because it is an official OpenClaw package
Linked peerDependency "openclaw" -> /usr/lib/node_modules/openclaw
discord already at 2026.5.3.
Restart the gateway to load plugins and hooks.

The install succeeds but the gateway still does not load it on restart.

Additional Context

  • openclaw doctor --fix reports no config warnings related to discord (the old "compiled runtime output" warning is gone)
  • openclaw security audit detects the discord config (channels.discord.groupPolicy="allowlist") and the plugin install metadata, confirming the config layer knows about discord
  • Related: #77044 (original packaging bug, now closed as completed)
  • openclaw status --deep notes: Detected plugin install metadata drift: discord (recorded 2026.5.2, installed 2026.5.3) — the metadata drift was resolved via openclaw plugins update --all but the issue persists

Hypothesis

The gateway plugin discovery/import mechanism may be using a different code path than openclaw doctor and openclaw plugins update for resolving plugin entries, and that code path may still not correctly resolve the @openclaw/discord package (possibly still looking at openclaw.extensions pointing to ./index.ts rather than openclaw.runtimeExtensions pointing to ./dist/index.js).

extent analysis

TL;DR

The gateway plugin loader may not be correctly resolving the @openclaw/discord package due to an outdated code path.

Guidance

  • Verify that the openclaw.runtimeExtensions field in the @openclaw/discord package.json is correctly pointing to ./dist/index.js.
  • Check the gateway plugin loader code to ensure it is using the correct code path for resolving plugin entries, specifically looking at openclaw.runtimeExtensions instead of openclaw.extensions.
  • Run openclaw plugins update --all and openclaw gateway restart to ensure the latest plugin metadata is loaded.
  • Investigate the openclaw doctor --fix and openclaw security audit outputs to see if they provide any additional insights into the issue.

Example

No code snippet is provided as the issue seems to be related to the plugin loader mechanism rather than a specific code error.

Notes

The issue may be related to a mismatch between the code paths used by different OpenClaw commands, and resolving this may require updates to the gateway plugin loader or the @openclaw/discord package.

Recommendation

Apply workaround: manually verify the openclaw.runtimeExtensions field and the gateway plugin loader code to ensure correct resolution of the @openclaw/discord package. This is recommended as the issue seems to be related to a specific code path and resolving it may require manual intervention.

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: Discord plugin not discovered/loaded by gateway despite correct v2026.5.3 package with dist/ files [2 comments, 2 participants]