EFFECT_UPDATE
The update function of an effect threw during a frame, so that instance failed at once.
On this page
EFFECT_UPDATE: {message}The message is the message of the error the update function threw, and that error is the cause.
Why it happens
- The function that
setupreturned throws. The instance fails on the first throw: a broken frame is visible, so effects do not wait for the 10 failures after which the kernel disables a system. Other instances keep updating, each in its owntry. - The update writes to the DOM of an element that left the page. During a page transition
ctx.elementof a leaving copy is a detached node, and its update keeps running while the copy flies or fades.
When the update of a leaving copy throws, only that copy is released. In development this prints as an EFFECT_TARGET warning that starts with a ghost failed and was released.
How to fix
- Expand the reported error in the console and read the stack of the
cause. - Keep DOM reads and writes out of update. Read layout through
ctx.inputand the inputs onctx.u, which Diorama measures for you. - Start the instance again after the fix: remove its token from
data-dioand add it back, or reload. In development, HMR replaces the definition and the instance retries.