Skip to content

Agent Troubleshooting

This guide covers common issues with FlightStack build agents and their solutions.

Symptoms: Agent shows 🔴 Offline in FlightStack despite running.

Causes & Solutions:

  1. Agent not running

    Terminal window
    flightstack agent status
    # If stopped, start it:
    flightstack agent start
  2. Network connectivity

    Terminal window
    # Test API connectivity
    curl https://api.flightstack.dev/health
  3. Firewall blocking

    • Ensure outbound HTTPS (port 443) is allowed
    • Check corporate proxy settings
  4. Invalid token

    Terminal window
    # Re-register to get a new token
    flightstack agent register
Connection failed
Error: Connection timed out

Solutions:

  • Check internet connectivity
  • Verify DNS resolution: nslookup api.flightstack.dev
  • Check for proxy requirements
  • Try: curl -v https://api.flightstack.dev/health
Heartbeat failed: Connection refused

The agent will retry automatically. If persistent:

  • Restart the agent
  • Check if API is undergoing maintenance
  • Verify your token is still valid

Causes:

  1. No online agents with matching capabilities
  2. All agents are busy
  3. Agent disk space too low

Solutions:

Terminal window
# Check agent status
flightstack agent list
# Verify agent is online and has capacity
flightstack agent status
Error: flutter: command not found

Solution: Ensure Flutter is in the agent’s PATH:

Terminal window
# Find Flutter
which flutter
# Add to shell profile
echo 'export PATH="$PATH:/path/to/flutter/bin"' >> ~/.zshrc
source ~/.zshrc
# Verify
flutter doctor
# Restart agent
flightstack agent stop
flightstack agent start

“No provisioning profile”

Terminal window
# Check profiles
security find-identity -v -p codesigning

“Xcode not found”

Terminal window
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

“License not accepted”

Terminal window
sudo xcodebuild -license accept

“SDK not found”

Terminal window
# Set ANDROID_HOME
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
# Accept licenses
flutter doctor --android-licenses

“Build tools not found”

Terminal window
sdkmanager "build-tools;34.0.0"
Error: CocoaPods not installed
Terminal window
sudo gem install cocoapods
pod setup
Error: CDN: trunk URL couldn't be downloaded
Terminal window
pod repo remove trunk
pod setup
Agent paused: Insufficient disk space

Solutions:

  1. Free up disk space

  2. Clear Flutter/Gradle caches:

    Terminal window
    flutter clean
    rm -rf ~/.gradle/caches/
    rm -rf ~/Library/Developer/Xcode/DerivedData/
  3. Remove old builds:

    Terminal window
    rm -rf /tmp/flightstack-*

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

Check logs:

Terminal window
tail -100 ~/.flightstack/agent.log

Common causes:

  • Agent not registered
  • Invalid configuration
  • Permission issues

macOS:

Terminal window
# Check if loaded
launchctl list | grep flightstack
# Manually load
launchctl load ~/Library/LaunchAgents/com.flightstack.agent.plist

Linux:

Terminal window
# Check service status
systemctl --user status flightstack-agent
# Check for errors
journalctl --user -u flightstack-agent -n 50

If you’re still stuck:

  1. Check agent logs

    Terminal window
    tail -f ~/.flightstack/agent.log
  2. Run Flutter diagnostics

    Terminal window
    flutter doctor -v
  3. Join our Discord Get help from the community at discord.gg/flightstack

  4. Open an issue Report bugs at github.com/voostack/flightstack/issues