← Tech

All Cron Feishu Messages Fail After openclaw-lark Plugin Upgrade: open_id Changed

2026-03-16 DevOps openclaw-larkopen_id飞书插件升级

Problem

After upgrading the openclaw-lark plugin, all cron jobs that send Feishu messages started failing with:

99992361 open_id cross app

The job logic didn't change. The Feishu account didn't change. Just upgraded a plugin, and all messages broke.

Root Cause

Feishu's open_id is app-scoped. The same user has a different open_id under different Feishu apps (AppIDs).

When openclaw-lark upgraded, it switched to a new AppID, so the plugin now resolves a different open_id (e.g. from ou_629bf94d... to ou_bcb32a45...). The hardcoded values in configs still reference the old ID, so Feishu rejects them: "This open_id doesn't belong to your app."

Error code 99992361 means exactly this — cross-app use of another app's open_id.

Diagnosis

# Find all files hardcoding the old open_id

grep -r "ou_629bf94d" ~/.openclaw/ --include="*.json" --include="*.env" --include="*.sh" -l

# Get the new open_id

# Ask OpenClaw: "What is my Feishu open_id?"

# Or call Feishu API: GET /open-apis/contact/v3/users/me

Affected files in this case:

19 hardcoded references total.

Fix

Batch replace with sed:

OLD_ID="ou_629bf94d12345678"

NEW_ID="ou_bcb32a45abcdef12"

# Replace in all JSON files

find ~/.openclaw -name "*.json" -exec sed -i "s/${OLD_ID}/${NEW_ID}/g" {} \;

# Replace in .env

sed -i "s/${OLD_ID}/${NEW_ID}/g" ~/.openclaw/.env

# Replace in shell scripts

find ~/.openclaw -name "*.sh" -exec sed -i "s/${OLD_ID}/${NEW_ID}/g" {} \;

# Verify no leftovers

grep -r "$OLD_ID" ~/.openclaw/ 2>/dev/null | wc -l

# Should output 0

Prevention

Extract open_id into an environment variable — never hardcode it:

# ~/.openclaw/.env

FEISHU_USER_OPEN_ID=ou_bcb32a45abcdef12

// Reference env var in jobs.json

{

"name": "daily-report",

"target": "${FEISHU_USER_OPEN_ID}"

}

Next time the plugin upgrades, change one line in .env and everything updates automatically.

Pre-upgrade checklist:

1. Check whether the new version changes the AppID (read CHANGELOG or ask the author)

2. If it does, get the new open_id before upgrading

3. Run a smoke test immediately after upgrading — don't wait for cron to fire and fail