Troubleshooting¶
Comprehensive guide to diagnosing and fixing common issues with NameMC Sniper.
Quick Diagnosis¶
Run these commands to quickly identify issues:
# Check system status
python Main.py version
python Main.py config-validate
python Main.py test-proxies
# Test with dry run
python Main.py snipe --dry-run --debug
Common Issues¶
Authentication Problems¶
"Bearer token is required"¶
Symptoms: - Error message about missing bearer token - Authentication failures during sniping
Causes: - Bearer token not set in config - Token expired or invalid - Incorrect token format
Solutions:
-
Check token in config:
-
Validate token format:
-
Test token validity:
-
Get new token:
- Follow Authentication Guide
- Tokens typically expire after 24 hours
"Unauthorized access" / HTTP 401¶
Symptoms: - HTTP 401 responses during sniping - "Unauthorized" error messages
Causes: - Expired bearer token - Invalid token - Account doesn't own Minecraft - Token for wrong account
Solutions:
-
Verify account ownership:
Should return your Minecraft profile, not an error. -
Check token expiration:
-
Refresh token:
- Get a new bearer token from minecraft.net
- Update config with new token
Proxy Issues¶
"No working proxies available"¶
Symptoms: - Error about proxy availability - All proxy tests failing - Connection timeouts
Causes: - Proxy servers are down - Incorrect proxy format - Authentication issues - Network connectivity problems
Solutions:
-
Test individual proxies:
-
Check proxy format:
-
Validate proxy credentials:
- Check username/password are correct
- Ensure special characters are URL-encoded
-
Verify proxy subscription is active
-
Test network connectivity:
"Proxy authentication failed" / HTTP 407¶
Symptoms: - HTTP 407 responses - Proxy authentication errors
Causes: - Wrong username/password - Special characters in credentials - Proxy requires different auth method
Solutions:
-
URL encode credentials:
-
Test credentials manually:
-
Check proxy provider documentation:
- Some providers use different auth methods
- Verify endpoint and port numbers
- Check if IP whitelisting is required
Discord Notification Issues¶
Discord notifications not working¶
Symptoms: - No Discord messages received - Webhook errors in logs - Bot not responding
Causes: - Invalid webhook URL - Bot token issues - Missing permissions - Rate limiting
Solutions:
-
Test webhook manually:
-
Verify webhook URL:
-
Check bot permissions:
- Send Messages
- Embed Links
- Read Message History
-
Use External Emojis (if using custom emojis)
-
Test bot token:
"Discord rate limited" / HTTP 429¶
Symptoms: - HTTP 429 responses from Discord - Delayed or missing notifications - "Rate limited" in logs
Causes: - Too many messages sent too quickly - Multiple bots using same token - Global Discord rate limits
Solutions:
-
Reduce notification frequency:
-
Implement rate limiting:
-
Use webhooks instead of bots:
- Webhooks have higher rate limits
- Easier to manage
- More reliable for notifications
Network and Performance Issues¶
"Connection timeout" / Network errors¶
Symptoms: - Frequent connection timeouts - Network-related errors - Slow response times
Causes: - Poor internet connection - High network latency - Firewall blocking connections - DNS resolution issues
Solutions:
-
Test network connectivity:
-
Check firewall settings:
-
Optimize network settings:
-
Use different DNS servers:
High memory usage / Performance issues¶
Symptoms: - High RAM usage - Slow performance - System freezing - Out of memory errors
Causes: - Too many concurrent requests - Memory leaks - Large log files - Insufficient system resources
Solutions:
-
Reduce resource usage:
-
Monitor system resources:
-
Clean up log files:
-
Optimize Python settings:
Configuration Issues¶
"Configuration validation failed"¶
Symptoms: - Config validation errors - Invalid configuration messages - Sniper won't start
Causes: - Syntax errors in YAML - Missing required fields - Invalid values - Incorrect data types
Solutions:
-
Check YAML syntax:
-
Use config validation:
-
Recreate config:
-
Check required fields:
Debugging Tools¶
Enable Debug Mode¶
# Enable debug logging
python Main.py snipe --debug
# Or in config
debug_mode: true
log_level: "DEBUG"
Log Analysis¶
# Search for errors in logs
grep -i "error" logs/namemc_sniper_*.log
# Find authentication issues
grep -i "auth\|401\|403" logs/namemc_sniper_*.log
# Check proxy issues
grep -i "proxy\|407\|timeout" logs/namemc_sniper_*.log
# Monitor real-time logs
tail -f logs/namemc_sniper_*.log
Network Debugging¶
# Add to your debugging script
import requests
import logging
# Enable requests debugging
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("requests.packages.urllib3").setLevel(logging.DEBUG)
logging.getLogger("urllib3.connectionpool").setLevel(logging.DEBUG)
# Test request with full debugging
session = requests.Session()
response = session.get("https://api.minecraft.net/status")
print(f"Status: {response.status_code}")
print(f"Headers: {response.headers}")
Performance Profiling¶
import cProfile
import pstats
# Profile sniper performance
def profile_sniper():
profiler = cProfile.Profile()
profiler.enable()
# Run sniper code here
run_sniper()
profiler.disable()
# Analyze results
stats = pstats.Stats(profiler)
stats.sort_stats('cumulative')
stats.print_stats(20) # Top 20 functions
profile_sniper()
System-Specific Issues¶
Windows Issues¶
"Python not found" / Command not recognized¶
Solutions:
# Add Python to PATH
set PATH=%PATH%;C:\Python39;C:\Python39\Scripts
# Or use py launcher
py Main.py snipe
# Install Python from Microsoft Store
winget install Python.Python.3.9
Windows Defender blocking¶
Solutions: 1. Add exclusion for NameMC Sniper folder 2. Temporarily disable real-time protection 3. Use Windows Security exclusions
PowerShell execution policy¶
Solutions:
# Allow script execution
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Or bypass for single command
powershell -ExecutionPolicy Bypass -File script.ps1
Linux Issues¶
Permission denied errors¶
Solutions:
# Make script executable
chmod +x Main.py
# Install with user permissions
pip install --user -r requirements.txt
# Fix ownership
sudo chown -R $USER:$USER /path/to/namemc-sniper
Missing system dependencies¶
Solutions:
# Ubuntu/Debian
sudo apt update
sudo apt install python3-dev python3-pip build-essential
# CentOS/RHEL
sudo yum install python3-devel python3-pip gcc
# Alpine
apk add python3-dev py3-pip gcc musl-dev
macOS Issues¶
SSL certificate errors¶
Solutions:
# Update certificates
/Applications/Python\ 3.9/Install\ Certificates.command
# Or install certificates manually
pip install --upgrade certifi
Homebrew Python issues¶
Solutions:
Emergency Procedures¶
Sniper Stuck/Frozen¶
-
Graceful shutdown:
-
Force termination:
-
Clean up resources:
Recovery from Failed Snipe¶
-
Analyze logs:
-
Verify username status:
-
Prepare for next attempt:
Getting Help¶
Before Asking for Help¶
- Check logs for error messages
- Run diagnostics commands
- Search documentation for similar issues
- Try basic troubleshooting steps
Information to Include¶
When reporting issues, include:
- Error messages (full text)
- Log files (relevant portions)
- Configuration (sanitized, no tokens)
- System information (OS, Python version)
- Steps to reproduce the issue
Diagnostic Information Script¶
#!/bin/bash
# Generate diagnostic information
echo "=== NameMC Sniper Diagnostics ==="
echo "Date: $(date)"
echo "System: $(uname -a)"
echo "Python: $(python --version)"
echo
echo "=== Configuration Status ==="
python Main.py config-validate
echo
echo "=== Proxy Status ==="
python Main.py test-proxies --timeout 5
echo
echo "=== Recent Logs ==="
tail -n 50 logs/namemc_sniper_*.log | grep -E "(ERROR|WARN|CRITICAL)"
echo
echo "=== Network Connectivity ==="
ping -c 3 api.minecraftservices.com
echo
echo "=== System Resources ==="
free -h 2>/dev/null || echo "Memory info not available"
df -h . 2>/dev/null || echo "Disk info not available"
Next Steps¶
- Review Legal Notice for compliance information
- Get additional support in Support
- Optimize performance with Performance Optimization