jackwener/OpenCLI · error · CommandExecutionError
Weibo publish failed
Error message
Weibo publish failed
What it means
Thrown when the result poll did get a verdict but it reported failure: finalResult.ok is false and either Weibo's own error message (finalResult.message) was absent or it defaulted to 'Weibo publish failed'. This means Weibo itself rejected or failed the post after the send click, as detected by the page's error toast / missing new post.
Source
Thrown at clis/weibo/publish.js:292
}
for (const m of errorMarkers) {
if (txt.includes(m)) {
return { ok: false, message: txt };
}
}
}
return null;
})()
`);
if (finalResult !== null) break;
}
if (!finalResult) {
throw new CommandExecutionError('Publish button clicked but result was unclear. Check Weibo manually.');
}
if (!finalResult.ok) {
throw new CommandExecutionError(finalResult.message || 'Weibo publish failed');
}
return [{
status: 'success',
message: finalResult.message || 'Published successfully',
text,
}];
},
});
export const __test__ = {
validateText,
validateImagePaths,
};
View on GitHub (pinned to 49907e53dc)
Solutions
- Read the specific message from the error when available — it usually mirrors Weibo's on-page toast
- Check the account on weibo.com for restrictions/verification prompts
- Revise the post content (remove flagged keywords/links) and retry
- Re-login to Weibo in the browser if the session expired
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-screen content locally
const banned = [/敏感/, /赌/, /代刷/];
if (banned.some(re => re.test(text))) {
console.warn('Content may be rejected by Weibo moderation');
} Try / catch
try {
await publishToWeibo(text);
} catch (err) {
if (String(err.message).includes('Weibo publish failed')) {
console.error('Weibo rejected the post. Check account status and revise content.');
} else throw err;
} Prevention
- Avoid sensitive keywords, spammy links, and duplicate posts
- Respect posting frequency limits in automation schedules
- Re-login to Weibo when sessions age out
- Read finalResult.message when present for the actual rejection reason
When it happens
Trigger: page.evaluate result poll returns finalResult = {ok:false, message?...}; the command raises CommandExecutionError(message || 'Weibo publish failed').
Common situations: Weibo content moderation rejected the text (sensitive words, spam heuristics); posting frequency limit hit for the account; session expired mid-flow; images rejected server-side after submit.
Related errors
- 接口错误 code=${result.code}: ${result.msg || result.message}
- Weibo SUB / SUBP cookies missing
- Weibo uid resolver returned a malformed uid
- ${result.detail}
- HTTP ${result.httpStatus} from /ajax/profile/info
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/61ec6e5b99883557.
Report an issue: GitHub.