openclaw - 💡(How to fix) Fix Fix: Stub legacyConfigRules in Slack contract API to prevent crash [1 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#63361Fetched 2026-04-09 07:54:45
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1mentioned ×1subscribed ×1

Error Message

TypeError: Cannot read properties of undefined (reading 't') at Object.get [as legacyConfigRules] (dist/extensions/slack/contract-api.js:1:647) at resolvePluginDoctorContracts (file:///home/clawmander/.npm-global/lib/node_modules/openclaw/dist/config-DMMR1XE_.js:220:52)

Root Cause

The plugin's contract-api.js re-exports legacyConfigRules from ../../doctor-contract-Byp5_Sbd.js, but OpenClaw loads it via jiti which fails on those nested imports. The getter then reads .t on undefined.

Fix Action

Solution

Stub legacyConfigRules as an empty array in contract-api.js when the plugin is disabled. Since the plugin is disabled, the contract rules won't be evaluated anyway.

Code Example

TypeError: Cannot read properties of undefined (reading 't')
 at Object.get [as legacyConfigRules] (dist/extensions/slack/contract-api.js:1:647)
 at resolvePluginDoctorContracts (file:///home/clawmander/.npm-global/lib/node_modules/openclaw/dist/config-DMMR1XE_.js:220:52)

---

// Before:
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "../../doctor-contract-Byp5_Sbd.js";

// After:
import { n as normalizeCompatibilityConfig } from "../../doctor-contract-Byp5_Sbd.js";
// Stub legacyConfigRules to prevent crash when jiti fails to load nested ESM imports
const legacyConfigRules = [];
RAW_BUFFERClick to expand / collapse

Problem

When the Slack plugin is disabled but present in config, OpenClaw crashes with:

TypeError: Cannot read properties of undefined (reading 't')
 at Object.get [as legacyConfigRules] (dist/extensions/slack/contract-api.js:1:647)
 at resolvePluginDoctorContracts (file:///home/clawmander/.npm-global/lib/node_modules/openclaw/dist/config-DMMR1XE_.js:220:52)

This occurs because legacyConfigRules is re-exported from a nested ESM file (doctor-contract-Byp5_Sbd.js) that fails to load via jiti, leaving the import undefined.

Root Cause

The plugin's contract-api.js re-exports legacyConfigRules from ../../doctor-contract-Byp5_Sbd.js, but OpenClaw loads it via jiti which fails on those nested imports. The getter then reads .t on undefined.

Solution

Stub legacyConfigRules as an empty array in contract-api.js when the plugin is disabled. Since the plugin is disabled, the contract rules won't be evaluated anyway.

Patch

// Before:
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "../../doctor-contract-Byp5_Sbd.js";

// After:
import { n as normalizeCompatibilityConfig } from "../../doctor-contract-Byp5_Sbd.js";
// Stub legacyConfigRules to prevent crash when jiti fails to load nested ESM imports
const legacyConfigRules = [];

Testing

  • Verified fix resolves crash on OpenClaw 2026.4.8
  • Slack disabled: no impact (empty array never used)
  • Slack enabled: would need additional testing (not applicable for this patch)

Notes

This is a defensive fix for disabled plugins. The proper long-term fix would be to ensure nested ESM imports resolve correctly via jiti, but this stub prevents crashes for users with disabled Slack plugins.

extent analysis

TL;DR

Stub legacyConfigRules as an empty array in contract-api.js to prevent crashes when the Slack plugin is disabled.

Guidance

  • Identify the contract-api.js file and locate the import statement for legacyConfigRules to apply the fix.
  • Verify that the Slack plugin is indeed disabled in the configuration to ensure the stubbing of legacyConfigRules is necessary.
  • Test the fix by running OpenClaw with the Slack plugin disabled to confirm that the crash is resolved.
  • Consider additional testing with the Slack plugin enabled to ensure the stubbing does not introduce unintended behavior.

Example

// In contract-api.js, replace the import statement with:
import { n as normalizeCompatibilityConfig } from "../../doctor-contract-Byp5_Sbd.js";
const legacyConfigRules = []; // Stub legacyConfigRules to prevent crash

Notes

This fix is a defensive measure to prevent crashes when the Slack plugin is disabled. A long-term solution would involve ensuring nested ESM imports resolve correctly via jiti.

Recommendation

Apply the workaround by stubbing legacyConfigRules as an empty array, as this provides a immediate fix for the crash issue when the Slack plugin is disabled.

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