{"record":{"id":"79837977d37da1b1","repo":"jackwener/OpenCLI","slug":"instagram-reel-share-confirmation-did-not-appear","errorCode":null,"errorMessage":"Instagram reel share confirmation did not appear","messagePattern":"Instagram reel share confirmation did not appear","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/instagram/reel.js","lineNumber":628,"sourceCode":"        const result = await page.evaluate(buildReelPublishStatusProbeJs());\n        if (result?.failed) {\n            throw new CommandExecutionError('Instagram reel share failed');\n        }\n        if (result?.ok) {\n            return result.url || '';\n        }\n        if (result?.settled) {\n            settledStreak += 1;\n            if (settledStreak >= 3)\n                return '';\n        }\n        else {\n            settledStreak = 0;\n        }\n        if (attempt < 119)\n            await page.wait({ time: 1 });\n    }\n    throw new CommandExecutionError('Instagram reel share confirmation did not appear');\n}\nasync function resolveProfileUrl(page, currentUserId = '') {\n    if (currentUserId) {\n        const runtimeInfo = await resolveInstagramRuntimeInfo(page);\n        const apiResult = await page.evaluate(`\n      (async () => {\n        const userId = ${JSON.stringify(currentUserId)};\n        const appId = ${JSON.stringify(runtimeInfo.appId || '')};\n        try {\n          const res = await fetch(\n            'https://www.instagram.com/api/v1/users/' + encodeURIComponent(userId) + '/info/',\n            {\n              credentials: 'include',\n              headers: appId ? { 'X-IG-App-ID': appId } : {},\n            },\n          );\n          if (!res.ok) return { ok: false };\n          const data = await res.json();","sourceCodeStart":610,"sourceCodeEnd":646,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/instagram/reel.js#L610-L646","documentation":"After sharing, waitForPublishSuccess polls the page for up to 120 seconds looking for the success state (post URL or confirmation) via buildReelPublishStatusProbeJs(). If no failure is detected but the success/settled confirmation never appears within the timeout, the library throws this error — the share outcome is unknown/unfinished.","triggerScenarios":"120 probe attempts pass with result neither ok, failed, nor persistently settled — e.g. the dialog stays in a processing state forever, the page navigated somewhere the probe doesn't understand, or the success UI never rendered.","commonSituations":"Very large/slow uploads exceeding the 2-minute window, Instagram stuck 'Processing...' spinner, a DOM change so the probe no longer recognizes the success confirmation, or the tab navigated away mid-publish (probe evaluates against a different document).","solutions":["Simply check the profile in the Instagram app/web — the reel often did publish and only the confirmation detection timed out.","Retry after confirming the reel is not a duplicate, since a blind retry can post it twice.","Increase headroom: use a smaller/faster-encoded video so processing finishes within the 120s poll window.","Update the library if Instagram changed the success-confirmation markup so the probe can detect it again."],"exampleFix":"// before\n// 250MB 3-minute video -> publish exceeds 120s poll window\n// after\n// re-encode to <100MB, <=90s, 1080x1920 so Instagram processing finishes well inside the timeout","handlingStrategy":"try-catch","validationCode":"// keep uploads small enough that Instagram processing fits the confirmation window\nimport { statSync } from 'node:fs';\nif (statSync(videoPath).size > 100 * 1024 * 1024) {\n  throw new Error('Re-encode: file too large to publish within confirmation window');\n}","typeGuard":"null","tryCatchPattern":"try {\n  await client.shareReel({ videoPath, caption });\n} catch (err) {\n  if (String(err.message).includes('confirmation did not appear')) {\n    // outcome unknown: verify on the profile before retrying to avoid duplicates\n    const published = await checkProfileForRecentReel(client);\n    if (!published) await client.shareReel({ videoPath, caption });\n  } else throw err;\n}","preventionTips":["After a confirmation timeout, always check the profile before retrying to prevent double-posting","Keep videos small/short so processing completes inside the 120s window","Don't navigate or close the tab mid-publish","Update the library if Instagram changes the success-confirmation UI"],"tags":["instagram","timeout","automation","browser-automation"],"backgroundTag":"publish-confirmation-timeout","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}