jackwener/OpenCLI · error · CommandExecutionError
点击草稿按钮失败: creation-id-missing
Error message
点击草稿按钮失败: creation-id-missing
What it means
After clicking '暂存离开', clickSaveDraft walks the React fiber tree of the title input to read props.creation_id. If the click succeeded but no creation_id string was found on any fiber ancestor, it throws this CommandExecutionError with reason 'creation-id-missing'.
Source
Thrown at clis/douyin/draft.js:265
stopPropagation() {},
nativeEvent: null,
target: btn,
currentTarget: btn,
});
} else {
btn.click();
}
return {
ok: true,
text: (btn.textContent || '').trim(),
creationId,
};
}`));
if (!result?.ok) {
throw new CommandExecutionError(`点击草稿按钮失败: ${result?.reason || 'unknown'}`);
}
if (!result.creationId) {
throw new CommandExecutionError('点击草稿按钮失败: creation-id-missing');
}
return {
text: result.text || '暂存离开',
creationId: result.creationId,
};
}
/**
* Wait until creator center shows the resumable-draft prompt after saving.
*/
async function waitForDraftResult(page, creationId) {
let lastState = { href: '', bodyText: '' };
for (let attempt = 0; attempt < 20; attempt += 1) {
lastState = (await page.evaluate(`() => ({
href: location.href,
bodyText: document.body?.innerText || ''
})`));
if (lastState.href.includes('/creator-micro/content/upload')
&& /继续编辑/.test(lastState.bodyText)) {View on GitHub (pinned to 49907e53dc)
Solutions
- Retry with a slightly longer delay before saving (the id may not be assigned yet) — e.g. add a wait before clickSaveDraft
- Check whether creation_id now appears in the page URL or global store; extract from there instead of the fiber walk
- Update the fiber key prefix ('__reactFiber$') in clis/douyin/draft.js:223 if React internals changed
Example fix
// before: only fiber props
if (typeof props?.creation_id === 'string' && props.creation_id) return props.creation_id;
// after: fall back to URL
const fromUrl = new URLSearchParams(location.search).get('creation_id');
return props?.creation_id || fromUrl || ''; Defensive patterns
Strategy: try-catch
Try / catch
try {
const r = await opencli.douyin.draft({ video, title });
} catch (e) {
if (e.message.includes('creation-id-missing')) {
// retry with a longer pre-save delay so the server assigns creation_id
}
} Prevention
- Add a short wait between form fill and save so the id gets assigned
- Add URL/global-store fallbacks for creation_id extraction
- Keep fiber-key prefixes ('__reactFiber$') current with the React version Douyin ships
When it happens
Trigger: Douyin moved creation_id off React fiber props (different state management, e.g. redux/store or URL only), the upload hadn't been assigned an id yet when saving very fast, or the title input's fiber root no longer carries the prop.
Common situations: Douyin frontend refactor changing where creation_id lives; saving immediately after upload before server assigns the id; internal React version change altering fiber key names ('__reactFiber$' prefix change).
Related errors
- 等待抖音草稿编辑页超时
- 填写抖音草稿表单失败: title-input-missing
- 填写抖音草稿表单失败: caption-editor-missing
- 填写抖音草稿表单失败: visibility-missing
- 等待抖音封面处理完成超时
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/43d310741a3c73d4.
Report an issue: GitHub.