Troubleshooting
This comprehensive troubleshooting guide helps you diagnose and fix common issues with Specchio.
Table of Contents
- Quick Diagnostics
- Installation Issues
- Connection Issues
- Display Issues
- Input Issues
- Performance Issues
- Error Messages
Quick Diagnostics
Before diving into specific issues, run this quick diagnostic script to identify problems:
#!/bin/bash
# Save this as specchio-diagnostics.sh and run with: bash specchio-diagnostics.sh
echo "======================================"
echo "Specchio Diagnostics v1.0"
echo "======================================"
echo ""
# Color codes
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Check function
check() {
if [ $? -eq 0 ]; then
echo -e "${GREEN}✓ OK${NC}: $1"
else
echo -e "${RED}✗ FAILED${NC}: $1"
fi
}
# 1. macOS Version
echo "1. Checking macOS version..."
MACOS_VERSION=$(sw_vers -productVersion)
echo " Version: $MACOS_VERSION"
if [[ "$MACOS_VERSION" > "14.0" ]] || [[ "$MACOS_VERSION" == "14.0" ]]; then
check "macOS 14.0+ installed"
else
echo -e "${RED} ✗ macOS 14.0 (Sonoma) or later required${NC}"
fi
echo ""
# 2. Xcode Installation
echo "2. Checking Xcode..."
if [ -d "/Applications/Xcode.app" ]; then
check "Xcode.app found"
xcodebuild -version 2>/dev/null | sed 's/^/ /'
else
echo -e "${RED} ✗ Xcode.app not found in /Applications/${NC}"
fi
echo ""
# 3. Xcode License
echo "3. Checking Xcode license..."
if xcodebuild -checkFirstLaunchStatus 2>&1 | grep -q "accepted"; then
check "Xcode license accepted"
else
echo -e "${YELLOW} ⚠ Xcode license may not be accepted${NC}"
echo " Run: sudo xcodebuild -license accept"
fi
echo ""
# 4. iOS SDK
echo "4. Checking iOS SDK..."
if xcodebuild -showsdks 2>/dev/null | grep -q "iphoneos"; then
check "iOS SDK installed"
xcodebuild -showsdks 2>/dev/null | grep "iphoneos" | head -1 | sed 's/^/ /'
else
echo -e "${RED} ✗ iOS SDK not found${NC}"
echo " Install via: Xcode → Settings → Platforms → iOS → Get"
fi
echo ""
# 5. Code Signing Certificate
echo "5. Checking Apple Development certificate..."
CERT_COUNT=$(security find-identity -v -p codesigning 2>/dev/null | grep -c "Apple Development")
if [ "$CERT_COUNT" -gt 0 ]; then
check "Apple Development certificate found ($CERT_COUNT certificate(s))"
security find-identity -v -p codesigning 2>/dev/null | grep "Apple Development" | head -1 | sed 's/^/ /'
else
echo -e "${RED} ✗ No Apple Development certificate found${NC}"
echo " Create via: Xcode → Settings → Accounts → Manage Certificates → + → Apple Development"
fi
echo ""
# 6. Connected iOS Devices
echo "6. Checking for iOS devices..."
DEVICE_COUNT=0
if command -v xcrun &> /dev/null; then
DEVICES=$(xcrun devicectl list devices 2>&1)
DEVICE_COUNT=$(echo "$DEVICES" | grep -c "iPhone\|iPad")
if [ "$DEVICE_COUNT" -gt 0 ]; then
check "Found $DEVICE_COUNT iOS device(s)"
echo "$DEVICES" | grep "iPhone\|iPad" | sed 's/^/ /'
else
echo -e "${YELLOW} ⚠ No iOS devices found${NC}"
echo " Connect your iPhone via USB and ensure it's unlocked"
fi
else
echo -e "${YELLOW} ⚠ xcrun not found - Xcode tools may not be installed${NC}"
fi
echo ""
# 7. iproxy (bundled tool)
echo "7. Checking iproxy (bundled)..."
if [ -f "SupportingFiles/BundledTools/iproxy" ]; then
check "iproxy binary found in bundled tools"
else
echo -e "${YELLOW} ⚠ iproxy not found in bundled tools${NC}"
fi
echo ""
# 8. libimobiledevice (bundled)
echo "8. Checking libimobiledevice (bundled)..."
if find SupportingFiles/BundledTools -name "*.dylib" | grep -q libimobiledevice; then
check "libimobiledevice libraries found"
else
echo -e "${YELLOW} ⚠ libimobiledevice libraries not found${NC}"
fi
echo ""
# 9. Disk Space
echo "9. Checking disk space..."
DISK_FREE=$(df -h / | awk 'NR==2 {print $4}')
DISK_FREE_GB=$(df -h / | awk 'NR==2 {print $4}' | sed 's/[^0-9.]//g')
echo " Available: $DISK_FREE"
if (( $(echo "$DISK_FREE_GB > 20" | bc -l) )); then
check "Sufficient disk space (>20 GB)"
else
echo -e "${YELLOW} ⚠ Low disk space - recommend at least 20 GB free${NC}"
fi
echo ""
# 10. Network (for WiFi debugging)
echo "10. Checking network configuration..."
if command -v networksetup &> /dev/null; then
WIFI_NAME=$(networksetup -getairportnetwork en0 2>/dev/null | awk -F': ' '{print $2}')
if [ ! -z "$WIFI_NAME" ]; then
check "Connected to WiFi: $WIFI_NAME"
else
echo -e "${YELLOW} ⚠ Not connected to WiFi${NC}"
fi
else
echo -e "${YELLOW} ⚠ Could not check WiFi status${NC}"
fi
echo ""
echo "======================================"
echo "Diagnostics complete!"
echo "======================================"
echo ""
echo "For more detailed diagnostics, see the [Diagnostic Commands](/diagnostics) page."Run this script:
# Create and run the script
cat > specchio-diagnostics.sh << 'EOF'
[paste the script above]
EOF
chmod +x specchio-diagnostics.sh
./specchio-diagnostics.shInstallation Issues
Xcode Won't Install
Symptoms:
- App Store shows error during download
- Installation hangs or fails
- "Not enough disk space" error
Solutions:
Check disk space:
bashdf -h /You need at least 20 GB free.
Clear App Store cache:
bashrm -rf ~/Library/Caches/com.apple.appstore rm -rf ~/Library/Caches/com.apple.instrumentsThen restart your Mac and try again.
Download via browser:
- Go to https://developer.apple.com/download/all/
- Search for "Xcode"
- Download the xip file directly
- Open the downloaded xip file
Xcode License Won't Accept
Symptoms:
sudo xcodebuild -license acceptshows error- Xcode keeps asking to accept license
Solutions:
Try via GUI:
- Open Xcode
- Click "Agree" when prompted
- Wait for additional components to install
Remove license flag and retry:
bashsudo rm /Library/Preferences/com.apple.dt.Xcode.plist sudo xcodebuild -license acceptCheck Xcode installation:
bashls -la /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
Certificate Creation Fails
Symptoms:
- "Manage Certificates" button is greyed out
- Certificate creation error
- No certificate appears after creation
Solutions:
Verify Apple ID is signed in:
bash# Check for Apple ID in Xcode preferences defaults read com.apple.dt.Xcode IDEDeveloperExtrasPresentRemove and re-add Apple ID:
- Open Xcode → Settings → Accounts
- Select your Apple ID → Click "-"
- Click "+" → Add Apple ID again
- Then try creating certificate
Check for certificate manually:
bashsecurity find-identity -v -p codesigning | grep "Apple Development"Reset certificate database (last resort):
bashsecurity default-keychain -s login.keychain security unlock-keychain
Connection Issues
Device Not Detected
Symptoms:
- iPhone doesn't appear in Specchio device list
- "No devices found" error
Solutions:
Verify device is detected by system:
bashxcrun devicectl list devicesIf empty:
- Try different USB cable
- Try different USB port
- Restart iPhone and Mac
- Ensure iPhone is unlocked
Check device trust:
- On iPhone: Settings → General → VPN & Device Management
- Look for your Mac's certificate
- If not present, reconnect via USB and tap "Trust"
Reset trust on iPhone:
- Settings → General → Transfer or Reset iPhone → Reset
- Choose "Reset Location & Privacy"
- Reconnect to Mac and trust again
iproxy Connection Fails
Symptoms:
- "Could not establish iproxy connection"
- Port 8100 not accessible
Solutions:
Check if iproxy is running:
bashps aux | grep iproxyKill existing iproxy processes:
bashpkill iproxyManually test iproxy:
bash# Find device UDID xcrun devicectl list devices # Manually run iproxy ./SupportingFiles/BundledTools/iproxy 8100 8100Test connection:
bashcurl http://localhost:8100/status
WiFi Connection Not Working
Symptoms:
- iPhone not visible via WiFi
- Connection drops when USB unplugged
- "Device not found on network"
Solutions:
Verify same network:
bash# Get Mac's IP ipconfig getifaddr en0 # Get iPhone's IP (from device list) xcrun devicectl list devicesBoth should be on same subnet (e.g., 192.168.1.x)
Re-enable WiFi debugging:
- Open Xcode
- Window → Devices and Simulators
- Check "Connect via network"
- Unplug USB - device should remain visible
Check network allows device discovery:
bash# Browse for iOS devices on network dns-sd -B _apple-mobdev2._tcp local.Wait 10-15 seconds for results.
Try different network:
- Some corporate/guest networks block device-to-device communication
- Try a home WiFi network
Display Issues
Black Screen / No Video
Symptoms:
- Connection succeeds but screen is black
- No updates displayed
Solutions:
Test WDA screenshot endpoint:
bashcurl http://localhost:8100/screenshot --output test.png open test.pngIf this works, WDA is functioning - issue is with Specchio.
Check device is not locked:
- Wake your iPhone
- Enter passcode if needed
- Keep it awake
Try different display mode:
- Switch from USB Video to Screenshot mode
- Or try Lite mode
Check WDA status:
bashcurl http://localhost:8100/status | jqLook for
"state": "success"
Poor Quality / Low Resolution
Symptoms:
- Blurry or pixelated display
- Wrong aspect ratio
- Small window size
Solutions:
Check actual screenshot quality:
bashcurl http://localhost:8100/screenshot --output test.png file test.png # Should show iPhone native resolutionTry USB Video mode (if on WiFi):
- Connect via USB
- Switch to USB Video mode for best quality
Check display scaling in Specchio:
- View → Actual Size (100%)
- View → Fit to Window
Display Lag / High Latency
Symptoms:
- Noticeable delay between iPhone and display
- Slow frame rate
- Choppy updates
Solutions:
Test current FPS:
- Enable "Show FPS" in Specchio settings
- Check what frame rate you're getting
Switch to faster mode:
- USB Video: 30-60 FPS
- Screenshot: 5-15 FPS
- Lite: 2-5 FPS
Check CPU usage:
bashtop -o cpu | grep -E "Specchio|Xcode"If CPU is high, try Lite mode.
Use USB instead of WiFi:
- WiFi adds 10-50ms latency
- USB has minimal latency
Input Issues
Clicks Not Registering
Symptoms:
- Clicking doesn't trigger taps on iPhone
- No response to mouse input
Solutions:
Test WDA input directly:
bash# Tap at center of screen curl -X POST http://localhost:8100/wda/tap \ -H "Content-Type: application/json" \ -d '{"x": 0.5, "y": 0.5}'Verify coordinate mapping:
- Check Specchio logs for coordinate values
- Ensure they're between 0.0 and 1.0
Check WDA session:
bashcurl http://localhost:8100/statusLook for active session.
Keyboard Not Typing
Symptoms:
- Typing on Mac keyboard doesn't appear on iPhone
- Missing characters
- Wrong characters
Solutions:
Test WDA keyboard input:
bash# Type "Hello" curl -X POST http://localhost:8100/wda/keys \ -H "Content-Type: application/json" \ -d '{"value": ["Hello"]}'Click into text field first:
- Must tap a text field before typing
- iOS keyboard should be dismissed
Check keyboard layout:
- Settings → Input → Keyboard Layout
- Match to your physical keyboard
Gestures Not Working
Symptoms:
- Pinch/zoom doesn't work
- Swipe gestures don't respond
- Multi-touch doesn't work
Solutions:
Test gesture endpoint:
bash# Test swipe curl -X POST http://localhost:8100/wda/swipe \ -H "Content-Type: application/json" \ -d '{"fromX": 0.5, "fromY": 0.8, "toX": 0.5, "toY": 0.2}'Check modifier keys:
- Ensure you're holding correct keys (⌘ for pinch, etc.)
- Check Input settings for key bindings
Some apps don't support gestures:
- Try in different apps (Photos, Maps)
Performance Issues
High CPU Usage
Symptoms:
- Specchio using lots of CPU
- Mac fans running loud
- Battery draining quickly
Solutions:
Check CPU usage:
bashtop -o cpu | grep SpecchioSwitch to more efficient mode:
- Lite mode uses least CPU
- USB Video uses hardware acceleration (efficient)
- Screenshot mode is middle ground
Reduce frame rate:
- Settings → Display → Max FPS
- Lower to 15 or 30 FPS
High Memory Usage
Symptoms:
- Specchio using lots of RAM
- System slowdowns
- Swapping
Solutions:
Check memory usage:
bashps aux | grep Specchio | awk '{print $6}'Restart Specchio:
- Memory may accumulate over time
- Periodic restarts help
Use Lite mode:
- Lowest memory footprint
- No image decoding overhead
Error Messages
"WebDriverAgent failed to launch"
Cause: WDA installation or startup failure
Solutions:
# Check WDA status
curl http://localhost:8100/status
# Try manually launching WDA
xcodebuild test \
-project /path/to/WebDriverAgent/WebDriverAgent.xcodeproj \
-scheme WebDriverAgentRunner \
-destination 'id=<YOUR_DEVICE_UDID>' \
CUSTOM_APP_BUNDLE_PATH=/path/to/WebDriverAgent.app"Could not establish session"
Cause: WDA server not responding
Solutions:
# Restart iproxy
pkill iproxy
iproxy 8100 8100 &
# Create new session
curl -X POST http://localhost:8100/session \
-H "Content-Type: application/json" \
-d '{"capabilities": {"deviceName": "iPhone", "platformName": "iOS"}}'"Screenshot capture failed"
Cause: WDA screenshot endpoint error
Solutions:
# Test screenshot manually
curl http://localhost:8100/screenshot --output test.png
# Check device is not locked
# (wake and unlock iPhone)
# Try different display modeGetting Help
If none of these solutions work:
- Run full diagnostics: See Diagnostic Commands
- Check logs: Specchio → View → Show Log
- Search existing issues: https://github.com/Alexintosh/Specchio/issues
- Create new issue: Include:
- macOS version
- Xcode version
- iOS version
- Exact error message
- Diagnostic output
For diagnostic commands you can run, see the Diagnostic Commands page.