Agent Troubleshooting
Agent Troubleshooting
Section titled “Agent Troubleshooting”This guide covers common issues with FlightStack build agents and their solutions.
Connection Issues
Section titled “Connection Issues”Agent Shows as Offline
Section titled “Agent Shows as Offline”Symptoms: Agent shows 🔴 Offline in FlightStack despite running.
Causes & Solutions:
-
Agent not running
Terminal window flightstack agent status# If stopped, start it:flightstack agent start -
Network connectivity
Terminal window # Test API connectivitycurl https://api.flightstack.dev/health -
Firewall blocking
- Ensure outbound HTTPS (port 443) is allowed
- Check corporate proxy settings
-
Invalid token
Terminal window # Re-register to get a new tokenflightstack agent register
Connection Timeout
Section titled “Connection Timeout”Connection failedError: Connection timed outSolutions:
- Check internet connectivity
- Verify DNS resolution:
nslookup api.flightstack.dev - Check for proxy requirements
- Try:
curl -v https://api.flightstack.dev/health
Heartbeat Failures
Section titled “Heartbeat Failures”Heartbeat failed: Connection refusedThe agent will retry automatically. If persistent:
- Restart the agent
- Check if API is undergoing maintenance
- Verify your token is still valid
Build Failures
Section titled “Build Failures”Build Stuck in “Queued”
Section titled “Build Stuck in “Queued””Causes:
- No online agents with matching capabilities
- All agents are busy
- Agent disk space too low
Solutions:
# Check agent statusflightstack agent list
# Verify agent is online and has capacityflightstack agent statusFlutter Not Found
Section titled “Flutter Not Found”Error: flutter: command not foundSolution: Ensure Flutter is in the agent’s PATH:
# Find Flutterwhich flutter
# Add to shell profileecho 'export PATH="$PATH:/path/to/flutter/bin"' >> ~/.zshrcsource ~/.zshrc
# Verifyflutter doctor
# Restart agentflightstack agent stopflightstack agent startXcode Build Errors
Section titled “Xcode Build Errors”“No provisioning profile”
# Check profilessecurity find-identity -v -p codesigning“Xcode not found”
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer“License not accepted”
sudo xcodebuild -license acceptAndroid Build Errors
Section titled “Android Build Errors”“SDK not found”
# Set ANDROID_HOMEexport ANDROID_HOME=$HOME/Library/Android/sdkexport PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
# Accept licensesflutter doctor --android-licenses“Build tools not found”
sdkmanager "build-tools;34.0.0"CocoaPods Errors
Section titled “CocoaPods Errors”Error: CocoaPods not installedsudo gem install cocoapodspod setupError: CDN: trunk URL couldn't be downloadedpod repo remove trunkpod setupResource Issues
Section titled “Resource Issues”Disk Space Low
Section titled “Disk Space Low”Agent paused: Insufficient disk spaceSolutions:
-
Free up disk space
-
Clear Flutter/Gradle caches:
Terminal window flutter cleanrm -rf ~/.gradle/caches/rm -rf ~/Library/Developer/Xcode/DerivedData/ -
Remove old builds:
Terminal window rm -rf /tmp/flightstack-*
Out of Memory
Section titled “Out of Memory”Large Flutter projects can consume significant memory.
Solutions:
- Close unnecessary applications
- Increase swap space (Linux)
- Limit Gradle memory in
gradle.properties:org.gradle.jvmargs=-Xmx4g
Startup Issues
Section titled “Startup Issues”Service Won’t Start
Section titled “Service Won’t Start”Check logs:
tail -100 ~/.flightstack/agent.logCommon causes:
- Agent not registered
- Invalid configuration
- Permission issues
Auto-Start Not Working
Section titled “Auto-Start Not Working”macOS:
# Check if loadedlaunchctl list | grep flightstack
# Manually loadlaunchctl load ~/Library/LaunchAgents/com.flightstack.agent.plistLinux:
# Check service statussystemctl --user status flightstack-agent
# Check for errorsjournalctl --user -u flightstack-agent -n 50Getting Help
Section titled “Getting Help”If you’re still stuck:
-
Check agent logs
Terminal window tail -f ~/.flightstack/agent.log -
Run Flutter diagnostics
Terminal window flutter doctor -v -
Join our Discord Get help from the community at discord.gg/flightstack
-
Open an issue Report bugs at github.com/voostack/flightstack/issues