Troubleshooting guide for chatbot issues. Learn how to fix common problems like chatbot not appearing, not responding, API errors, and more. Step-by-step solutions for every issue.
Chatbot Not Working? Common Issues and How to Fix Them
Your chatbot was working perfectly yesterday, but today it's not responding. Or maybe it never worked in the first place. Don't panic! Most chatbot issues have simple solutions. This comprehensive troubleshooting guide will help you fix common problems quickly.
Quick Diagnostic Checklist
Before diving deep, check these basics:
- [ ] Is your chatbot set to "Active" in the dashboard?
- [ ] Is your API key correct and not expired?
- [ ] Is the script code correctly placed on your website?
- [ ] Have you cleared your browser cache?
- [ ] Are there any JavaScript errors in the browser console?
Issue 1: Chatbot Not Appearing on Website
Symptoms
- No chatbot button visible on your website
- Chatbot was working before but disappeared
- Button doesn't show up after adding code
Solutions
Check 1: Verify Script Placement
Problem: Script might be in the wrong location.
Solution:
- Ensure script is before the closing </body> tag
- For React: Make sure it's in App.js or layout component
- For WordPress: Check it's in footer.php or functions.php
- For HTML: Verify it's before </body>
Example - Correct Placement:
<body>
<!-- Your website content -->
<!-- Chatbot script - CORRECT location -->
<script src="https://your-domain.com/widget.js"
data-chatbot-id="YOUR_ID"
data-api-key="YOUR_KEY"></script>
</body>
Check 2: Verify Credentials
Problem: Incorrect Chatbot ID or API Key.
Solution:
- Log into your chatbot dashboard
- Go to chatbot settings
- Copy the Chatbot ID and API Key again
- Replace in your code
- Clear cache and reload
Check 3: Check Browser Console
Problem: JavaScript errors preventing script from loading.
Solution:
- Open browser DevTools (Press F12)
- Go to "Console" tab
- Look for red error messages
- Common errors:
- Failed to load resource - Check widget.js URL
- Invalid API key - Verify API key
- CORS error - Check domain restrictions
Check 4: Clear Browser Cache
Problem: Old cached version preventing updates.
Solution:
- Chrome/Edge: Ctrl+Shift+Delete (Windows) or Cmd+Shift+Delete (Mac)
- Firefox: Ctrl+Shift+Delete
- Safari: Cmd+Option+E
- Or use Incognito/Private mode to test
Check 5: Verify Widget URL
Problem: Widget.js URL might be incorrect or inaccessible.
Solution:
- Test the URL directly in browser: https://your-domain.com/widget.js
- Should return JavaScript code (not 404 error)
- If 404, check the URL is correct
- Verify your domain is allowed in chatbot settings
Issue 2: Chatbot Not Responding
Symptoms
- Chatbot button appears but doesn't open
- Chat window opens but no response to messages
- "Error" message when sending messages
Solutions
Check 1: Verify API Key Status
Problem: API key might be invalid or deactivated.
Solution:
- Go to chatbot dashboard
- Check API key status (should be "Active")
- Regenerate API key if needed
- Update code with new key
- Test again
Check 2: Check Chatbot Status
Problem: Chatbot might be set to "Inactive" or "Draft".
Solution:
- Go to chatbot settings
- Verify status is set to "Active"
- If "Draft", change to "Active"
- Save changes
- Wait a few minutes for changes to propagate
Check 3: Test API Directly
Problem: API endpoint might be down or unreachable.
Solution: Test the API with a direct request:
curl -X POST https://your-api-domain.com/api/public/chatbot/YOUR_ID/chat \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "test"}'
If this fails, the issue is with the API, not your integration.
Check 4: Check Network Tab
Problem: Network requests might be failing.
Solution:
- Open DevTools (F12)
- Go to "Network" tab
- Send a message in chatbot
- Look for failed requests (red)
- Check error messages in failed requests
Check 5: Verify Domain Restrictions
Problem: Your domain might not be in the allowed list.
Solution:
- Go to chatbot settings
- Check "Allowed Domains" field
- Ensure your website domain is listed
- Or clear the field to allow all domains
- Save and test
Issue 3: Multiple Chatbot Buttons
Symptoms
- Multiple chatbot buttons appearing
- Duplicate chat windows
- Script loaded multiple times
Solutions
Check 1: Remove Duplicate Scripts
Problem: Script might be added multiple times.
Solution:
- Search your code for "widget.js"
- Ensure it appears only once
- Remove any duplicate script tags
- Clear cache and reload
Check 2: Check Component Rendering (React)
Problem: Component might be rendering multiple times.
Solution:
// Add check to prevent multiple loads
useEffect(() => {
if (document.querySelector('script[data-chatbot-id]')) {
return; // Already loaded
}
// ... rest of code
}, []);
Check 3: Verify Single Integration Point
Problem: Code might be in multiple files.
Solution:
- Check all template files
- Verify only one integration point
- Remove from other locations
Issue 4: Chatbot Appears But Looks Wrong
Symptoms
- Chatbot button in wrong position
- Wrong colors or theme
- Styling conflicts with website
- Mobile layout broken
Solutions
Check 1: Verify Theme Settings
Problem: Theme might not be applied correctly.
Solution:
- Check data-theme attribute
- Verify theme name is correct
- Try a different theme to test
- Check theme is available in your plan
Check 2: Check CSS Conflicts
Problem: Website CSS might be overriding chatbot styles.
Solution:
- Check browser DevTools
- Inspect chatbot elements
- Look for CSS conflicts
- Add !important to chatbot styles if needed
- Or adjust website CSS to avoid conflicts
Check 3: Verify Position Attribute
Problem: Position might be incorrect.
Solution:
- Check data-position attribute
- Valid values: bottom-right, bottom-left, top-right, top-left
- Ensure no typos
- Test different positions
Check 4: Mobile Responsiveness
Problem: Chatbot might not be responsive on mobile.
Solution:
- Test on actual mobile device
- Check viewport meta tag is present
- Verify chatbot supports mobile (should automatically)
- Test different screen sizes
Issue 5: API Key Errors
Symptoms
- "Invalid API key" error
- "Unauthorized" messages
- 401 or 403 HTTP errors
Solutions
Check 1: Verify API Key Format
Problem: API key might be incomplete or have extra spaces.
Solution:
- Copy API key directly from dashboard
- Don't add or remove any characters
- Check for leading/trailing spaces
- Verify it's the complete key
Check 2: Regenerate API Key
Problem: API key might be expired or compromised.
Solution:
- Go to chatbot settings
- Click "Regenerate API Key"
- Copy new key immediately
- Update all places using old key
- Old key will stop working
Check 3: Check API Key Permissions
Problem: API key might not have required permissions.
Solution:
- Verify API key has "chat" permission
- Check chatbot is in "Active" status
- Ensure no restrictions on the key
Issue 6: Slow Response Times
Symptoms
- Chatbot takes long to respond
- Messages hang before getting answer
- Timeout errors
Solutions
Check 1: Check API Status
Problem: API might be experiencing high load.
Solution:
- Check platform status page
- Test API response time directly
- Contact support if consistently slow
- Consider upgrading plan if on free tier
Check 2: Optimize Knowledge Base
Problem: Too much data might slow responses.
Solution:
- Review uploaded documents
- Remove unnecessary files
- Optimize document sizes
- Use relevant content only
Check 3: Check Network Connection
Problem: Slow internet might affect response time.
Solution:
- Test on different network
- Check internet speed
- Verify no network issues
- Test from different location
Issue 7: Chatbot Gives Wrong Answers
Symptoms
- Incorrect information in responses
- Outdated information
- Irrelevant answers
Solutions
Check 1: Update Knowledge Base
Problem: Documents might be outdated.
Solution:
- Review uploaded documents
- Update outdated information
- Add new relevant documents
- Remove incorrect information
Check 2: Improve System Prompt
Problem: System prompt might need refinement.
Solution:
- Review your system prompt
- Be more specific about chatbot's role
- Add instructions about accuracy
- Test with updated prompt
Check 3: Add More Context
Problem: Chatbot might not have enough information.
Solution:
- Add more relevant documents
- Include FAQ documents
- Add links to helpful resources
- Provide examples in system prompt
Issue 8: Chatbot Not Loading on Mobile
Symptoms
- Works on desktop but not mobile
- Button doesn't appear on mobile
- Touch events not working
Solutions
Check 1: Test on Real Device
Problem: Responsive mode might not show real issues.
Solution:
- Test on actual mobile device
- Use different mobile browsers
- Check both iOS and Android
- Verify touch events work
Check 2: Check Viewport Settings
Problem: Missing or incorrect viewport meta tag.
Solution: Ensure this is in your HTML <head>:
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Check 3: Verify Mobile Support
Problem: Widget might not support mobile properly.
Solution:
- Check widget.js supports mobile
- Verify touch events are handled
- Test button is large enough (min 44x44px)
- Check chat window is responsive
Issue 9: CORS Errors
Symptoms
- "CORS policy" errors in console
- "Access-Control-Allow-Origin" errors
- API requests blocked
Solutions
Check 1: Verify Domain Settings
Problem: Domain might not be in allowed list.
Solution:
- Go to chatbot settings
- Add your domain to allowed domains
- Include both www and non-www versions
- Save and wait a few minutes
Check 2: Check API Configuration
Problem: API might not allow your origin.
Solution:
- Contact support if issue persists
- Verify API CORS settings
- Check if using correct API endpoint
Issue 10: Chatbot Disappears After Page Load
Symptoms
- Chatbot appears briefly then disappears
- Works on some pages but not others
- Disappears after navigation
Solutions
Check 1: JavaScript Conflicts
Problem: Other scripts might be removing chatbot.
Solution:
- Check for JavaScript errors
- Disable other scripts temporarily
- Identify conflicting script
- Fix or remove conflict
Check 2: React/SPA Issues
Problem: Single Page Apps might remove chatbot on navigation.
Solution:
- Ensure chatbot is in root component
- Not in page-specific components
- Use proper cleanup in useEffect
- Check React Router configuration
General Troubleshooting Steps
Step 1: Check Browser Console
Always start here:
- Open DevTools (F12)
- Go to Console tab
- Look for errors (red text)
- Note error messages
- Search for solutions online
Step 2: Test in Incognito Mode
Eliminate cache and extension issues:
- Open Incognito/Private window
- Visit your website
- Test chatbot
- If works, issue is cache or extension
Step 3: Test on Different Browser
Eliminate browser-specific issues:
- Test on Chrome
- Test on Firefox
- Test on Safari
- If works on one, browser-specific issue
Step 4: Verify Integration Code
Double-check your code:
- Compare with documentation
- Verify all attributes present
- Check for typos
- Ensure proper formatting
Step 5: Contact Support
If nothing works:
- Gather error messages
- Note steps to reproduce
- Check platform status
- Contact support with details
Prevention Tips
To avoid issues in the future:
- Test After Changes: Always test after making changes
- Keep Credentials Secure: Don't share API keys
- Regular Updates: Keep knowledge base updated
- Monitor Status: Check platform status regularly
- Backup Settings: Save your configuration
- Document Changes: Note what you change and when
Getting Help
If you're still stuck:
- Check Documentation: Review official docs
- Search Forums: Look for similar issues
- Contact Support: Reach out to platform support
- Community Forums: Ask in community forums
- Status Page: Check for known issues
Conclusion
Most chatbot issues have simple solutions. Start with the basics:
- Check script placement
- Verify credentials
- Clear cache
- Check browser console
If the issue persists, work through the specific solutions above. Remember: most problems are configuration-related and can be fixed quickly with the right steps.
Keep this guide handy for quick troubleshooting, and don't hesitate to contact support if you need additional help!
Share this article