moeru-ai/airi · warning
[AutonomousArtist] Failed to spawn Result widget
Error message
[AutonomousArtist] Failed to spawn Result widget
What it means
The autonomous artistry module wraps its 'spawn Result widget' call (a card-store widget spawn carrying status 'done', the image payload, prompt, title, _skipIngestion, size 'm', ttlMs 0) in try/catch. When the widget layer throws, only the widget is lost - the artwork was already applied to the card/background - and the caught widgetErr is logged after this prefix. This occurrence is the image-only delivery branch.
Source
Thrown at packages/stage-ui/src/stores/modules/artistry-autonomous.ts:318
case 'widget':
try {
await invokers.addWidget({
componentName: 'artistry',
componentProps: {
status: 'done',
entryId,
imageUrl: result.imageUrl || result.base64,
prompt: analysis.prompt,
title: analysis.title || 'Autonomous Scene',
_skipIngestion: true,
},
size: 'm',
ttlMs: 0,
})
}
catch (widgetErr) {
console.warn('[AutonomousArtist] Failed to spawn Result widget', widgetErr)
}
break
case 'bg_widget':
default:
// Both: Update background AND spawn widget
await cardStore.updateCard(cardId, {
extensions: {
...activeCard.extensions,
airi: {
...activeCard.extensions.airi,
modules: {
...activeCard.extensions.airi.modules,
activeBackgroundId: entryId,
},
},
},
} as any)View on GitHub (pinned to b6d0809ecb)
Solutions
- Inspect the logged widgetErr object right after the message - it is the actual spawn exception
- Pre-validate that result.imageUrl || result.base64 is non-empty before the artist run reaches widget spawn
- Ensure the widget/card store and its container are initialized before enabling the autonomous artist
- Note the artwork itself is not lost (card/background update precedes the spawn); decide whether a manual retry is worth it
- Re-run the artist tick if the failure was timing-related - later spawns usually succeed
Example fix
// before
imageUrl: result.imageUrl || result.base64,
// after
const image = result.imageUrl || result.base64
if (!image) {
artistLog('No image payload; skipping widget spawn')
break
}
// ... imageUrl: image, Defensive patterns
Strategy: try-catch
Validate before calling
const image = result.imageUrl || result.base64
if (!image) {
artistLog('No image payload; skipping widget spawn')
return
} Try / catch
try {
await spawnResultWidget({ entryId, imageUrl: image, title: analysis.title })
}
catch (widgetErr) {
// artwork already applied - never let widget failure break the artist tick
console.warn('[AutonomousArtist] Failed to spawn Result widget', widgetErr)
} Prevention
- Validate image payloads before the artist tick reaches widget spawn
- Ensure the widget store is initialized before enabling the autonomous artist
- Keep widget spawn non-fatal by design - the card/background update is the source of truth
When it happens
Trigger: The widget spawn promise rejects: empty image payload (neither result.imageUrl nor result.base64 present), widget/card store not initialized when the artist tick fires, renderer teardown racing the spawn, or an invalid widget payload (oversized base64, bad entryId).
Common situations: Art provider returning neither a hosted URL nor base64; module firing before the widget container mounts; memory pressure in the renderer; version drift between the artist module and widget store API.
AI-assisted analysis of moeru-ai/airi@b6d0809ecb (2026-08-18).
Data as JSON: /api/errors/0faddf1ac9b8fd01.
Report an issue: GitHub.