-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Feishu MEDIA/image upload fails when appSecret uses SecretRef (Keychain) #89338
Copy link
Copy link
Open
Open
Copy link
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Type
Fields
Priority
None yet
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
After migrating Feishu bot credentials (
appSecret) from plaintext to SecretRef (macOS Keychain via exec provider), the MEDIA directive can no longer send local images to Feishu chats. The image upload silently fails because the Feishu SDK in the MEDIA code path does not resolve SecretRef objects — it reads the rawappSecretfield value, which is now{ source: "exec", provider: "...", id: "value" }instead of the actual secret string.Steps to reproduce
appSecretas a SecretRef:{ "channels": { "feishu": { "accounts": { "main-bot": { "appId": "cli_xxx", "appSecret": { "source": "exec", "provider": "keychain_feishu_main-bot", "id": "value" } } } } } }Expected behavior
The Feishu SDK should resolve SecretRef objects before using
appSecret, or the MEDIA upload code path should use the same credential resolution mechanism as the main WebSocket connection.Actual behavior
Root Cause
The Feishu SDK's image upload path (used by MEDIA directive to call
POST /open-apis/im/v1/images) does not go through the SecretRef resolution layer when readingappSecret. It reads the raw field value from the config object.When
appSecretwas a plain string, this worked fine. After migration to SecretRef, the value is an object{ source: "exec", ... }, which the SDK passes as-is to the authentication call. This results in a failed token acquisition, and the image upload silently fails.Other Feishu features (WebSocket messaging, document read/write) work correctly because they use a different credential resolution path that properly handles SecretRef.
Confirmed by Testing
Impact
send_feishu_file.shworkaround (which hardcodes the secret) is not a viable cross-agent solutionOpenClaw version
2026.5.28
Operating system
macOS Tahoe 26.5 (arm64)
Install method
No response
Model
Deepseek V4 Flash
Provider / routing chain
Deepseek
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response