{"record":{"id":"e498532cf65dc4cd","repo":"jackwener/OpenCLI","slug":"verb-could-not-be-verified-no-success-marker-o","errorCode":null,"errorMessage":"${verb} could not be verified: no success marker or post-submit navigation was observed. ${finalUrl ? `Current URL: ${finalUrl}` : 'Current URL was empty.'}","messagePattern":"(.+?) could not be verified: no success marker or post-submit navigation was observed\\. (.+?)` : 'Current URL was empty\\.'\\}","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/xiaohongshu/publish.js","lineNumber":1430,"sourceCode":"        const successMarkers = isDraft\n            ? ['草稿已保存', '暂存成功', '保存成功', '保存于', '图文笔记(']\n            : ['发布成功', '上传成功'];\n        const successMsg = await page.evaluate(`\n      (markers => {\n        for (const el of document.querySelectorAll('*')) {\n          if (el.tagName === 'STYLE' || el.tagName === 'SCRIPT') continue;\n          const text = (el.innerText || '').trim();\n          if (text.length > 200) continue;\n          if (el.children.length === 0 && markers.some(marker => text.includes(marker))) return text;\n        }\n        return '';\n      })(${JSON.stringify(successMarkers)})\n    `);\n        const navigatedAway = !finalUrl.includes('/publish/publish');\n        const isSuccess = successMsg.length > 0 || navigatedAway;\n        const verb = isDraft ? '暂存成功' : '发布成功';\n        if (!isSuccess) {\n            throw new CommandExecutionError(`${verb} could not be verified: no success marker or post-submit navigation was observed. ` +\n                (finalUrl ? `Current URL: ${finalUrl}` : 'Current URL was empty.'));\n        }\n        return [\n            {\n                status: `✅ ${verb}`,\n                detail: [\n                    `\"${title}\"`,\n                    isTextImage\n                        ? `${cards.length}张文字配图${absImagePaths.length ? ` + ${absImagePaths.length}张图片` : ''}${appliedCardStyle && appliedCardStyle !== DEFAULT_CARD_STYLE ? ` (${appliedCardStyle})` : ''}`\n                        : `${absImagePaths.length}张图片`,\n                    addedTopics.length ? `话题: ${addedTopics.join(' ')}` : '',\n                    successMsg || finalUrl || '',\n                ]\n                    .filter(Boolean)\n                    .join(' · '),\n            },\n        ];\n    },","sourceCodeStart":1412,"sourceCodeEnd":1448,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/xiaohongshu/publish.js#L1412-L1448","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Re-run a status/list command to check whether the note was actually published or drafted before blindly retrying (avoid duplicates).","Check for form validation errors on the publish page and fix title/description/cover.","Retry with a longer patience — slow processing is common.","Re-capture login if a verification dialog appeared, then retry."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await publish(opts);\n} catch (e) {\n  if (String(e.message).includes('could not be verified')) {\n    // treat as unknown, NOT as failure — check actual state before retrying\n    const existing = execSync('opencli xiaohongshu list-notes').toString();\n    if (existing.includes(opts.title)) return; // already published\n    throw e;\n  }\n  throw e;\n}","preventionTips":["Never blind-retry after this error — verify actual publish state first to avoid duplicates.","Allow extra time between submit and verification-sensitive workflows.","Watch for URL info in the message: still on /publish/publish usually means a validation error on the page.","Re-capture login if captchas are recurring on the account."],"tags":["verification","timeout","browser-automation","xiaohongshu"],"backgroundTag":"publish-verification-failed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}