> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yourhomie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Common issues and frequently asked questions about the Homie Client API.

## Troubleshooting

* **`window.homieBot` is undefined** → Ensure the script actually loads (Network tab). Prefer listening for the `homiebot:api-ready` event; for older embed versions or late-bound code, use the `waitForHomie()` fallback from the examples section.
* **No response to `sendMessage`** → Check if the site blocks iFrames, uses strict CSP, or delays third‑party scripts. Also, wait for `document.readyState === "complete"`.
* **Chat opens but no replies** → Verify API base access depending on the domain (`api.yourhomie.ai`, `staging.api.yourhomie.ai`, `dev.api.yourhomie.ai`).
* **Checkout specific** → The embed preloads the iFrame automatically when a configured `checkoutUrl` matches. Verify exact URLs during testing.

***

## FAQ

**Can I force a new conversation?**\
Yes: `sendMessage({ text: "...", newChat: true })`.

**How are question events tracked?**\
If `setId` (and optionally `questionId`) are provided, the script sends a fire‑and‑forget tracking call to the public endpoint in the background. This does **not** affect the message injection itself.

**Can I query the state without opening the chat?**\
Yes, `isOpen()` returns the state and does not alter the UI.
