Repository navigation
Troubleshooting and FAQ
-
Check your version. Run
npm ls whatsapp-chat-widget-react. Very old versions (0.1.x) used a generic chat bubble icon and required a CSS import. Update withnpm install whatsapp-chat-widget-react@latest. -
Check for blocked inline styles. Since 0.3.0 the widget injects a
<style>element. If your Content Security Policy blocks inline styles, useinjectStyles={false}and importwhatsapp-chat-widget-react/styles.css. -
Check for global CSS. Rules such as
svg { display: none }or aggressive resets onbuttoncan affect the launcher. Look at the element in your browser's dev tools; all widget classes start withwcr-. - Hard reload. Bundlers and CDNs cache old builds.
-
hiddenistrue, or the current path matcheshideOnPaths. -
showAfterhas not triggered yet (a delay, or a scroll percentage on a short page). - Something covers it. Raise
zIndexor set--wa-z-index. - A parent element has a CSS
transform,filterorperspective, which turnsposition: fixedinto position relative to that parent. Render the widget at the root. - It is hidden behind a cookie banner or chat bar at the bottom. Use
offset={{ y: 80 }}.
- The phone number is invalid: 7 to 15 digits, optional leading
+, first digit not 0, no spaces or dashes. The form also says so. - You set
allowOfflineMessages: falseand the business is currently closed. - With
agents, check the selected agent's number.
| Symptom | Page |
|---|---|
| Live chat messages say "Not sent", or replies never arrive | Live Chat |
| "Polish with AI" is missing, routing does nothing, instant replies are wrong | Bring Your Own AI |
| The lead webhook does not arrive | Lead Webhooks |
useWhatsAppWidget() must be used inside <WhatsAppWidgetProvider> |
Widget Hook and Provider |
Script tag shows nothing, or WhatsAppChatWidget is not defined
|
Script-Tag Build |
- The widget opens
https://wa.me/...in a new tab from the submit handler. A strict popup blocker or an in-app browser (some social apps) can block it. Visitors can allow popups for your site. - On desktop without WhatsApp installed,
wa.meopens WhatsApp Web, which asks the visitor to sign in first.
- Check the
timezone: it must be an IANA name such asAfrica/Lagos. Names likeWATorGMT+1are not valid and make the schedule fail open (always online) with a console warning. - Remember the end time is exclusive, and ranges cannot cross midnight.
- Day keys:
montosunor full day names. - The status appears after the page loads and refreshes once a minute.
- The form limits the name to 120 characters, the subject to 180 and the message to 1000.
- Line breaks, emoji and punctuation are encoded correctly. Check any custom
messageTemplateyou wrote.
The widget is built to avoid them: time-dependent parts are computed after mount. If you still see one, check whether the warning comes from your own props (for example a defaultMessage built from Date.now() or Math.random()), and please open an issue with a minimal example if it is the widget.
Do I need a WhatsApp Business account or an API key?
No. The widget opens a normal wa.me chat link. It works with a personal or Business number. It does not use the WhatsApp Business API.
Does the message go through my server?
No. The message goes from the visitor straight into WhatsApp. If you want a record of the lead, use onSend to send the details to your own system.
Can I get a delivery or read receipt? No. The widget only prepares a draft. The visitor presses send in WhatsApp.
Can I use more than one widget on a page?
Use one. Several instances would stack in the same corner. For several people or departments, use agents.
Does it work without React? Yes. Use the Script-Tag Build on WordPress, Webflow, Shopify and plain HTML.
Is it free? Yes, MIT licensed.
How big is it?
About 11 kB gzipped with every feature and its styles, and no runtime dependencies. The optional helpers are separate imports that cost nothing unless used: createWebhookTransport about 0.7 kB, createOpenAICompatibleAI about 1.2 kB, the provider and hook about 0.4 kB. Sizes are checked in CI.
Do I need a backend? Not for the default form: it opens WhatsApp with a draft. Live chat, AI and lead webhooks need an endpoint that you run.
Is my AI key safe? The widget never handles a key. Keep it on your server and point the widget at your own route. See Backend Recipes.
Where do I report a bug or suggest a feature? GitHub issues.