Back to Blog
DevelopmentDec 20, 20255 min read

Chatbot Not Working? Common Issues and How to Fix Them

BB

Binary Buddies

Author

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:

  1. Log into your chatbot dashboard
  2. Go to chatbot settings
  3. Copy the Chatbot ID and API Key again
  4. Replace in your code
  5. Clear cache and reload

Check 3: Check Browser Console

Problem: JavaScript errors preventing script from loading.

Solution:

  1. Open browser DevTools (Press F12)
  2. Go to "Console" tab
  3. Look for red error messages
  4. 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:

  1. Test the URL directly in browser: https://your-domain.com/widget.js
  2. Should return JavaScript code (not 404 error)
  3. If 404, check the URL is correct
  4. 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:

  1. Go to chatbot dashboard
  2. Check API key status (should be "Active")
  3. Regenerate API key if needed
  4. Update code with new key
  5. Test again

Check 2: Check Chatbot Status

Problem: Chatbot might be set to "Inactive" or "Draft".

Solution:

  1. Go to chatbot settings
  2. Verify status is set to "Active"
  3. If "Draft", change to "Active"
  4. Save changes
  5. 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:

  1. Open DevTools (F12)
  2. Go to "Network" tab
  3. Send a message in chatbot
  4. Look for failed requests (red)
  5. Check error messages in failed requests

Check 5: Verify Domain Restrictions

Problem: Your domain might not be in the allowed list.

Solution:

  1. Go to chatbot settings
  2. Check "Allowed Domains" field
  3. Ensure your website domain is listed
  4. Or clear the field to allow all domains
  5. 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:

  1. Search your code for "widget.js"
  2. Ensure it appears only once
  3. Remove any duplicate script tags
  4. 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:

  1. Check data-theme attribute
  2. Verify theme name is correct
  3. Try a different theme to test
  4. Check theme is available in your plan

Check 2: Check CSS Conflicts

Problem: Website CSS might be overriding chatbot styles.

Solution:

  1. Check browser DevTools
  2. Inspect chatbot elements
  3. Look for CSS conflicts
  4. Add !important to chatbot styles if needed
  5. 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:

  1. Test on actual mobile device
  2. Check viewport meta tag is present
  3. Verify chatbot supports mobile (should automatically)
  4. 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:

  1. Copy API key directly from dashboard
  2. Don't add or remove any characters
  3. Check for leading/trailing spaces
  4. Verify it's the complete key

Check 2: Regenerate API Key

Problem: API key might be expired or compromised.

Solution:

  1. Go to chatbot settings
  2. Click "Regenerate API Key"
  3. Copy new key immediately
  4. Update all places using old key
  5. Old key will stop working

Check 3: Check API Key Permissions

Problem: API key might not have required permissions.

Solution:

  1. Verify API key has "chat" permission
  2. Check chatbot is in "Active" status
  3. 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:

  1. Check platform status page
  2. Test API response time directly
  3. Contact support if consistently slow
  4. Consider upgrading plan if on free tier

Check 2: Optimize Knowledge Base

Problem: Too much data might slow responses.

Solution:

  1. Review uploaded documents
  2. Remove unnecessary files
  3. Optimize document sizes
  4. Use relevant content only

Check 3: Check Network Connection

Problem: Slow internet might affect response time.

Solution:

  1. Test on different network
  2. Check internet speed
  3. Verify no network issues
  4. 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:

  1. Review uploaded documents
  2. Update outdated information
  3. Add new relevant documents
  4. Remove incorrect information

Check 2: Improve System Prompt

Problem: System prompt might need refinement.

Solution:

  1. Review your system prompt
  2. Be more specific about chatbot's role
  3. Add instructions about accuracy
  4. Test with updated prompt

Check 3: Add More Context

Problem: Chatbot might not have enough information.

Solution:

  1. Add more relevant documents
  2. Include FAQ documents
  3. Add links to helpful resources
  4. 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:

  1. Test on actual mobile device
  2. Use different mobile browsers
  3. Check both iOS and Android
  4. 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:

  1. Check widget.js supports mobile
  2. Verify touch events are handled
  3. Test button is large enough (min 44x44px)
  4. 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:

  1. Go to chatbot settings
  2. Add your domain to allowed domains
  3. Include both www and non-www versions
  4. Save and wait a few minutes

Check 2: Check API Configuration

Problem: API might not allow your origin.

Solution:

  1. Contact support if issue persists
  2. Verify API CORS settings
  3. 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:

  1. Check for JavaScript errors
  2. Disable other scripts temporarily
  3. Identify conflicting script
  4. 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:

  1. Open DevTools (F12)
  2. Go to Console tab
  3. Look for errors (red text)
  4. Note error messages
  5. Search for solutions online

Step 2: Test in Incognito Mode

Eliminate cache and extension issues:

  1. Open Incognito/Private window
  2. Visit your website
  3. Test chatbot
  4. If works, issue is cache or extension

Step 3: Test on Different Browser

Eliminate browser-specific issues:

  1. Test on Chrome
  2. Test on Firefox
  3. Test on Safari
  4. If works on one, browser-specific issue

Step 4: Verify Integration Code

Double-check your code:

  1. Compare with documentation
  2. Verify all attributes present
  3. Check for typos
  4. Ensure proper formatting

Step 5: Contact Support

If nothing works:

  1. Gather error messages
  2. Note steps to reproduce
  3. Check platform status
  4. Contact support with details

Prevention Tips

To avoid issues in the future:

  1. Test After Changes: Always test after making changes
  2. Keep Credentials Secure: Don't share API keys
  3. Regular Updates: Keep knowledge base updated
  4. Monitor Status: Check platform status regularly
  5. Backup Settings: Save your configuration
  6. Document Changes: Note what you change and when

Getting Help

If you're still stuck:

  1. Check Documentation: Review official docs
  2. Search Forums: Look for similar issues
  3. Contact Support: Reach out to platform support
  4. Community Forums: Ask in community forums
  5. 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

Related Articles