Skip to main content

Diagnostics and recovery

Preparation checks the envelope, XML, expressions, supported properties, component definitions, and reachable host dependencies. Dynamic prop values and action payloads are also validated when evaluated or invoked.

SymptomFirst thing to check
Unknown componentInclude its definition or register its native adapter before session creation
Unknown action/routeMatch the document's name with the host registration
Wrong prop typeUse bind-* for booleans, numbers, arrays, and records
Empty or invalid documentSupply one rendered root; definitions alone don't mount
Lost local stateCheck identity, if removal, source replacement, and session closure
Scroll surface won't sizeGive its parent and viewport finite bounds
Browser engine won't loadCheck Wasm URL, MIME type, CORS, and CSP

Handle invalid documents​

Display a host-owned fallback for invalid initial documents. Preserve a known-good document where appropriate. Report source locations and diagnostics in development without exposing credentials or private user data.

The website playground retains the last valid preview when an edit fails. Reset restores the original example and creates a fresh sandbox. Open Environment & events to inspect emitted output and bundled mock service calls.

Test interactions as well as syntax​

Syntax validation alone doesn't prove a workflow. Verify expected visible controls, action payloads, error paths, and state transitions. Then run the relevant native checks for actual editing, focus, accessibility, presentation, and layout behavior.

The testing guides distinguish automated evidence, measured environments, and outstanding release gates.