Troubleshooting
Most problems show up as a chat button that is missing, covered or unstyled. The widget explains itself in the browser console, a hidden panel of technical messages, so start there.
Look at the console first
Section titled “Look at the console first”- Open your website in Chrome, Edge, Firefox or Safari.
- Open the developer tools. Press
F12, or on a Mac pressOption+Command+I. In Safari, turn on the Develop menu in Settings first. - Select the Console tab.
- Reload the page and read the messages. Lines that start with
[whoo-aiden-widget]orwhoo-aiden-widget:come from the widget.
If you are not the person who builds your website, copy those lines and send them to whoever is. Errors explains what the widget shows and logs, and when.
Find your symptom
Section titled “Find your symptom”| What you see | Likely cause | What to do |
|---|---|---|
No chat button. The console shows initialization failed and Failed to create widget session (403). |
Your website’s address is not on the key’s allowed list. The response on the Network tab says “Origin not allowed for this key”. | Add the page’s address exactly as the browser shows it. The scheme (https://), the www. prefix and the port all count. See Connection keys and allowed website addresses. A test or staging site needs its own entry. |
No chat button. The console shows Failed to create widget session (404). |
The connection key is mistyped, was replaced, or the location was turned off. | Open your assistant’s Locations page and check the key under Advanced: technical details. If the location shows Not connected yet, select Generate connection key and use the new key. |
No chat button. The console shows Failed to create widget session (429). |
The key has used up its daily limit of new sessions. Every attempt that reaches the limit check, even a refused one, restarts a 24-hour countdown for the key. The count only clears after a full day without attempts. | Stop reloading the page and wait. Repeated reloads keep the limit in place. |
No chat button. The console shows initialization failed and TypeError: Failed to fetch (Chrome’s wording, other browsers word it differently). |
The visitor is offline, or your site’s Content Security Policy blocks the connection to Aiden. | Look for a Content Security Policy error in the console, then follow Allow the widget in your Content Security Policy. |
No chat button. The console shows initialization failed and The sessionToken has expired., or Failed to load widget branding (401) or (403). |
The session token your server gave the page has run out (tokens last about 30 minutes) or is not one Aiden accepts, and the widget could not replace it: there is no getSessionToken, it failed, or it returned a token Aiden also refuses. A 403 means the token is refused outright, and a new one would not help. |
Pass getSessionToken, so the widget can get a new token itself. If you already pass it, look in the console for could not renew the session, and check that your endpoint returns a fresh token from identify-session. Otherwise make sure the page is given a token that is still valid. Your server should keep one token and ask Aiden for a new one before the old one runs out, for example after 15 minutes, not on every page view, because every request counts toward the key’s daily limit. See Use a session token from your own backend. |
No chat button. Your own script stops with a message that init() requires exactly one of publishableKey or sessionToken. |
init() was called with both options, or with neither. |
Pass one. See Install the widget. |
| No chat button. The console says an inline script violates the Content Security Policy. | Your policy blocks the small script that starts the widget. | Allow that script, or move the call out of the page. See Allow the inline init script. |
No chat button. Your script fails when it reads window.whooAidenWidget. |
The widget file did not load. Its address is wrong or does not exist, or the Content Security Policy blocked it. | On the Network tab, look for the widget.iife.js request. Use an address that exists, as described in Versions. Check the Content Security Policy below. |
No chat button. init() fails with an error from your own page right after it runs. In Chrome the error reads Cannot read properties of null (reading 'appendChild'), and other browsers word it differently. |
The snippet ran before the page body existed, for example because it sits in the page head. | Move the snippet to just before </body>, or call init() from a DOMContentLoaded handler. |
| A plain, unstyled button sits in the page, not in the corner. | Your Content Security Policy blocks the widget’s styles. | Allow inline styles, as described in the next section. |
| The chat button is there, but it is hidden or cannot be clicked. | Another layer on your page covers it. Some tools from other companies, such as accessibility toolbars and cookie banners, use the highest possible stacking level. | In the developer tools, inspect the element at the button’s position to see what covers it. If it is another tool in the same corner, set position: 'bottom-left'. See When something else already owns the corner. |
| The chat button covers a control in your own pop-up. | The default zIndex places the widget above most page layers. |
Pass a lower zIndex, so your pop-up covers the chat. See Accessibility. |
| On a phone, the chat button and window look tiny, and the chat window does not fill the screen. | Your page has no viewport tag, so the phone shows it at desktop width and shrinks everything, the widget included. | Add <meta name="viewport" content="width=device-width, initial-scale=1"> to your page’s <head>. See What stays your responsibility. |
| The chat window opens, but sending a message shows “Something went wrong, please try again.” | The visitor lost their connection, or your Content Security Policy blocks requests to Aiden. It also shows when the session ran out and getting a new one failed for a reason that may pass: getSessionToken threw an error or took longer than 15 seconds, or the key reached its daily limit. |
If it keeps happening, check the console for the reason, and check the Content Security Policy below. |
| Sending a message shows “This chat session has expired. Reload the page to continue.” | The session ran out (after about 30 minutes) and the widget could not get a new one. With sessionToken, you did not pass getSessionToken, or it returned an empty or already expired token. With publishableKey, Aiden refused a new session, for example because the key was deleted or your website address was removed from its allowed addresses. |
With sessionToken, pass getSessionToken. Otherwise check the console line could not renew the session for the reason. See Use a session token from your own backend. |
| Screen readers read the assistant’s replies with the wrong voice or pronunciation. | The widget marks the conversation with your page’s <html lang>, or with the language option if your page has no lang. A wrong lang, a page with neither lang nor language, or a conversation in a different language from your page gives the wrong voice. |
If your page’s language is wrong or missing, fix its lang. If the conversation is meant to be in a different language from your page, pass the contentLanguage option. See Language options. |
| The widget’s text is in the wrong language, or in English on a page in another language. | The widget follows your page’s <html lang>. A wrong or missing lang, a template default such as lang="en", or a language the widget does not support (such as Traditional Chinese) gives English or the wrong language. |
Fix your page’s lang, or pass the language option. See Language options. |
| My own chat button icon or image does not show. | The address is not https: or data:image/, the image failed to load, or your policy blocks it. This covers launcherIconUrl, theme.launcher.iconUrl and theme.launcher.openIconUrl. |
Check the console for a warning. Use an allowed address. For an https: image, add its host to img-src. For a data:image/ image, add data: to img-src. See Configuration reference. |
A theme or layout option seems to do nothing, or the font does not change. |
The option has a typo or an unusable value, so the widget ignored it with a console warning. For a font, the page may not have loaded it. | Follow A theme or layout option does nothing. |
| After I changed the colors, the keyboard focus outline, some text or the links are hard to see. | You overrode a background color, such as panel or assistantBubble, without the colors drawn on it. |
Check the console: from widget version 0.7.1, a warning names each color that became hard to see and the role to override. See Overriding colors with theme.colors and override the background together with everything drawn on it. |
| After a reload the chat window is empty, but the assistant still seems to remember what was said. | This is how it works. The widget keeps only a reference number for the conversation in the browser tab, not the messages. The assistant continues the same conversation. | To start over, send a message, then select New conversation in the chat window. The button only appears once the window has a message in it. Closing the tab also starts over. |
A theme or layout option does nothing
Section titled “A theme or layout option does nothing”A mistake in theme or layout never stops the widget. The widget writes a warning in the console, ignores the part that is wrong, and keeps its default. So the chat button still appears, but your setting has no effect. Work through these steps:
- Open the Console and look for lines that start with
whoo-aiden-widget:or[whoo-aiden-widget]. They name the exact option, such astheme.colors.primaryorlayout.launcherSize. Errors shows each message. - If a line says
ignoring unknown option, the name is misspelled or in the wrong group. Compare it with the 16 role names in the Configuration reference. Names are case sensitive, sofocusringis notfocusRing. Roles go insidetheme.colors, not directly insidetheme. - If a line says
Could not usea color, the value is a typo,currentColor, avar(...)reference, or a format the widget does not support. Pass a hex code instead. - If the font does not change and there is no warning, the widget accepted the font family but the page does not have the font. The widget never loads fonts, so load it yourself, for example with a Google Fonts link or your own
@font-facerule, and make sure the name intheme.fonts.familymatches. - If a text size is not what you set, look for a line naming it.
is out of rangemeans the size was moved to its nearest limit: eachtheme.fonts.sizesvalue has a lower limit (16 forinput, 14 formessage, 12 for the others) and an upper limit of 32.expected a positive number of pixelsmeans the value, such as0, a negative number or'16px', was ignored and the default is used. Pass a plain number, such as18. Text sizes need widget version 0.10.7 or later. - If the chat button or chat window is not where or as big as you set it, look for a line about a value being out of range or held back.
layout.launcherSizeis limited to 24 to 120.layout.panelis raised to at least 280 by 320, and it never gets bigger than the visitor’s screen. A screen that is 400 pixels wide or less, or 420 pixels tall or less, always shows a full-screen chat window. - If
init()was called with a value that is not an object forthemeorlayout, the whole option is ignored. Pass an object. - If there is no warning at all, check that the page loads the widget version that has these options.
themeandlayoutneed widget version 0.6.0 or later. See Versions.
A color override that the widget accepts is used exactly as you wrote it. If it looks wrong, the color itself may be the cause. See Overriding colors with theme.colors.
Allow the widget in your Content Security Policy
Section titled “Allow the widget in your Content Security Policy”If your website sends a Content-Security-Policy header, the browser only allows what the policy lists. This is a security setting, usually managed by whoever hosts or builds your site. The widget needs these entries:
script-srcmust allowhttps://widget.aidenvoice.com, where the widget file is served. It must also allow the small script that starts the widget, as described in the next section. If you install from npm, your own scripts already cover both.connect-srcmust allowhttps://api.aidenvoice.com. The widget uses it to start a session, send messages and send feedback. If you setapiBaseUrl, allow that address instead. Whenconnect-srcis missing, the browser falls back todefault-src, which often blocks it.style-srcmust allow inline styles, for example with'unsafe-inline'. The widget adds a style element inside its own container, and a policy that blocks it leaves the button unstyled.img-srcmust allow your images, if you uselauncherIconUrl,theme.launcher.iconUrl,theme.launcher.openIconUrloremptyStateImageUrl. For anhttps:address, allow its host. Adata:image/address has no host, so allow thedata:source instead. If an image is blocked, the widget falls back to the default icon, or leaves the image out.
A policy that includes the widget could look like this. Keep your own entries and add the widget’s:
Content-Security-Policy: default-src 'self'; script-src 'self' https://widget.aidenvoice.com 'nonce-RANDOM_VALUE'; connect-src 'self' https://api.aidenvoice.com; style-src 'self' 'unsafe-inline'; img-src 'self' https://example.com;When the browser blocks something, the console error names the blocked entry, which tells you which line to change.
Allow the inline init script
Section titled “Allow the inline init script”Allowing https://widget.aidenvoice.com in script-src lets the browser download the widget file. The code snippet also contains a small script written directly into the page, which starts the widget. A policy blocks that kind of inline script unless it is allowed. Without that permission, the widget downloads but never starts, and the console says an inline script violates the policy. Choose one of these:
- A nonce. Your server creates a new random value for every response, puts it in the policy as
'nonce-RANDOM_VALUE', and adds the same value to the script tag as<script nonce="RANDOM_VALUE">. The example policy above uses this. - A hash. Add
'sha256-...'toscript-src, using the SHA-256 fingerprint of the exact text between the<script>and</script>tags. The browser names the fingerprint it expects in its console error. Any change to that text changes the fingerprint. 'unsafe-inline'. This allows every inline script on the page, which weakens the protection a policy gives you, so prefer a nonce or a hash.- No inline script. Put the
init()call in a JavaScript file served from an address your policy already allows, such as your own site, and load it with a<script src>tag after the widget script. With the npm install, the call is already part of your own code.
Still stuck
Section titled “Still stuck”Check these in order:
- The
widget.iife.jsrequest on the Network tab returns a success status. - The console shows no
initialization failedmessage. - If you use
publishableKey, the key is the current one for the location, and your page’s exact address is on its allowed list. - If you use
sessionToken, your server got the token from its ownidentify-sessioncall, the token reaches the page, and it has not expired. A token lasts about 30 minutes, and passinggetSessionTokenlets the widget replace an expired token, or one Aiden refuses as invalid or expired (a401). Without it, an expired or refused token hides the chat button. A token Aiden refuses outright (a403) hides it even withgetSessionToken. If you passname,color,inkColorandaccentColoryourself, the widget does not ask Aiden to check the token at start-up, so a refused token is only noticed when the visitor sends their first message, wheregetSessionToken, if you pass it, can still replace it. The widget does not check a token’s signature, and it never rejects one it cannot read. A visible button therefore does not prove the token is good. A missing token makesinit()stop with an error. See Use a session token from your own backend. - Nothing on the page covers the corner. In the developer tools, the widget’s container is the element with the id
whoo-aiden-widget-host.
