jackwener/OpenCLI · error · CommandExecutionError
填写抖音草稿表单失败: title-input-missing
Error message
填写抖音草稿表单失败: title-input-missing
What it means
fillDraftComposer looks for an <input> whose placeholder contains '填写作品标题' to type the video title. If no such input exists on the composer page it throws this CommandExecutionError with reason 'title-input-missing'. The composer was detected (waitForDraftComposer passed) but the title field cannot be found at fill time.
Source
Thrown at clis/douyin/draft.js:93
} else {
titleInput.focus();
titleInput.value = ${JSON.stringify(options.title)};
titleInput.dispatchEvent(new Event('input', { bubbles: true }));
titleInput.dispatchEvent(new Event('change', { bubbles: true }));
}
if (props?.onBlur) {
props.onBlur({
target: titleInput,
currentTarget: titleInput,
relatedTarget: null,
});
} else {
titleInput.dispatchEvent(new Event('blur', { bubbles: true }));
}
return true;
}`));
if (!titleOk) {
throw new CommandExecutionError('填写抖音草稿表单失败: title-input-missing');
}
if (options.caption) {
const captionOk = (await page.evaluate(`() => {
const editor = document.querySelector('[contenteditable="true"]');
if (!(editor instanceof HTMLElement)) return false;
editor.focus();
editor.textContent = '';
document.execCommand('selectAll', false);
document.execCommand('insertText', false, ${JSON.stringify(options.caption)});
editor.dispatchEvent(new Event('input', { bubbles: true }));
return true;
}`));
if (!captionOk) {
throw new CommandExecutionError('填写抖音草稿表单失败: caption-editor-missing');
}
}
const visibilityOk = (await page.evaluate(`() => {
const visibility = Array.from(document.querySelectorAll('label')).find(View on GitHub (pinned to 49907e53dc)
Solutions
- Re-run the command once — transient modals or re-renders often resolve it (dismissKnownModals runs again on retry)
- Screenshot/inspect the page at failure and check whether the title input's placeholder text changed; update the selector in clis/douyin/draft.js:64
- Ensure no manual interference (other tabs/scripts) mutating the page during the run
Example fix
// before
(el) => (el.placeholder || '').includes('填写作品标题')
// after: accept known variants
const TITLE_PLACEHOLDERS = ['填写作品标题', '填写标题', '标题'];
(el) => TITLE_PLACEHOLDERS.some((p) => (el.placeholder || '').includes(p)) Defensive patterns
Strategy: try-catch
Try / catch
try {
await opencli.douyin.draft({ video, title });
} catch (e) {
if (e.message.includes('title-input-missing')) {
// capture a screenshot of the composer, compare placeholder text, retry once
}
} Prevention
- Retry transient selector failures once before surfacing
- Keep selectors tolerant of placeholder-text variants
- Pin/watch for creator-center UI changes in your integration tests
When it happens
Trigger: Douyin rendered a different composer variant (A/B test) without the '填写作品标题' placeholder; a coach-mark/modal covers or replaces the form between the ready check and the fill step; DOM re-render removed the input before evaluate ran.
Common situations: Douyin UI update changing the placeholder text; intermittent modal ('我知道了' tips) appearing after the ready check; running against a regional/beta version of creator center.
Related errors
- 填写抖音草稿表单失败: caption-editor-missing
- 填写抖音草稿表单失败: visibility-missing
- 点击草稿按钮失败: ${result?.reason || 'unknown'}
- Waiting for 12306 tk auth cookie
- ChatGPT composer is not available on the current page.
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/2bfe958fbde1f171.
Report an issue: GitHub.