openclaw - ✅(Solved) Fix plugin: async register() return value is not awaited — routes never registered [1 pull requests, 1 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#67899Fetched 2026-04-17 08:28:59
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
cross-referenced ×1

Error Message

  1. Check OpenClaw logs — no error is shown. OpenClaw should await the register() call, or at minimum warn if a Promise is returned and discarded.

Fix Action

Fixed

PR fix notes

PR #67941: fix(plugins): enforce synchronous registration

Description (problem / solution / changelog)

Summary

  • enforce synchronous plugin registration in both runtime and CLI metadata loads
  • move webhooks secret resolution to request auth so registration stays synchronous

Validation

  • pnpm test src/plugins/loader.test.ts -t "rejects async register functions"
  • pnpm test src/plugins/loader.cli-metadata.test.ts -t "rejects async plugin registration when collecting CLI metadata"
  • pnpm test extensions/webhooks/src/config.test.ts extensions/webhooks/index.test.ts extensions/webhooks/src/http.test.ts
  • pnpm tsgo
  • pnpm build

Related

  • #67879
  • #67891
  • #67899
  • #67900
  • #64937
  • #65183
  • Supersedes #64640

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/active-memory/index.test.ts (modified, +30/-31)
  • extensions/comfy/comfy.live.test.ts (modified, +1/-1)
  • extensions/device-pair/index.test.ts (modified, +1/-1)
  • extensions/memory-wiki/cli-metadata.test.ts (modified, +1/-1)
  • extensions/memory-wiki/index.test.ts (modified, +1/-1)
  • extensions/openai/index.test.ts (modified, +1/-1)
  • extensions/phone-control/index.test.ts (modified, +1/-1)
  • extensions/talk-voice/index.test.ts (modified, +1/-1)
  • extensions/thread-ownership/index.test.ts (modified, +4/-4)
  • extensions/voice-call/index.test.ts (modified, +2/-2)
  • extensions/webhooks/index.test.ts (added, +66/-0)
  • extensions/webhooks/index.ts (modified, +42/-40)
  • extensions/webhooks/runtime-api.ts (modified, +1/-0)
  • extensions/webhooks/src/config.test.ts (modified, +26/-25)
  • extensions/webhooks/src/config.ts (modified, +11/-33)
  • extensions/webhooks/src/http.test.ts (modified, +87/-18)
  • extensions/webhooks/src/http.ts (modified, +30/-5)
  • src/context-engine/registry.ts (modified, +10/-0)
  • src/plugins/bundled-capability-runtime.ts (modified, +1/-1)
  • src/plugins/cli-registry-loader.ts (modified, +5/-67)
  • src/plugins/cli.test.ts (modified, +0/-52)
  • src/plugins/loader.cli-metadata.test.ts (modified, +6/-5)
  • src/plugins/loader.test.ts (modified, +122/-0)
  • src/plugins/loader.ts (modified, +170/-11)
  • src/plugins/registry.ts (modified, +49/-2)
  • src/plugins/types.ts (modified, +3/-5)
  • src/test-utils/plugin-registration.ts (modified, +4/-4)
  • test/helpers/media-generation/bundled-provider-builders.ts (modified, +1/-1)
  • test/helpers/plugins/provider-registration.ts (modified, +2/-2)
RAW_BUFFERClick to expand / collapse

Bug Description

When a plugin exports an async register() function, OpenClaw calls it synchronously without await. The returned Promise is silently dropped and the function's side effects (e.g. route registration) never execute.

Steps to Reproduce

  1. Create or use a plugin that exports register() as async.
  2. Observe that routes/handlers registered inside register() are never mounted.
  3. Check OpenClaw logs — no error is shown.

Expected Behavior

OpenClaw should await the register() call, or at minimum warn if a Promise is returned and discarded.

Environment

  • openclaw version: 2026.4.15 (from openclaw --version)
  • Installation method: npm global
  • OS: Ubuntu/Linux
  • Plugin: webhooks plugin (or any async register plugin)

Impact

All plugins using async register() are silently broken — routes never mount. This affects at least the webhooks plugin.

Additional Context

The warning "plugin register returned a promise; async registration is ignored" is logged but the register call itself is not awaited — the warning is descriptive of the problem but the underlying call is still synchronous.

extent analysis

TL;DR

The issue can be fixed by modifying OpenClaw to await the async register() function call from plugins.

Guidance

  • Verify that the register() function in the plugin is correctly defined as async and that it returns a Promise.
  • Check the OpenClaw code to see where the register() function is called and modify it to use await when calling the plugin's register() function.
  • Consider adding a warning or error in OpenClaw when a plugin's register() function returns a Promise that is not awaited.
  • Test the modified OpenClaw code with the webhooks plugin to ensure that routes are correctly mounted.

Example

// In OpenClaw code
async function loadPlugin(plugin) {
  if (typeof plugin.register === 'function') {
    // Modify this line to await the register() call
    await plugin.register();
  }
}

Notes

The fix requires modifying the OpenClaw code, which may not be feasible for all users. Additionally, the exact modification will depend on the internal implementation of OpenClaw.

Recommendation

Apply a workaround by modifying the OpenClaw code to await the register() call, as this will fix the issue for all plugins using async register().

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 - ✅(Solved) Fix plugin: async register() return value is not awaited — routes never registered [1 pull requests, 1 participants]