Overview
This guide covers common issues you may encounter when integrating the AI Chat Extension SDK and how to resolve them.Installation issues
Package not found
Symptom:npm install or pnpm add fails with “package not found”
Cause: npm registry not configured or authentication token missing
Solution:
Add registry to .npmrc
Replace token placeholder
{YOUR_TOKEN_HERE} with your actual authentication tokenRetry installation
Build errors after installation
Symptom: TypeScript or build errors after installing the SDK Cause: Missing dependencies or TypeScript version mismatch Solution:Manifest configuration issues
SDK not initializing
Symptom: SDK initialization fails with manifest validation error Cause: Missing required manifest permissions or web-accessible resources Solution: Verify yourmanifest.json includes:
Content script not injecting
Symptom: Chat controller doesn’t load, no badge or panel appears Cause: Content script files not copied to extension directory Solution:Verify files are copied
Add copy step to build script
Rebuild extension
UI issues
Chat badge not appearing
Symptom: No chat badge shows up after searching Causes:- Query not classified as “shopping”
- Badge feature not enabled
- Branding configuration missing
- Page is in denylist
1. Test with explicit shopping query
1. Test with explicit shopping query
- “best headphones”
- “Nike running shoes”
- “iPhone 15 deals”
2. Verify feature is enabled
2. Verify feature is enabled
3. Check branding configuration
3. Check branding configuration
4. Check URL not in denylist
4. Check URL not in denylist
Chat panel not opening
Symptom: Clicking badge doesn’t open chat panel Causes:- Panel feature not enabled
- Chat panel files missing
- Chat config missing or invalid
- RPC communication failure
1. Verify feature is enabled
1. Verify feature is enabled
2. Check panel files exist
2. Check panel files exist
3. Verify chat config
3. Verify chat config
4. Check browser console for errors
4. Check browser console for errors
- RPC timeout errors
- Failed to load chat panel
- CORS errors
Panel appears blank
Symptom: Chat panel opens but shows blank white screen Causes:- Chat panel JavaScript not loading
- API key invalid
- RPC initialization failure
Check browser console
Verify API key
Test API endpoint
Enable debug mode
Data provider issues
Providers not being called
Symptom: Data providers never execute, no logs Causes:- UI features disabled
- No shopping queries detected
- Panel not opened
1. Verify UI features enabled
1. Verify UI features enabled
2. Test with shopping query
2. Test with shopping query
3. Add debug logging
3. Add debug logging
Provider errors breaking SDK
Symptom: SDK stops working after provider throws error Cause: Exceptions thrown from data providers Solution: Always wrap providers in try-catch and return null/:Slow performance
Symptom: Chat feels sluggish, UI freezes Cause: Data providers taking too long to respond Solutions:1. Add timeouts
1. Add timeouts
2. Implement caching
2. Implement caching
3. Measure performance
3. Measure performance
Event issues
Events not firing
Symptom: Event listeners never called Cause: Listener registered after events occurred Solution: Register listeners immediately after SDK initialization:Missing event data
Symptom: Event fires butevent.data is undefined
Cause: Some events have no data payload (e.g., CHAT_PANEL_CLOSED)
Solution:
Check event type before accessing data:
Query classification issues
All queries classified as “unknown”
Symptom: Shopping queries not detected, badge never shows Causes:- Invalid API key
- Network/firewall blocking API calls
- Backend service unavailable
Verify API key
Test API connectivity
Check browser console
Enable debug mode
Queries not being detected
Symptom: No classification happening, no events Causes:- Not on supported platform (Google Search, ChatGPT)
- SDK not active on current page
- Page in denylist
1. Test on supported platforms
1. Test on supported platforms
- Google Search (google.com/search)
- ChatGPT (chat.openai.com)
2. Check SDK is active
2. Check SDK is active
3. Verify URL not in denylist
3. Verify URL not in denylist
Browser-specific issues
Firefox: Content script not loading
Symptom: Works in Chrome but not Firefox Cause: Different manifest format or permissions Solution: Ensure Firefox-compatible manifest:Safari: Styling issues
Symptom: Chat panel styling broken in Safari Cause: Webkit-specific CSS differences Solution: Use broadly compatible CSS:Debugging tips
Enable debug mode
Always start with debug mode when troubleshooting:Check SDK version
Verify you’re using the latest SDK version:Inspect SDK state
In browser console:Check browser console
Always check the DevTools Console for:- JavaScript errors
- Network request failures
- SDK debug logs
- Warning messages
Test in incognito mode
Test in incognito/private browsing to rule out:- Conflicts with other extensions
- Cached data issues
- Profile-specific problems
Inspect network requests
In DevTools Network tab, filter for:- Requests to
api.onsleek.ai(classification) - Requests to
ai.pie.org(chat backend) - Failed requests (red)
- 401/403 responses (authentication issues)
Common error messages
”Manifest validation failed”
Error:Failed to initialize SDK: Manifest validation failed
Solution: Fix manifest.json configuration (see Manifest configuration issues)
“Chat panel iframe failed to load”
Error:Chat panel iframe failed to load
Solutions:
- Verify
chat-panel.htmlexists in dist directory - Check web-accessible resources in manifest
- Look for CORS errors in console
”Data providers are required”
Error:Data providers are required when UI controls are enabled
Solution: Provide data providers or disable UI features:
“Invalid API key”
Error:Failed to classify query: 401 Unauthorized
Solution: Verify API key is correct and active
Getting help
If you’re still experiencing issues:Email support
Check documentation
- SDK version
- Browser and version
- Manifest.json content
- Console errors/logs
- Steps to reproduce the issue

