Troubleshooting
Common issues and solutions when using asc-cli.
Installation Issues
Command Not Found
Symptom:
zsh: command not found: asc
Solutions:
- Check PATH includes install location:
# For pip user install
export PATH="$HOME/.local/bin:$PATH"
# For uv
export PATH="$HOME/.local/bin:$PATH"
# Add to ~/.zshrc or ~/.bashrc for persistence
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
- Verify installation:
pip show asc-cli
# or
uv tool list | grep asc
- Reinstall:
pip uninstall asc-cli
pip install asc-cli
Python Version Error
Symptom:
ERROR: asc-cli requires Python 3.9+
Solution:
# Check Python version
python3 --version
# Install with specific Python
python3.11 -m pip install asc-cli
# Or use uv (handles Python automatically)
uv tool install asc-cli
Authentication Issues
Not Authenticated
Symptom:
Error: Not authenticated. Run 'asc auth login' first.
Solutions:
- Run login:
asc auth login
- Check credentials file exists:
ls ~/.config/asc-cli/credentials
- Verify environment variables (if using):
echo $ASC_ISSUER_ID
echo $ASC_KEY_ID
echo $ASC_PRIVATE_KEY_PATH
Invalid Token
Symptom:
Error: Invalid API credentials. JWT token rejected by App Store Connect.
Solutions:
-
Verify credentials match App Store Connect:
- Log into App Store Connect
- Go to Users and Access → Integrations → App Store Connect API
- Compare Issuer ID and Key ID
-
Check .p8 file:
# Verify file exists and is readable
cat ~/.config/asc-cli/AuthKey_*.p8
# Should show:
# -----BEGIN PRIVATE KEY-----
# (base64 content)
# -----END PRIVATE KEY-----
-
Re-download key if corrupted:
- Keys can only be downloaded once
- If corrupted, generate a new key in App Store Connect
-
Check key hasn't been revoked:
- In App Store Connect, verify key is still active
Permission Denied
Symptom:
Error: Insufficient permissions for this operation.
Required: Admin or App Manager
Your role: Developer
Solution:
- Check your API key role in App Store Connect
- Request Admin or App Manager role from team admin
- Or generate new key with appropriate role
Token Expired
Symptom:
Error: Token expired. Re-authenticating...
Error: Failed to refresh token.
Solutions:
- Re-run login:
asc auth login
- Check system clock is accurate:
date
API Errors
Rate Limited
Symptom:
Error: Rate limited by App Store Connect. Retry after 60 seconds.
Solutions:
- Wait and retry:
sleep 60 && asc apps list
- For bulk operations, use smaller batches:
# Instead of all at once
asc subscriptions pricing set SUB_ID --price 2.99 --all
# Do in batches
asc subscriptions pricing set SUB_ID --price 2.99 -t USA -t CAN -t GBR
# Wait
asc subscriptions pricing set SUB_ID --price 2.99 -t DEU -t FRA -t ITA
- Enable rate limit handling:
asc --rate-limit-retry apps list
Server Error (500)
Symptom:
Error: App Store Connect server error. Status: 500
Solutions:
- Check Apple System Status
- Wait and retry later
- If persistent, contact Apple Developer Support
Resource Not Found
Symptom:
Error: App not found: com.example.app
Solutions:
- Verify bundle ID:
asc apps list
-
Check for typos in bundle ID
-
Ensure app exists in your App Store Connect account
Subscription Issues
Subscription Not Found
Symptom:
Error: Subscription not found: com.example.pro.monthly
Solutions:
- List available subscriptions:
asc subscriptions list BUNDLE_ID
-
Use correct product ID (not display name)
-
Subscription may need to be created in App Store Connect web UI first
Invalid Subscription State
Symptom:
Error: Cannot modify subscription - invalid state: MISSING_METADATA
Solutions:
-
Complete subscription setup in App Store Connect:
- Add description
- Add pricing (at least one territory)
- Review status indicators
-
Subscription must be in READY_TO_SUBMIT or higher
Price Point Not Found
Symptom:
Error: Price $2.50 does not match any Apple price point.
Solutions:
- Use valid Apple price point:
# List available price points
asc subscriptions pricing points
# Use exact price
asc subscriptions pricing set SUB_ID --price 2.49
# or
asc subscriptions pricing set SUB_ID --price 2.99
YAML/Bulk Issues
Invalid YAML Syntax
Symptom:
Error: Invalid YAML at line 15: expected indentation
Solutions:
- Validate YAML syntax:
asc bulk validate subscriptions.yaml
-
Use consistent indentation (2 spaces recommended)
-
Check for tabs vs spaces mixing
-
Online YAML validators can help identify issues
Schema Validation Error
Symptom:
Error: Validation failed: 'price_usd' is required for subscription
Solutions:
- Check against schema:
asc bulk schema --output schema.json
- Ensure all required fields present:
subscriptions:
- product_id: app.pro.monthly # Required
price_usd: 2.99 # Required
territories: all # Required
Partial Apply Failure
Symptom:
Error: Apply failed at subscription 3 of 5.
Successfully applied: 2
Failed: 1
Remaining: 2
Solutions:
-
Check error message for specific issue
-
Fix the failing subscription
-
Resume with remaining:
asc bulk apply subscriptions.yaml --skip 2
Mock Server Issues
Mock Server Won't Start
Symptom:
Error: Cannot start mock server on port 8080
Solutions:
- Check if port is in use:
lsof -i :8080
- Use different port:
asc mock start --port 8081
export ASC_MOCK_URL=http://localhost:8081
- Stop existing instance:
asc mock stop
asc mock start
Mock Not Working
Symptom: Commands still hitting production API
Solutions:
- Verify mock is enabled:
export ASC_MOCK=true
asc apps list
- Check mock server running:
asc mock status
- Verify correct URL:
echo $ASC_MOCK_URL
Debugging
Enable Verbose Output
asc -v subscriptions list BUNDLE_ID
Enable Debug Mode
asc --debug apps list
Shows API requests, responses, and timing.
Check Configuration
asc config show
Displays all active configuration values.
Validate Setup
asc auth test
Tests complete authentication flow.
Getting Help
Check Version
asc --version
View Help
asc --help
asc subscriptions --help
asc subscriptions pricing --help
Report Issues
If you encounter a bug:
- Gather information:
asc --version
python --version
uname -a
- Reproduce with debug:
asc --debug <failing-command> 2>&1 | tee debug.log
- Report at GitHub Issues