6.6 KiB
6.6 KiB
Troubleshooting Guide
Common issues and solutions for Crypto Trader.
Application Won't Start
Issue: Backend server won't start
Solutions:
- Check Python version (requires 3.11+)
- Verify all dependencies are installed:
pip install -r requirements.txt && pip install -r backend/requirements.txt - Check if port 8000 is already in use:
lsof -i :8000(Linux/macOS) ornetstat -ano | findstr :8000(Windows) - Try running manually:
python -m uvicorn backend.main:app --reload --port 8000 - Check log files in
~/.local/share/crypto_trader/logs/ - Verify database permissions
Issue: Frontend won't start
Solutions:
- Verify Node.js is installed (v18+):
node --version - Install dependencies:
cd frontend && npm install - Check if port 3000 is already in use
- Try running manually:
cd frontend && npm run dev - Clear node_modules and reinstall:
rm -rf node_modules package-lock.json && npm install - Check browser console for errors
Issue: Cannot connect to backend from frontend
Solutions:
- Verify backend is running on http://localhost:8000
- Check API endpoint in browser: http://localhost:8000/docs
- Check CORS settings in backend
- Verify API client URL in frontend code
- Check browser console for CORS errors
- Verify firewall isn't blocking connections
Issue: Import errors
Solutions:
- Reinstall dependencies:
pip install -r requirements.txt - Verify virtual environment is activated
- Check Python path configuration
- Reinstall problematic packages
Exchange Connection Issues
Issue: Cannot connect to exchange
Solutions:
- Verify API keys are correct
- Check API key permissions
- Verify internet connection
- Check exchange status (may be down)
- Review exchange rate limits
- Check firewall settings
Issue: API key errors
Solutions:
- Verify API keys are valid
- Check key permissions (read-only vs trading)
- Regenerate API keys if needed
- Verify IP whitelist settings
- Check key expiration dates
Trading Issues
Issue: Orders not executing
Solutions:
- Check account balance
- Verify API permissions include trading
- Check order parameters (price, quantity)
- Review exchange order limits
- Check if market is open
- Verify order type is supported
Issue: Positions not updating
Solutions:
- Refresh portfolio view
- Check database connection
- Verify exchange connection
- Review application logs
- Restart application
Data Issues
Issue: Missing historical data
Solutions:
- Check data collection is enabled
- Verify exchange connection
- Check data storage permissions
- Review data retention settings
- Manually trigger data collection
Issue: Incorrect price data
Solutions:
- Verify exchange connection
- Check data source
- Review data quality settings
- Clear and reload data
- Check for data gaps
Performance Issues
Issue: Application is slow
Solutions:
- Check system resources (CPU, memory)
- Reduce historical data retention
- Optimize database (VACUUM ANALYZE)
- Close unnecessary strategies
- Reduce chart data points
- Check for memory leaks in logs
Issue: High memory usage
Solutions:
- Reduce data retention period
- Limit number of active strategies
- Reduce chart history
- Clear old logs
- Restart application periodically
Database Issues
Issue: Database errors
Solutions:
- Check database connection to PostgreSQL
- Verify disk space available
- Check database user permissions
- Backup and restore database if corrupted
- Review database logs
Issue: Database connection failed
Solutions:
- Check if PostgreSQL service is running
- Verify connection URL in
config.yaml - Check network connectivity to database host
- Verify database user credentials and permissions
- Check PostgreSQL logs
Configuration Issues
Issue: Settings not saving
Solutions:
- Check config directory permissions
- Verify config file is writable
- Check disk space
- Review application logs
- Manually edit config file if needed
Issue: Configuration errors
Solutions:
- Validate YAML syntax
- Check for invalid values
- Review default configuration
- Reset to defaults if needed
- Check configuration file encoding
Web UI Issues
Issue: Page not loading or blank screen
Solutions:
- Check browser console for JavaScript errors (F12)
- Clear browser cache and reload
- Verify frontend server is running
- Check network tab for failed API requests
- Try a different browser
- Check if backend is accessible
Issue: WebSocket connection not working
Solutions:
- Check WebSocket status indicator in Dashboard
- Verify backend WebSocket endpoint is accessible
- Check browser console for WebSocket errors
- Verify firewall/proxy settings allow WebSocket connections
- Try refreshing the page
- Check backend logs for WebSocket errors
Issue: Real-time updates not appearing
Solutions:
- Check WebSocket connection status
- Verify WebSocket is connected (green indicator)
- Refresh the page
- Check browser console for errors
- Verify backend is sending WebSocket messages
- Check network tab for WebSocket connection
Issue: Forms not submitting
Solutions:
- Check browser console for validation errors
- Verify all required fields are filled
- Check for error messages in the form
- Verify API endpoint is accessible
- Check network tab for failed requests
- Look for Snackbar error notifications
Strategy Issues
Issue: Strategy not generating signals
Solutions:
- Verify strategy is enabled (check Strategies page)
- Check strategy parameters
- Verify data is available
- Check strategy logs
- Review signal generation logic
- Check Operations Panel for running strategies
Issue: Strategy errors
Solutions:
- Check strategy parameters in Strategy Management page
- Verify data availability
- Review strategy code
- Check application logs
- Test with different parameters
- Check error notifications in UI
Getting Help
If you continue to experience issues:
- Check Logs: Review application logs in
~/.local/share/crypto_trader/logs/ - Review Documentation: Check user manual and API docs
- Check FAQ: See FAQ for common questions
- Report Issues: Create an issue with:
- Error messages
- Steps to reproduce
- System information
- Log files
Log Files
Log files are located in ~/.local/share/crypto_trader/logs/:
app.log: Main application logtrading.log: Trading operationserrors.log: Error messagesdebug.log: Debug information (if enabled)
Review logs for detailed error information.