# Guide de Dépannage - Visual Workflow Builder ## 🚨 Problèmes Courants ### Capture d'Écran **"Permission denied"** ```bash # Linux - Permissions X11 xhost +local: export DISPLAY=:0 ``` **"Timeout during capture"** ```typescript // Augmenter timeout et réduire qualité const result = await screenCaptureService.captureScreen({ timeout: 15000, quality: 0.6 }); ``` ### Détection d'Éléments **"Element not found"** ```typescript // Recapturer avec seuil ajusté const validation = await visualTargetService.validateTarget(signature, { confidenceThreshold: 0.6 }); ``` **"Multiple elements detected"** ```typescript // Utiliser plus de contexte const target = await visualTargetService.captureAndSelectElement( position, { includeContext: true, contextRadius: 100 } ); ``` ### Multi-Moniteurs **"Coordinates out of bounds"** ```typescript // Vérifier et rafraîchir les moniteurs const monitors = await monitorService.detectMonitors(); await monitorService.refresh(); ``` ### Performance **"Slow rendering"** ```typescript // Nettoyer cache et optimiser imageCache.clear(); const { optimizedImageLoad } = usePerformanceOptimization({ maxConcurrentOperations: 2, debounceMs: 500 }); ``` ## 🔧 Diagnostic ### Vérification Système ```bash # Test capture d'écran import -window root /tmp/test.png # Vérifier ports netstat -tlnp | grep :5002 # Backend netstat -tlnp | grep :3000 # Frontend ``` ### Tests Connectivité ```typescript // Test santé backend const health = await fetch('/api/visual/health'); console.log(await health.json()); ``` ## 📊 Monitoring ```typescript // Métriques critiques à surveiller const stats = imageCache.getStats(); if (stats.hitRate < 0.8) console.warn('Cache hit rate low'); if (stats.totalSize > 100MB) imageCache.clear(); ``` ## 🆘 Support Collectez avant signalement : - Logs d'erreur complets - Configuration système - Étapes de reproduction - Captures d'écran du problème