Troubleshooting
This guide covers common issues encountered when using AegisShield and provides practical solutions.API Key Issues
OpenAI API Key Errors
Error: OpenAI API key is required
Error: OpenAI API key is required
- Should start with
sk-proj-orsk- - No extra spaces or quotes
- Approximately 50-60 characters long
Error: Incorrect API key provided
Error: Incorrect API key provided
- Key was copied incorrectly (extra spaces, truncated)
- Key was revoked or expired
- Key doesn’t have GPT-4o access
- Go to platform.openai.com/api-keys
- Create a new API key
- Update
local_config.pywith new key - Verify account has GPT-4o access (check usage limits)
Error: Rate limit exceeded
Error: Rate limit exceeded
- Wait 60 seconds before retrying
- Reduce complexity of prompts
- Tier 1 (Free): 500 RPM
- Tier 2: 5,000 RPM
- Tier 3+: Higher limits
Error: Model 'gpt-4o' not found
Error: Model 'gpt-4o' not found
gpt-4o does not exist”Cause: Account doesn’t have GPT-4o accessSolution:- Verify GPT-4 access in OpenAI account
- Add payment method (GPT-4o requires paid account)
- Check platform.openai.com/account/billing
NVD API Issues
Slow vulnerability searches
Slow vulnerability searches
Error: No vulnerabilities found
Error: No vulnerabilities found
- Technology not in NVD database
- Incorrect CPE name format
- NVD API temporarily down
- Verify CPE name format is correct
- Try broader search (e.g., remove version)
- Check NVD status: nvd.nist.gov
AlienVault OTX Issues
Error: Invalid AlienVault API key
Error: Invalid AlienVault API key
- Log in to otx.alienvault.com
- Go to Settings → API Integration
- Copy the OTX Key (not username)
- Update
local_config.py:
No OTX data returned
No OTX data returned
Missing MITRE ATT&CK Data
Error: No MITRE ATT&CK data found
Error: No MITRE ATT&CK data found
Error: Failed to parse STIX data
Error: Failed to parse STIX data
Application Startup Issues
Port 8501 already in use
Port 8501 already in use
ModuleNotFoundError
ModuleNotFoundError
Streamlit not rendering correctly
Streamlit not rendering correctly
- Chrome/Edge (recommended)
- Firefox
- Safari
- Ad blockers may interfere
- Privacy extensions may block WebSocket
Memory and Performance Issues
Out of memory during batch processing
Out of memory during batch processing
Slow threat model generation
Slow threat model generation
- OpenAI API latency
- NVD API rate limiting
- Large application descriptions
- Network connectivity issues
PDF Generation Issues
Error: PDF generation failed
Error: PDF generation failed
- Missing Cairo/Pango libraries (Linux)
- Large threat models timing out
- Invalid HTML/CSS in report template
PDF missing images or formatting
PDF missing images or formatting
Docker Issues
Container fails to start
Container fails to start
- Missing API keys (set via
-eflags) - Port conflict (use different port)
- Insufficient memory (increase with
--memory)
Health check failing
Health check failing
- Increase
start_period(Streamlit needs ~30-40s to start) - Verify curl is installed in container
- Check Streamlit is actually listening:
Cannot access from host browser
Cannot access from host browser
Batch Processing Issues
Invalid threat model validation errors
Invalid threat model validation errors
Batch processing times out
Batch processing times out
Error log shows repeated failures
Error log shows repeated failures
error_log.txt filled with errorsCheck error log:- API rate limits → Reduce
workers - Invalid JSON in batch inputs → Validate with
jq - MITRE data missing → Download STIX files
Streamlit-Specific Issues
Session state errors
Session state errors
File upload not working
File upload not working
- File too large (>200MB default)
- Unsupported file format
- Streamlit upload widget issue
Debug Mode
Enable detailed logging for troubleshooting:Enable Python Debug Logging
Getting Help
If issues persist:Check Existing Issues
Create GitHub Issue
- Clear description of problem
- Steps to reproduce
- Debug logs (remove sensitive data)
- Environment details (OS, Python version, deployment method)