Build Failures
Step Command Failed
Section titled “Step Command Failed”Error:
Command failed with exit code 1or
Non-zero exit statusCause: The step command executed and returned a non-zero exit code, indicating failure.
Common reasons:
- Dependency installation failed
- Missing tools or libraries
- Incorrect script paths or working directory
- Build compilation errors
- Test failures
Solution:
- Check the step logs in the RunnerHub dashboard
- Identify which command failed (look for error output in logs)
- Review the error message for details
- Common fixes:
- Ensure all dependencies are installed first
- Verify file paths are correct and relative to repo root
- Check that tools are available (xcodebuild, fastlane, etc.)
Example fix:
name: Pipelineplatform: ios
environment: xcode: "16.4"
steps: - name: Install dependencies run: pod install
- name: Build run: xcodebuild -workspace MyApp.xcworkspace -scheme MyApp buildCocoaPods Installation Failure
Section titled “CocoaPods Installation Failure”Error:
pod install failedError installing podsCause: Common CocoaPods issues:
- Outdated or stale pod repository
- Incompatible pod versions
- Missing or corrupted lockfile
- Network issues fetching specs
Solution:
Try updating the pod repository before installing:
name: Pipelineplatform: ios
environment: xcode: "16.4"
steps: - name: Install pods run: | pod repo update pod installOr if you’re debugging:
name: Pipelineplatform: ios
environment: xcode: "16.4"
steps: - name: Update pods run: pod repo update
- name: Install pods run: pod installIf the problem persists:
- Check your
Podfilefor syntax errors - Verify all pods are compatible with your iOS version
- Update your pods:
pod update(updates to latest compatible versions)
Xcode Build Failure
Section titled “Xcode Build Failure”Error:
xcodebuild exited with code 65or other non-zero exit codes
Cause: Typical Xcode build issues:
- Incorrect scheme name
- Missing workspace or project
- Incompatible SDK settings
- Build settings misconfiguration
- Derived data corruption
Solution:
-
Verify scheme exists:
Terminal window xcodebuild -workspace MyApp.xcworkspace -listThis lists all available schemes. Ensure your scheme is spelled correctly.
-
Verify workspace path:
name: Pipelineplatform: iosenvironment:xcode: "16.4"steps:- name: Buildrun: xcodebuild -workspace MyApp.xcworkspace -scheme MyApp buildIf you don’t have a
.xcworkspace, use-projectinstead:Terminal window xcodebuild -project MyApp.xcodeproj -scheme MyApp build -
Check destination: For iOS testing, specify the simulator:
name: Pipelineplatform: iosenvironment:xcode: "16.4"steps:- name: Testrun: |xcodebuild \-workspace MyApp.xcworkspace \-scheme MyApp \-destination 'platform=iOS Simulator,name=iPhone 15' \test -
Clean if cache is corrupted:
name: Pipelineplatform: iosenvironment:xcode: "16.4"steps:- name: Clean buildrun: xcodebuild -workspace MyApp.xcworkspace -scheme MyApp clean build
Timeout Exceeded
Section titled “Timeout Exceeded”Error:
Job exceeded maximum execution timeCause: Your job took longer than the configured timeout value.
Solution:
-
Increase the timeout in your
runnerhub.yml:name: Pipelineplatform: iosenvironment:xcode: "16.4"timeout: 60 # 60 minutes -
Maximum timeout depends on your plan:
Plan Max Timeout Free 30 minutes PAYG 60 minutes Pro 90 minutes Business 120 minutes -
To use timeouts longer than your plan allows, upgrade to a higher plan:
- Go to Billing
- Click Upgrade Plan
-
Alternatively, optimize your build to run faster:
- Enable caching for dependencies
- Run tests in parallel
- Skip unnecessary steps for certain branches
Script Not Found
Section titled “Script Not Found”Error:
sh: script.sh: No such file or directoryor
Error: script not foundCause: The script referenced in your pipeline doesn’t exist or is in a different directory.
Solution:
-
Ensure the script is committed to your repository
-
Use the correct relative path from the repo root:
name: Pipelineplatform: iosenvironment:xcode: "16.4"steps:- name: Run scriptrun: sh scripts/build.sh -
Verify the file exists by checking:
- Is it in
.gitignore? (It won’t be checked out) - Is the path relative to repo root correct?
- Is the filename spelled correctly (case-sensitive on Mac/Linux)?
- Is it in
Permission Denied
Section titled “Permission Denied”Error:
Permission deniedCause: The script doesn’t have execute permissions.
Solution:
-
Add execute permissions to the script:
Terminal window chmod +x scripts/build.sh -
Commit the permission change:
Terminal window git add scripts/build.shgit commit -m "Make build script executable"
Alternatively, run it via shell explicitly:
name: Pipelineplatform: ios
environment: xcode: "16.4"
steps: - name: Run script run: sh scripts/build.sh # 'sh' doesn't require execute bitEnvironment Variables Not Available
Section titled “Environment Variables Not Available”Error:
$API_TOKEN is emptyor
Undefined variable: SECRET_KEYCause: The environment variable is not defined. Environment variables are scoped per app and must be explicitly configured.
Solution:
-
Go to App > Environment tab in the dashboard
-
Add your variable:
- Name:
API_TOKEN(or your variable name; must match^[A-Z0-9_]+$) - Value: Your secret value
- Name:
-
Click Add Variable
-
Use it in your pipeline:
name: Pipelineplatform: iosenvironment:xcode: "16.4"steps:- name: Deployrun: fastlane deployenv:API_TOKEN: $API_TOKEN
Verify the secret name matches your variable reference (case-sensitive).
Missing Dependencies
Section titled “Missing Dependencies”Error:
command not found: xcodebuildor
No such file or directory: /usr/bin/fastlaneCause: Required tools are not installed in the build environment.
Solution:
-
For Xcode tools (
xcodebuild,swift, etc.):- These are pre-installed on the RunnerHub macOS build system
- If missing, verify you’re using the correct command name
-
For CocoaPods (
pod):name: Pipelineplatform: iosenvironment:xcode: "16.4"steps:- name: Install podsrun: |gem install cocoapodspod install -
For Fastlane:
name: Pipelineplatform: iosenvironment:xcode: "16.4"steps:- name: Install Fastlanerun: |gem install fastlanefastlane build -
For other Ruby gems:
name: Pipelineplatform: iosenvironment:xcode: "16.4"steps:- name: Install gemsrun: |bundle installbundle exec fastlane build
Artifacts Not Uploaded
Section titled “Artifacts Not Uploaded”Error: Artifacts are not visible in the dashboard after a successful build.
Cause: Possible reasons:
- Artifact path pattern doesn’t match any files
- Your plan doesn’t include persistent artifacts
Solution:
-
Verify artifact path exists:
artifacts:- build/**/*.ipaEnsure the path glob matches your actual output files.
-
Check artifact retention by plan:
Plan Artifact Retention Free Deleted after job cleanup PAYG 7 days Pro 30 days Business 90 days -
If you’re on the Free plan:
- Configure your own artifact storage (e.g., upload to S3, TestFlight, GitHub releases)
- Example with Fastlane uploading to TestFlight:
name: Pipelineplatform: iosenvironment:xcode: "16.4"steps:- name: Build and uploadrun: fastlane build
Build Cache Issues
Section titled “Build Cache Issues”Symptom: Cache is not being restored on subsequent builds, or a build fails due to stale cache.
Cause:
- Lock file changed (e.g.,
Podfile.lock,Package.resolved) → cache key changed → cache miss - Cache was manually cleared
- Cache is older than 14 days
Solution:
-
Force cache refresh:
- Commit a new
pod installorswift package resolve - This regenerates the cache key with updated lock files
- Commit a new
-
Clear cache manually:
- Go to App > Settings
- Click Clear Cache
- Run your build again
-
Monitor cache size:
- Cache is limited to 50GB per agent
- If exceeded, oldest entries are evicted
- Reduce cache size by removing unnecessary dependencies
See Cache Problems for more details.
Quick Debugging
Section titled “Quick Debugging”Create a debug pipeline to identify issues:
name: Debug Pipelineplatform: ios
environment: xcode: "16.4"
triggers: - push
steps: - name: Print environment run: env
- name: Show working directory run: pwd
- name: List files run: ls -la
- name: List schemes run: xcodebuild -workspace MyApp.xcworkspace -list
- name: Show Xcode version run: xcodebuild -versionThis helps identify:
- Missing files
- Incorrect working directory
- Environment configuration issues
- Available schemes and SDKs