firecrawl/open-lovable · error · Error
Screenshot not available in response - check console for ful
Error message
Screenshot not available in response - check console for full response structure
What it means
Thrown when Firecrawl reports success (HTTP ok, success not false) but the response contains no `data.screenshot` field. The full response is logged server-side; the message tells the developer the scrape worked but the requested screenshot output is missing — usually because screenshot capture wasn't requested or the page rendered nothing.
Source
Thrown at app/api/scrape-screenshot/route.ts:68
success: true,
screenshot: scrapeResult.screenshot,
metadata: scrapeResult.metadata || {}
});
} else if ((scrapeResult as any)?.data?.screenshot) {
// Nested data structure
return NextResponse.json({
success: true,
screenshot: (scrapeResult as any).data.screenshot,
metadata: (scrapeResult as any).data.metadata || {}
});
} else if ((scrapeResult as any)?.success === false) {
// Explicit failure
console.error('[scrape-screenshot] Firecrawl API error:', (scrapeResult as any).error);
throw new Error((scrapeResult as any).error || 'Failed to capture screenshot');
} else {
// No screenshot in response
console.error('[scrape-screenshot] No screenshot in response. Full response:', JSON.stringify(scrapeResult, null, 2));
throw new Error('Screenshot not available in response - check console for full response structure');
}
} catch (error: any) {
console.error('[scrape-screenshot] Screenshot capture error:', error);
console.error('[scrape-screenshot] Error stack:', error.stack);
// Provide fallback response for development - removed NODE_ENV check as it doesn't work in Next.js production builds
return NextResponse.json({
error: error.message || 'Failed to capture screenshot'
}, { status: 500 });
}
}View on GitHub (pinned to 69bd93bae7)
Solutions
- Check the server console for 'No screenshot in response. Full response:' and inspect the payload structure
- Ensure the Firecrawl request body explicitly includes the screenshot format (e.g. `formats: ['screenshot']` for v2)
- Verify the target URL is a renderable public web page (not a PDF, download, or auth-gated page)
- Handle `fullPage`/screenshot options per the installed SDK version and add a fallback message with the returned formats
Example fix
// before
const scrapeResult = await app.scrapeUrl(url, {});
// after
const scrapeResult = await app.scrapeUrl(url, { formats: ['screenshot', 'metadata'] }); Defensive patterns
Strategy: validation
Validate before calling
if (!scrapeResult?.data?.screenshot) {
throw new Error(`No screenshot returned. formats received: ${Object.keys(scrapeResult?.data || {})}`);
} Type guard
function hasScreenshot(r: any): r is { data: { screenshot: string } } {
return typeof r?.data?.screenshot === 'string' && r.data.screenshot.length > 0;
} Try / catch
try {
return await captureScreenshot(url);
} catch (e) {
if (e.message.startsWith('Screenshot not available')) {
// check logged response structure; ensure formats includes 'screenshot' and retry
return captureScreenshotWithExplicitFormats(url);
}
throw e;
} Prevention
- Always request the screenshot format explicitly in the scrape options (v2: formats: ['screenshot'])
- Verify the target page is a renderable public web page (not PDF/download/login-gated)
- Check the logged response structure after any Firecrawl SDK or API version bump
- Type-check/validate the response payload before accessing data.screenshot
When it happens
Trigger: POST /api/scrape-screenshot where scrapeResult.success is true but `data.screenshot` is undefined: the scrape request omitted/failed the screenshot format, Firecrawl skipped capture for the page type, or the v1 endpoint was used without `formats: ['screenshot']`.
Common situations: Calling the scrape endpoint without `formats: ['screenshot']` in the body; scraping PDFs or pages Firecrawl can't render; response schema differences between Firecrawl v1/v2 clients; stale SDK returning a different payload nesting.
Related errors
- No branding data in Firecrawl response
- Failed to capture screenshot
- Firecrawl API returned ${firecrawlResponse.status}
- Failed to scrape content
- Firecrawl API key not configured
AI-assisted analysis of firecrawl/open-lovable@69bd93bae7 (2026-08-28).
Data as JSON: /api/errors/b493e27bed8cae9a.
Report an issue: GitHub.