jackwener/OpenCLI · error · CommandExecutionError

${verb} could not be verified: no success marker or post-sub

Error message

${verb} could not be verified: no success marker or post-submit navigation was observed. ${finalUrl ? `Current URL: ${finalUrl}` : 'Current URL was empty.'}

What it means

After triggering publish/暂存, the CLI verifies success by finding a success marker (发布成功/暂存成功 text) or navigation away from /publish/publish. If neither is observed within the wait, the outcome is unknown and the CLI reports the action as unverifiable rather than claiming success.

Source

Thrown at clis/xiaohongshu/publish.js:1430

        const successMarkers = isDraft
            ? ['草稿已保存', '暂存成功', '保存成功', '保存于', '图文笔记(']
            : ['发布成功', '上传成功'];
        const successMsg = await page.evaluate(`
      (markers => {
        for (const el of document.querySelectorAll('*')) {
          if (el.tagName === 'STYLE' || el.tagName === 'SCRIPT') continue;
          const text = (el.innerText || '').trim();
          if (text.length > 200) continue;
          if (el.children.length === 0 && markers.some(marker => text.includes(marker))) return text;
        }
        return '';
      })(${JSON.stringify(successMarkers)})
    `);
        const navigatedAway = !finalUrl.includes('/publish/publish');
        const isSuccess = successMsg.length > 0 || navigatedAway;
        const verb = isDraft ? '暂存成功' : '发布成功';
        if (!isSuccess) {
            throw new CommandExecutionError(`${verb} could not be verified: no success marker or post-submit navigation was observed. ` +
                (finalUrl ? `Current URL: ${finalUrl}` : 'Current URL was empty.'));
        }
        return [
            {
                status: `✅ ${verb}`,
                detail: [
                    `"${title}"`,
                    isTextImage
                        ? `${cards.length}张文字配图${absImagePaths.length ? ` + ${absImagePaths.length}张图片` : ''}${appliedCardStyle && appliedCardStyle !== DEFAULT_CARD_STYLE ? ` (${appliedCardStyle})` : ''}`
                        : `${absImagePaths.length}张图片`,
                    addedTopics.length ? `话题: ${addedTopics.join(' ')}` : '',
                    successMsg || finalUrl || '',
                ]
                    .filter(Boolean)
                    .join(' · '),
            },
        ];
    },

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Re-run a status/list command to check whether the note was actually published or drafted before blindly retrying (avoid duplicates).
  2. Check for form validation errors on the publish page and fix title/description/cover.
  3. Retry with a longer patience — slow processing is common.
  4. Re-capture login if a verification dialog appeared, then retry.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await publish(opts);
} catch (e) {
  if (String(e.message).includes('could not be verified')) {
    // treat as unknown, NOT as failure — check actual state before retrying
    const existing = execSync('opencli xiaohongshu list-notes').toString();
    if (existing.includes(opts.title)) return; // already published
    throw e;
  }
  throw e;
}

Prevention

When it happens

Trigger: Post-submit page still shows the composer URL with no success toast/message captured and finalUrl still contains '/publish/publish' (or finalUrl is empty because the evaluate failed).

Common situations: Slow xiaohongshu processing exceeded the 4s verification wait, a validation error appeared on the form (e.g. missing description), a captcha/verification dialog blocked submission, or the success toast disappeared before it was sampled.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/e498532cf65dc4cd. Report an issue: GitHub.