jackwener/OpenCLI · error · CommandExecutionError
Instagram reel upload input not found
Error message
Instagram reel upload input not found
What it means
After opening the composer, ensureComposerOpen polls up to 12 times (0.5s apart, ~6s) for the file-upload input to become visible; if it never appears it throws CommandExecutionError 'Instagram reel upload input not found' with a hint to use a logged-in session with the new-post composer open. It indicates the composer opened but the expected upload input never rendered.
Source
Thrown at clis/instagram/reel.js:101
&& style.visibility !== 'hidden'
&& rect.width > 0
&& rect.height > 0;
};
const inputs = Array.from(document.querySelectorAll('input[type="file"]'))
.filter((el) => el instanceof HTMLInputElement)
.filter((el) => {
const dialog = el.closest('[role="dialog"]');
return dialog instanceof HTMLElement && isVisible(dialog);
});
return { ok: inputs.length > 0 };
})()
`);
if (ready?.ok)
return;
if (attempt < 11)
await page.wait({ time: 0.5 });
}
throw new CommandExecutionError('Instagram reel upload input not found', 'Open the new-post composer in a logged-in browser session and retry');
}
async function dismissResidualDialogs(page) {
for (let attempt = 0; attempt < 4; attempt += 1) {
const result = await page.evaluate(`
(() => {
const isVisible = (el) => {
if (!(el instanceof HTMLElement)) return false;
const style = window.getComputedStyle(el);
const rect = el.getBoundingClientRect();
return style.display !== 'none'
&& style.visibility !== 'hidden'
&& rect.width > 0
&& rect.height > 0;
};
const dialogs = Array.from(document.querySelectorAll('[role="dialog"]'))
.filter((el) => el instanceof HTMLElement && isVisible(el));
for (const dialog of dialogs) {View on GitHub (pinned to 49907e53dc)
Solutions
- Retry when the network/machine is faster; ensure the composer fully renders before the flow runs.
- Confirm manually that the logged-in session shows the new-post composer with a file input.
- Dismiss any overlapping dialogs (the flow's dismissResidualDialogs may have missed a new variant).
- Update selectors in the library if Instagram changed the upload input markup.
Example fix
// before
await ensureComposerOpen(page); // 12 x 0.5s may be too short on slow loads
// after
await gotoInstagramHome(page);
await page.wait({ time: 3 }); // let SPA finish hydrating
await ensureComposerOpen(page); Defensive patterns
Strategy: retry
Validate before calling
await ensureComposerOpen(page);
await page.wait({ time: 2 }); // give the composer SPA time to render the input Try / catch
try { await reel(args); } catch (e) { if (e.message.includes('upload input not found')) { await page.wait({ time: 3 }); return reel(args); } throw e; } Prevention
- Run on a machine/network fast enough to render the composer within seconds
- Dismiss residual dialogs before opening the composer
- Retry once on transient failures
- Update selectors if Instagram changes composer markup
When it happens
Trigger: Composer opened but the file input selector never matched within ~6 seconds — slow page load, Instagram served a different composer variant, input hidden behind a dialog/overlay, or composer markup changed.
Common situations: Slow network/machine exceeding the ~6s poll window, residual modal dialogs blocking the composer, Instagram A/B UI differences, or the account shown a 'create' flow variant without the expected input.
Related errors
- Instagram private publish configure_sidecar timed out waitin
- Failed to download ${item.filename}: ${result.error || 'unkn
- Instagram caption editor did not appear
- Instagram post share confirmation did not appear
- Failed to open Instagram reel composer
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/fdeb7425992cd799.
Report an issue: GitHub.