Diagnostics

UNTRACKED_ASYNC_HANDLER

Handler awaited 100ms+/200ms+ past its frame with no write before the await and no action(): a dead click no hold could judge (attribution enabled).


What you saw

  • Kind: responsiveness
  • Severity: info (advisory, delivered on the diagnostics channel and never printed) or warn (code that works but is structurally wrong or expensive)

The console report opens with [UNTRACKED_ASYNC_HANDLER] 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: "UNTRACKED_ASYNC_HANDLER", ownerPath, and loc. Diagnostics explains each line.


Why it fires

The dead click that is not a hold. The handler was async and awaited something — onClick={async () => setResult(await save())} — but wrote nothing before its first await. No hold opened (there was no write to hold), so SILENT_HOLD could not see the wait, yet from the user's side the click did nothing for data.continuationMs (handler return → the promise settling). The interaction record stayed open for the wait, so attribution.history("interaction") shows it with continuationMs set. Same thresholds as SILENT_HOLD (holds.infoMs/warnMs; off with holds: false); the wait is capped at 10s for a promise that never settles (data.capped).

Responsiveness (from the attribution engine)

The runtime did the correct thing; the user saw nothing while it did. These fire only while attribution is enabled.


How to fix it

Two repairs, in order of preference:

  • Make the async work an action: const save = action(function* () { const r = yield api.save(); setResult(r); }) and call save() from the handler. An action's steps stay attributed to the click across yields, its writes are held while it runs, and that hold is judged — so if the screen still shows nothing you get SILENT_HOLD with the action repair (an optimistic value, an isPending() reader), which is the real fix.
  • Or acknowledge before awaiting: write a createOptimistic(false) "saving" flag (or setSaving(true) on a signal the UI reads) as the handler's first line. Any root write before the await clears this finding; whether the screen then shows the wait is the hold's question.

Do NOT: keep the plain await and add a try/finally — nothing reactive learns about the wait either way. The finding names the interaction (click on button#save), not a node; there is no scope to name because no scope ran.


In tests

captureArtifact from @solidjs/diagnostics runs a scenario with the diagnostics channel open and returns the events it saw. expectNoDiagnostics(artifact) fails while UNTRACKED_ASYNC_HANDLER 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.
  • Attribution: the engine whose records explain a re-run, a hold, or a waterfall.
Last updated: 10/15/26, 10:07 PMEdit this pageReport an issue with this page