pbakaus/impeccable · info
[impeccable] shader resume failed:
Error message
[impeccable] shader resume failed:
What it means
When a GENERATING session resumes (e.g. after a page reload), the client asynchronously re-captures the target element (or insert placeholder) to restart the shader overlay at the right coordinates. Any throw inside that async block — element gone after reload, capture failure of the same class as the main path — is logged as 'shader resume failed:' and swallowed; resume itself succeeds, only the overlay is missing.
Source
Thrown at skill/scripts/live-browser.js:9238
// If we reloaded mid-generation (Bun's HTML HMR destroys the shader
// canvas), re-capture the original's content and restart the shader so
// the wait doesn't go dead.
if (state === 'GENERATING') {
const shaderTarget = isInsert
? (ensureInsertPlaceholder() || findInsertAnchorInDom())
: origEl;
if (shaderTarget) {
(async () => {
try {
const rect = shaderTarget.getBoundingClientRect();
if (rect.width === 0 || rect.height === 0) return;
const { blob, paper } = await captureElementToBlob(shaderTarget, null, rect);
if (blob && state === 'GENERATING') {
showShaderOverlay(shaderTarget, blob, rect, paper);
}
} catch (err) {
console.warn('[impeccable] shader resume failed:', err);
}
})();
}
}
return true;
}
//
// Global bar (always visible at bottom)
//
let globalBarEl = null;
let globalBarBrandEl = null;
let agentPollTooltipEl = null;
let agentPollingConnected = false;
let agentStatusMessage = null;
let agentStatusPollTimer = null;
let steerFocusSuspended = false;View on GitHub (pinned to f88b2837a7)
Solutions
- Cosmetic only — wait for the generation result; the flow does not need the overlay
- Re-trigger generate if the visual anchor matters on the reloaded page
- If overlays routinely fail to resume, ensure the target element has a stable selector across reloads
Defensive patterns
Strategy: fallback
Validate before calling
const rect = shaderTarget?.getBoundingClientRect(); if (!shaderTarget?.isConnected || !rect || rect.width === 0 || rect.height === 0) return; // no overlay on resume
Try / catch
try { const { blob, paper } = await captureElementToBlob(shaderTarget, null, rect); if (blob && state === 'GENERATING') showShaderOverlay(shaderTarget, blob, rect, paper); } catch (err) { console.warn('shader resume failed:', err); } // resume continues regardless Prevention
- Give generate targets stable selectors so they survive reload/hydration
- Check isConnected and non-zero rect before re-capturing on resume
- Never block the resumed session on overlay success — it is purely visual
When it happens
Trigger: The target element was removed or replaced by SSR/hydration during reload so getBoundingClientRect or captureElementToBlob fails; the element is display:none giving a zero rect (that case returns silently); modern-screenshot failure on the reloaded DOM.
Common situations: Page reload mid-generation where the app renders a different DOM; hydration replacing the captured node; element hidden behind the overlay at resume time.
Related errors
- [impeccable] Svelte component abort cleanup failed:
- [impeccable] Svelte component reset cleanup failed:
- [impeccable] capture failed, proceeding without screenshot:
- [impeccable] shader setup failed:
- [impeccable] shader bitmap decode failed:
AI-assisted analysis of pbakaus/impeccable@f88b2837a7 (2026-08-18).
Data as JSON: /api/errors/87ba36df612777bb.
Report an issue: GitHub.