ASYNC_STORE_SETTER
Store setter callback returned a Promise (setters are synchronous transactions).
What you saw
- Kind:
write - Severity:
error(broken behavior)
The console report opens with [ASYNC_STORE_SETTER] and the message, then an in line naming the owners that enclose the subject, root first, and an at line with the source location when the code was compiled with one.
In a captured artifact the same finding is an event with code: "ASYNC_STORE_SETTER", ownerPath, and loc.
Diagnostics explains each line.
Why it fires
A store setter callback returned a Promise — setStore(async d => …), or a sync arrow whose helper is async.
A store setter is a synchronous transaction: the draft closes when the callback returns, so only the writes before the first await were in it; the rest are lost.
How to fix it
Move the async orchestration into an action() and call the setter synchronously from inside it (yield to re-enter the transaction after an await).
Signals are not subject to this rule — a signal may hold a promise as its value.
In tests
captureArtifact from @solidjs/diagnostics runs a scenario with the diagnostics channel open and returns the events it saw.
expectNoDiagnostics(artifact) fails while ASYNC_STORE_SETTER is among them, with the events as evidence; after the fix, the code is gone from artifact.diagnostics.
Check for regressions in tests shows the loop and the Vitest matcher form.
Learn more
- Diagnostics: every code, with its kind, severity, and trigger.
- Debugging reactivity: how to read a report and what each group of codes points at.