jackwener/OpenCLI · error · TimeoutError
No finished image appeared before timeout. Re-run with a hig
Error message
No finished image appeared before timeout. Re-run with a higher --timeout if it is still generating.
What it means
TimeoutError for image generation: the loop collects finished image URLs, and if at deadline the page was still visibly rendering and zero finished images had appeared, the library treats it as a temporary in-progress failure and throws.
Source
Thrown at clis/chatgpt/utils.js:2724
if (urls.length === 0) continue;
const key = urls.join('\n');
const prevKey = lastUrls.join('\n');
if (key === prevKey) {
stableCount += 1;
} else {
lastUrls = urls;
stableCount = 1;
}
if (stableCount >= 2 || i === maxPolls - 1) {
return lastUrls;
}
}
// A deadline that lands while ChatGPT is visibly mid-generation is a
// temporary failure, not an empty conversation. Mirror the ask wait.
if (!lastUrls.length && stillRendering) {
throw new TimeoutError(
'chatgpt image',
timeoutSeconds,
'No finished image appeared before timeout. Re-run with a higher --timeout if it is still generating.',
);
}
return lastUrls;
}
/**
* Get the list of ChatGPT Projects from the sidebar.
* Navigates to chatgpt.com if not already there, opens the sidebar,
* and extracts project links (matching /g/g-p-*).
*/
export async function getProjectList(page) {
await ensureOnChatGPT(page);
// Ensure sidebar is open
const openSidebar = requireBooleanEvaluateResult(unwrapEvaluateResult(await page.evaluate(`(() => {View on GitHub (pinned to 49907e53dc)
Solutions
- Re-run with a higher --timeout (image jobs can queue for minutes)
- Check the conversation manually — if the image finished after the deadline, scrape the URL directly
- Retry the request; a queued/stalled job often succeeds on a second attempt
- Reduce prompt complexity or request fewer images per prompt
Example fix
// before
await chatgptImage(page, prompt); // default timeout
// after
await chatgptImage(page, prompt, { timeout: 600 }); // 10 min Defensive patterns
Strategy: retry
Try / catch
try {
await waitForChatGPTImages(page, { timeoutSeconds: 180 });
} catch (e) {
if (e instanceof TimeoutError && e.operation === 'chatgpt image') {
// retry once with timeoutSeconds: 600
} else throw e;
} Prevention
- Allow several minutes for image generation, more under load
- Check the conversation for finished images that landed just after the deadline
- Simplify prompts / request fewer images to shorten generation time
When it happens
Trigger: chatgpt image wait reached timeoutSeconds while stillRendering was true and lastUrls was empty — the image generation never completed within the window.
Common situations: Complex image prompts taking longer than --timeout; ChatGPT image service congestion; user lowered the timeout too aggressively; generation stalled showing a shimmer/spinner indefinitely.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- chatgpt image
- --timeout must be a positive integer (seconds)
- chatgpt detail
- chatgpt deep-research-result
- No ChatGPT response appeared before timeout. Re-run with a h
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/78ca10955f40a9ef.
Report an issue: GitHub.