-
Notifications
You must be signed in to change notification settings - Fork 605
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Plugin Version
v1.1.0-beta.6, v1.0.9
OpenClaw Version
2026.3.24
Bug Description
The memory-lancedb-pro plugin fails to register properly with OpenClaw 2026.3.24 due to an SDK incompatibility. The plugin attempts to import stringEnum from openclaw/plugin-sdk, but this function is not exported by the SDK.
This causes:
- Continuous plugin registration failures
- Excessive plugin reload attempts (130+ per hour)
- Memory leak (each failed load consumes memory)
- Heap exhaustion (reached 92% usage before fix)
- Gateway crashes due to OOM errors
.
🛠️ Proposed Fix
Replace stringEnum with TypeBox Type.Union of Type.Literal values:
Before (broken):
import { stringEnum } from "openclaw/plugin-sdk";
export const MEMORY_CATEGORIES = ["preference", "fact", "decision", "entity", "other"] as const;
// Usage:
category: Type.Optional(stringEnum(MEMORY_CATEGORIES))After (working):
// Remove stringEnum import
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
export const MEMORY_CATEGORIES = ["preference", "fact", "decision", "entity", "other"] as const;
// Add TypeBox Union schema
export const MemoryCategorySchema = Type.Union([
Type.Literal("preference"),
Type.Literal("fact"),
Type.Literal("decision"),
Type.Literal("entity"),
Type.Literal("other")
]);
// Usage (replace all 4 occurrences):
category: Type.Optional(MemoryCategorySchema)✅ Test Results
Before Patch:
Plugin Errors: Continuous (stringEnum failures)
Plugin Loads: 130/hour (retry loop)
Memory Usage: 3781 MB (92% of 4GB)
Gateway Stability: CRITICAL (crashes every 2-4 hours)
After Patch:
Plugin Errors: 0 (zero)
Plugin Loads: 4/hour (normal)
Memory Usage: 1040 MB (17% of 6GB)
Gateway Stability: GOOD (stable for 24+ hours)
Expected Behavior
✅ Expected Behavior
Plugin should:
- Import
stringEnumsuccessfully from SDK - Register once at startup
- Provide memory management tools
- Maintain stable memory usage
❌ Actual Behavior
Plugin fails with:
TypeError: (0 , _pluginSdk.stringEnum) is not a function
Observed behavior:
- Plugin attempts to register repeatedly (130+ times/hour)
- Each attempt fails with TypeError
- Memory accumulates with each failed attempt
- Gateway eventually crashes with OOM error
Steps to Reproduce
🔄 Steps to Reproduce
- Install OpenClaw 2026.3.24
- Install memory-lancedb-pro plugin (v1.0.9 or v1.1.0-beta.6)
- Configure plugin in
openclaw.json:
{
"plugins": {
"entries": {
"memory-lancedb-pro": {
"enabled": true,
"config": {
"embedding": {
"provider": "openai-compatible",
"model": "mxbai-embed-large",
"baseURL": "http://ollama1:11434/v1",
"dimensions": 1024
}
}
}
}
}
}- Start OpenClaw Gateway
- Observe logs for plugin registration errors
Error Logs / Screenshots
### Error Logs
Mar 28 22:38:12 gateway[2233606]: [plugins] memory-lancedb-pro@1.0.9: plugin registered
Mar 28 22:38:12 gateway[2233606]: [plugins] memory-lancedb-pro failed during register: TypeError: (0 , _pluginSdk.stringEnum) is not a function
### Memory Impact
Before Plugin: ~800 MB heap usage
With Plugin Error: ~3800 MB heap usage (92% of 4GB limit)
Crash Threshold: 4096 MB heap limitEmbedding Provider
Ollama
OS / Platform
OS: Linux 6.12.63+deb13-amd64 (x64); Node.js: v24.13.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working