6.5 KiB
Troubleshooting Guide
Caching Issues (v2.7.0+)
Cache not working / always fetching fresh
Symptoms:
- Every request hits the API
"cached": falseeven for repeated queries
Solutions:
- Check cache directory exists and is writable:
ls -la .cache/ # Should exist in skill directory - Verify
--no-cacheisn't being passed - Check disk space isn't full
- Ensure query is EXACTLY the same (including provider and max_results)
Stale results from cache
Symptoms:
- Getting outdated information
- Cache TTL seems too long
Solutions:
- Use
--no-cacheto force fresh results - Reduce TTL:
--cache-ttl 1800(30 minutes) - Clear cache:
python3 scripts/search.py --clear-cache
Cache growing too large
Symptoms:
- Disk space filling up
- Many .json files in
.cache/
Solutions:
- Clear cache periodically:
python3 scripts/search.py --clear-cache - Set up a cron job to clear weekly
- Use a smaller TTL so entries expire faster
"Permission denied" when caching
Symptoms:
- Cache write errors in stderr
- Searches work but don't cache
Solutions:
- Check directory permissions:
chmod 755 .cache/ - Use custom cache dir:
export WSP_CACHE_DIR="$TMP_DIR/wsp-cache"
Common Issues
"No API key found" error
Symptoms:
Error: No API key found for serper
Solutions:
- Check
.envexists in skill folder withexport VAR=valueformat - Keys auto-load from skill's
.envsince v2.2.0 - Or set in system environment:
export SERPER_API_KEY="..." - Verify key format in config.json:
{ "serper": { "api_key": "your-key" } }
Priority order: config.json > .env > environment variable
Getting empty results
Symptoms:
- Search returns no results
"results": []in JSON output
Solutions:
- Check API key is valid (try the provider's web dashboard)
- Try a different provider with
-p - Some queries have no results (very niche topics)
- Check if provider is rate-limited
- Verify internet connectivity
Debug:
python3 scripts/search.py -q "test query" --verbose
Rate limited
Symptoms:
Error: 429 Too Many Requests
Error: Rate limit exceeded
Good news: Since v2.2.5, automatic fallback kicks in! If one provider hits rate limits, the script automatically tries the next provider.
Solutions:
- Wait for rate limit to reset (usually 1 hour or end of day)
- Use a different provider:
-p tavilyinstead of-p serper - Check free tier limits:
- Serper: 2,500 free total
- Tavily: 1,000/month free
- Exa: 1,000/month free
- Upgrade to paid tier for higher limits
- Use SearXNG (self-hosted, unlimited)
Fallback info: Response will include routing.fallback_used: true when fallback was used.
SearXNG: "403 Forbidden"
Symptoms:
Error: 403 Forbidden
Error: JSON format not allowed
Cause: Most public SearXNG instances disable JSON API to prevent bot abuse.
Solution: Self-host your own instance:
docker run -d -p 8080:8080 searxng/searxng
Then enable JSON in settings.yml:
search:
formats:
- html
- json # Add this!
Restart the container and update your config:
{
"searxng": {
"instance_url": "http://localhost:8080"
}
}
SearXNG: Slow responses
Symptoms:
- SearXNG takes 2-5 seconds
- Other providers are faster
Explanation: This is expected behavior. SearXNG queries 70+ upstream engines in parallel, which takes longer than direct API calls.
Trade-off: Slower but privacy-preserving + multi-source + $0 cost.
Solutions:
- Accept the trade-off for privacy benefits
- Limit engines for faster results:
python3 scripts/search.py -p searxng -q "query" --engines "google,bing" - Use SearXNG as fallback (put last in priority list)
Auto-routing picks wrong provider
Symptoms:
- Query about research goes to Serper
- Query about shopping goes to Tavily
Debug:
python3 scripts/search.py --explain-routing -q "your query"
This shows the full analysis:
{
"query": "how much does iPhone 16 Pro cost",
"routing_decision": {
"provider": "serper",
"confidence": 0.68,
"reason": "moderate_confidence_match"
},
"scores": {"serper": 7.0, "tavily": 0.0, "exa": 0.0},
"top_signals": [
{"matched": "how much", "weight": 4.0},
{"matched": "brand + product detected", "weight": 3.0}
]
}
Solutions:
- Override with explicit provider:
-p tavily - Rephrase query to be more explicit about intent
- Adjust
confidence_thresholdin config.json (default: 0.3)
Config not loading
Symptoms:
- Changes to config.json not applied
- Using default values instead
Solutions:
- Check JSON syntax (use a validator)
- Ensure file is in skill directory:
/path/to/skills/web-search-plus/config.json - Check file permissions
- Run setup wizard to regenerate:
python3 scripts/setup.py --reset
Validate JSON:
python3 -m json.tool config.json
Python dependencies missing
Symptoms:
ModuleNotFoundError: No module named 'requests'
Solution:
pip3 install requests
Or install all dependencies:
pip3 install -r requirements.txt
Timeout errors
Symptoms:
Error: Request timeout after 30s
Causes:
- Slow network connection
- Provider API issues
- SearXNG instance overloaded
Solutions:
- Try again (temporary issue)
- Switch provider:
-p serper - Check your internet connection
- If using SearXNG, check instance health
Duplicate results
Symptoms:
- Same result appears multiple times
- Results overlap between providers
Solution: This is expected when using auto-fallback or multiple providers. The skill doesn't deduplicate across providers.
For single-provider results:
python3 scripts/search.py -p serper -q "query"
Debug Mode
For detailed debugging:
# Verbose output
python3 scripts/search.py -q "query" --verbose
# Show routing decision
python3 scripts/search.py -q "query" --explain-routing
# Dry run (no actual search)
python3 scripts/search.py -q "query" --dry-run
# Test specific provider
python3 scripts/search.py -p tavily -q "query" --verbose
Getting Help
Still stuck?
- Check the full documentation in
README.md - Run the setup wizard:
python3 scripts/setup.py - Review
FAQ.mdfor common questions - Open an issue: https://github.com/robbyczgw-cla/web-search-plus/issues