Skip to main content
The Dictation SDK does not always return a single error code for every failure. A successful integration depends on several components working together, including authentication, the hosted iframe, the rootElement you provide, and your application callbacks. When one of these components is misconfigured, you may see symptoms such as the UI not rendering, the dictation window closing immediately, or layout issues instead of a specific error. To troubleshoot efficiently, work through this guide in the following order:
  1. Runtime (browser compatibility and initialization timing).
  2. Layout (rootElement and CSS).
  3. Authentication and Content Security Policy (CSP).
  4. Configuration and callbacks.
This sequence helps isolate the most common integration issues first. For detailed information about every AuthConfig and ShowOptions property, see Configuration.
The wrapper pattern for rootElement (stable height, position: relative) is documented on Configuration guide wrapper layout. Refer to that page if you are not sure how to structure your DOM.

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 container

Not 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) exist

The SDK Expects

  • A real HTMLIFrameElement (the SDK creates and manages it inside your container).
  • postMessage between 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.
The iframe fills the layout box of the element you pass as rootElement. Common mistakes are as follows:
  • A zero-height parent.
  • A flex or grid child that shrinks to zero.
  • overflow: hidden on a parent that clips the overlay.
  • Use a dedicated wrapper around the Dictation region, not the raw <textarea> as rootElement, unless you are sure that node has a stable box.
  • Give the wrapper a defined height or min-height, and usually position: relative.
For a longer explanation, refer to Wrapper layout section on the Configuration guide.
If rootElement is null (wrong id, node not mounted yet, or show() before layout), show() can fail or show a blank area. Resolve the DOM first, then retry. Use the try / catch section below to log or surface that error.

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.
Check, in roughly this order:
  • Container height and position on rootElement and parents (Wrapper layout).
  • Browser devtools for blocked iframe requests or CSP violations.
  • That rootElement is not null and matches the node you intend.
  • Authentication: failed login or bad tokens (refer to Authentication guide).
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.
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.
Last modified on August 7, 2026