a89c7894cf
Backend: - FastAPI avec PostgreSQL et Redis - Authentification JWT complète - API REST pour musique, playlists, recherche - Streaming audio via yt-dlp - SQLAlchemy 2.0 async Frontend: - Flutter avec thème néon cyberpunk - State management Riverpod - Layout adaptatif desktop/mobile - Lecteur audio avec mini-player Infrastructure: - Docker Compose (PostgreSQL + Redis) - Scripts d'installation automatisés - Scripts de build pour exécutables Fichiers ajoutés: - BUILD_CLIENT_*.bat/sh: Scripts de compilation - BUILD_CLIENT_README.md: Documentation compilation - CHECK_FLUTTER.sh: Vérificateur d'environnement - requirements.txt mis à jour pour Python 3.13 - Modèles SQLAlchemy corrigés (metadata -> extra_metadata) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
5.0 KiB
5.0 KiB
🔧 DÉPANNAGE - SPOTIFY LE 2
Solutions aux problèmes les plus courants
🪟 Windows
❌ "python n'est pas reconnu"
Solution:
- Téléchargez Python 3.11+ sur https://www.python.org/downloads/
- IMPORTANT Cochez "Add Python to PATH"
- Redémarrez votre terminal
Vérification:
python --version
❌ "flutter n'est pas reconnu"
Solution:
- Téléchargez Flutter: https://docs.flutter.dev/get-started/install/windows
- Ajoutez Flutter au PATH:
- Variables d'environnement
- Nouvelle variable système:
Path - Ajoutez:
C:\Path\Vers\flutter\bin
- Redémarrez votre terminal
Vérification:
flutter --version
❌ "docker: command not found"
Solution:
- Téléchargez Docker Desktop: https://www.docker.com/products/docker-desktop/
- Installez-le
- Redémarrez votre ordinateur
- Lancez Docker Desktop
Vérification:
docker --version
docker ps
❌ "Port 8000 déjà utilisé"
Solution 1 - Trouver le processus:
netstat -ano | findstr :8000
taskkill /PID <PID> /F
Solution 2 - Changer le port:
cd backend
uvicorn app.main:app --port 8001
Et mettez à jour frontend/lib/core/constants/api_constants.dart:
const String baseUrl = 'http://localhost:8001/api/v1';
❌ "La base de données ne se connecte pas"
Solution:
- Vérifiez que Docker Desktop tourne
- Lancer:
cd docker
docker-compose down
docker-compose up -d
- Vérifiez:
docker-compose ps
Doit montrer postgres et redis comme "Up"
❌ "Le frontend ne se compile pas"
Solution:
cd frontend
flutter clean
flutter pub get
flutter run
❌ "Erreur SSL / Certificate"
Solution:
cd backend
set PYTHONHTTPSVERIFY=0
uvicorn app.main:app --reload
🐧 Linux
❌ "Permission denied"
Solution:
chmod +x INSTALL.sh START.sh
❌ "docker: Permission denied"
Solution:
sudo usermod -aG docker $USER
# Déconnectez-vous et reconnectez-vous
❌ "Port 8000 déjà utilisé"
Solution:
# Trouver le processus
lsof -i :8000
kill -9 <PID>
# Ou changer le port
uvicorn app.main:app --port 8001
🍎 macOS
❌ "flutter: command not found"
Solution:
# Ajouter Flutter au PATH
export PATH="$PATH:`pwd`/flutter/bin"
# Permanent (ajouter à ~/.zshrc ou ~/.bash_profile)
echo 'export PATH="$PATH:$HOME/development/flutter/bin"' >> ~/.zshrc
source ~/.zshrc
🐛 Problèmes Backend
❌ "ModuleNotFoundError: No module named 'fastapi'"
Solution:
cd backend
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
pip install -r requirements.txt
❌ "SyntaxError: parameter without a default"
Solution: Corrigé ! Vérifiez que vous avez la dernière version du code.
❌ "relation 'users' does not exist"
Solution:
cd backend
python -c "from app.core.database import init_db; import asyncio; asyncio.run(init_db())"
📱 Problèmes Frontend
❌ "Bad state: Cannot find a Flutter SDK"
Solution:
flutter config --clear-features
flutter doctor
❌ "No device found"
Solution:
flutter devices
# Activer un appareil ou émulateur
flutter devices
flutter run -d <device-id>
❌ "Could not resolve package"
Solution:
cd frontend
flutter clean
flutter pub get
flutter pub upgrade
🌐 Réseau
❌ "Connection refused" sur localhost:8000
Vérifiez:
- Backend lancé? (Terminal backend ouvert)
- Bon port? (http://localhost:8000)
- Firewall? (Autorisez Python)
Test:
curl http://localhost:8000/docs
Doit afficher la page Swagger UI.
❌ "CORS error" dans le navigateur
Solution: Déjà configuré dans le backend ! Vérifiez:
backend/app/core/config.py→CORS_ORIGINS- Doit inclure
http://localhost:8000
🎬 Redémarrage Complet
Si rien ne fonctionne:
# Arrêter tout
cd docker
docker-compose down
# Nettoyer
cd ..
cd backend
rm -rf venv
python -m venv venv
# Réinstaller
./INSTALL.sh # ou INSTALL_WINDOWS.bat
# Redémarrer
./START.sh # ou START_WINDOWS.bat
📞 Aide Détaillée
- Logs Backend → Terminal backend (erreurs en rouge)
- Logs Frontend →
flutter run(erreurs en rouge) - Docker Logs →
docker-compose logs - API Documentation → http://localhost:8000/docs
✅ Vérification Complète
Lancez CHECK.bat (Windows) pour un diagnostic complet !
Il vérifie:
- ✅ Python installé
- ✅ Git installé
- ✅ Docker installé et tourne
- ✅ Flutter installé
- ✅ Backend configuré
- ✅ Infrastructure Docker tourne
- ✅ Frontend dépendances installées
- ✅ Backend API répond
- ✅ Ports disponibles
Toujours bloqué?
- Lancez
CHECK.batet regardez les erreurs - Consultez
INSTALLATION.md - Vérifiez les logs dans les terminaux
- Redémarrez Docker Desktop
Bon courage ! 🚀