Overview
The Dictation SDK does not return one consistent error code for every problem. Instead, several systems have to work together: SDP handles authentication, the hosted UI runs inside an iframe, and your app passesrootElement and callbacks. When one piece is wrong, you often only see a vague symptom, such as no UI, dictation closing immediately, or broken layout.
Work through this page in this order: runtime (browser and timing), layout (rootElement and CSS), auth and CSP, then configuration and callbacks. That order usually finds the cause fastest.
For every field on AuthConfig and ShowOptions, use Configuration.
Runtime requirements
The Dictation SDK is built for in-browser embedding. It is not a Node-only or server-rendered iframe product.Supported environments
Browser environments where you can create an
HTMLIFrameElement, use postMessage, and measure a DOM containerNot supported
Using Node.js as the environment that hosts
DictationClient or the dictation iframe
Relying on SSR alone to render dictation; initialize and call show() on the client after the document (and your rootElement) existThe SDK expects
- A real
HTMLIFrameElement(the SDK creates and manages it inside your container) postMessagebetween your page and the hosted UI- Layout information so the iframe can size to
rootElement
Dictation runs in the browser only. The iframe is not created during SSR or on the server.Call
show() only after rootElement points at an element that already exists in the DOM and has been laid out (so it has a real size). If you call too early, rootElement may be null or zero height.- React integration for
DictationProviderandDictation - Configuration examples for sample
rootElementwiring
Layout and root element related issues
The iframe fills the layout box of the element you pass asrootElement. Common mistakes are as follows:
- A zero-height parent
- A flex or grid child that shrinks to zero
overflow: hiddenon a parent that clips the overlay
Recommended approach
- Use a dedicated wrapper around the dictation region, not the raw
<textarea>asrootElement, unless you are sure that node has a stable box. - Give the wrapper a defined height or
min-height, and usuallyposition: relative.
Authentication and CSP related issues
Configuration related issues
Wrap show() in try / catch
DictationClient.show() can throw or reject when configuration or auth fails before the session is usable. Wrapping the call helps you log and surface errors in your own UI.
JavaScript
Troubleshooting
Below are some other common issues and how to troubleshoot them.Dictation UI not visible
Dictation UI not visible
Check, in roughly this order:
- Container height and
positiononrootElementand parents (Wrapper layout) - Browser devtools for blocked iframe requests or CSP violations
- That
rootElementis notnulland matches the node you intend - Authentication: failed login or bad tokens (refer to Authentication guide)
Dictation closes immediately
Dictation closes immediately
This usually means
onSubmit is missing or not wired correctly. The hosted UI expects a handler when the user commits. Refer to Callbacks and Configuration guides for more details.Multiple overlays or duplicate sessions
Multiple overlays or duplicate sessions
Create one
DictationClient (with one SukiAuthManager) per page scope, and drive which field is active with your own state (for example a single activeFieldId). Multiple clients can each try to mount dictation. Refer to JavaScript integration and React integration guides for more details.