Troubleshooting
What to check when AI Try-On does not open, or the try-on fails after the shopper's photo.
AI Try-On reports a trigger it cannot open in the browser's console, and a failed try-on in its dialog. To see the cause of a failure, open your browser's developer tools, go to the Network tab and look for a failed request to api.vizbl.com or to your product image.
Nothing opens
- The script did not load. With a script tag, check that the page requests
ai-try-on.embed.min.jsand that your Content Security Policy allowscdn.vizbl.com. - The trigger is not marked. The embed build opens AI Try-On only for elements with
data-vizbl-ai-try-on-dialog. - The trigger was added later.
new AiTryOnDialog(selector)binds only the elements that exist when you call it. Create it after the trigger renders, or use the embed build. See Lifecycle. - Required data is missing. The console shows
AI try-on dialog trigger is missingwith the attribute's name when the product's name or image is empty. - The product type is wrong. The console shows
AI try-on product type … must be one ofand the ten product types. In React, the component throws while rendering.
"Something went wrong" after the photo
The dialog shows Something went wrong when the try-on cannot be generated. Look in the Network tab for the failed request:
- The product image did not load. Open
productImageSrcin a new browser tab. If it loads there, its host does not allow other sites to load it: it must send anAccess-Control-Allow-Originheader. See The product image. - The host is not allowed. AI Try-On runs only on your allowed domains; on any other host its requests are refused. Add the host exactly as the address bar shows it:
example.comandwww.example.comare two entries, andlocalhostmust be added for local development. - The key is wrong. It may be mistyped, revoked or not a publishable key. Copy the
data-keyvalue again from the widget's widget code in the AI Try-On dashboard: it starts withpk_live_. A secret key,sk_live_…, never works in a widget. Use the key of an AI Try-On widget, not one from another product's dashboard. - The balance has run out. Each try-on spends tokens from your account's balance; a failed one is free. See the dashboard's Billing page.
- The photo was refused, or too many try-ons at once. AI Try-On refuses images that break its content rules. Try another photo, or try again in a minute.
If the shopper's photo is over 10 MB, the dialog says so and asks for another.
Still stuck
Write to support@vizbl.com with the page's address and, if a request failed, its response from the Network tab.