Troubleshooting
This page covers common issues and their solutions. For a complete list of error codes, see the Error Codes reference.
First Steps
Run gpc doctor
The built-in diagnostic command checks your environment, credentials, and configuration:
gpc doctorgpc doctor validates:
- Node.js version compatibility
- Authentication credentials and token validity
- API access and permissions
- Configuration file syntax
- Network connectivity to Google Play APIs
Enable Debug Mode
For detailed output, enable debug mode:
# Environment variable
GPC_DEBUG=1 gpc <command>
# Verbose flag
gpc <command> --verboseDebug mode prints request/response details, timing information, and internal state. Credentials and tokens are automatically redacted.
Common Issues
Authentication
No credentials found
Symptom: Error [AUTH_001]: No credentials found
Cause: GPC cannot locate a service account key or OAuth token.
Fix:
# Point to your service account key
export GPC_SERVICE_ACCOUNT=/path/to/service-account.json
# Or log in with OAuth
gpc auth loginToken expired
Symptom: Error [AUTH_003]: Token expired
Cause: Your OAuth token has expired and needs to be refreshed.
Fix:
gpc auth loginPermission denied
Symptom: Error [AUTH_002]: Permission denied or 403 Forbidden on auth
Cause: Your service account or user account lacks the required permissions.
Fix:
- Open the Google Cloud Console
- Verify the Google Play Android Developer API is enabled
- Check that your service account has the correct roles in Google Play Console under Users and permissions
API Errors
403/401 on Vitals or Error Issues commands
Symptom: Error [API_003]: 403 Forbidden or 401 Unauthorized when running gpc vitals errors search, gpc vitals anomalies, or other Reporting API commands.
Cause: The Reporting API requires the playdeveloperreporting OAuth scope. GPC v0.9.15+ requests both required scopes automatically. If you're using an older cached token, it may only have the androidpublisher scope.
Fix:
- Re-authenticate to obtain a token with both scopes:bash
gpc auth logout && gpc auth login --service-account /path/to/key.json - If using ADC, re-login with both scopes:bash
gcloud auth application-default login \ --scopes=https://www.googleapis.com/auth/androidpublisher,https://www.googleapis.com/auth/playdeveloperreporting
404 on Vitals commands
Symptom: Error [API_004]: 404 Not Found when running gpc vitals crashes, gpc vitals anr, or other vitals commands.
Cause: The Google Play Developer Reporting API is not enabled in your Google Cloud project. Vitals commands use a separate API from the main Android Publisher API.
Fix:
- Enable the Reporting API:bashOr open the Google Cloud Console API Library, search for "Google Play Developer Reporting API", and click Enable.
gcloud services enable playdeveloperreporting.googleapis.com --project YOUR_PROJECT_ID - Wait a few minutes for the change to propagate
- Retry the vitals command
Note: Your service account must also have the "View app quality information" permission in Google Play Console under Users and permissions.
404 App not found
Symptom: Error [API_004]: 404 Not Found
Cause: The package name does not match any app in your developer account.
Fix:
# Verify the package name
gpc apps list
# Check your configured package name
gpc config get app403 Forbidden
Symptom: Error [API_003]: 403 Forbidden
Cause: Your credentials lack API access for the requested operation.
Fix:
- Confirm API access is granted in Google Play Console
- Check that the service account has permissions for the specific app
- Verify the Google Play Android Developer API is enabled in Cloud Console
429 Rate limited
Symptom: Error [API_005]: 429 Too Many Requests
Cause: You have exceeded Google Play API rate limits.
Fix:
# Reduce concurrency for batch operations
gpc <command> --concurrency 1
# GPC automatically retries with backoff, but you can wait and retryNetwork
ECONNREFUSED
Symptom: Error [NET_001]: connect ECONNREFUSED
Cause: Cannot connect to Google APIs. Often a proxy or firewall issue.
Fix:
# If behind a proxy, set proxy environment variables
export HTTPS_PROXY=http://proxy.example.com:8080
# Verify connectivity
curl -I https://androidpublisher.googleapis.comCertificate error
Symptom: Error [NET_002]: unable to verify the first certificate
Cause: Corporate proxy or custom CA certificate not trusted.
Fix:
# Point to your CA certificate bundle
export GPC_CA_CERT=/path/to/ca-bundle.crt
# Or for Node.js
export NODE_EXTRA_CA_CERTS=/path/to/ca-bundle.crtDNS resolution failed
Symptom: Error [NET_003]: getaddrinfo ENOTFOUND
Cause: DNS cannot resolve Google API hostnames.
Fix:
- Check your network connection
- Verify DNS settings
- Try a public DNS server (e.g.,
8.8.8.8)
Configuration
Profile not found
Symptom: Error [CFG_002]: Profile "production" not found
Cause: The specified profile does not exist in your configuration.
Fix:
# List available profiles
gpc config profiles
# Check current profile
echo $GPC_PROFILE
# Create the profile
gpc config set --profile production app com.example.appConfig parse error
Symptom: Error [CFG_001]: Failed to parse config file
Cause: The configuration file contains invalid JSON or YAML.
Fix:
# Validate your config file
gpc doctor
# Check the file manually
cat ~/.config/gpc/config.json | jq .CI/CD
Non-interactive mode
Symptom: Error: Prompts are not supported in non-interactive mode
Cause: GPC is trying to prompt for input in a CI environment.
Fix:
# Disable interactive prompts
export GPC_NO_INTERACTIVE=1Missing step summary
Symptom: GitHub Actions step summary not appearing.
Cause: The GITHUB_STEP_SUMMARY environment variable is not available.
Fix:
- Ensure you are running inside a GitHub Actions workflow
- Check that the step has write permissions to the summary file
- Verify the
--jsonflag is set for structured output
Output Formatting
Table or markdown output shows [object Object]
Symptom: When using --output table or --output markdown, columns containing nested objects display [object Object] instead of actual values.
Cause: Fixed in v0.9.18. Earlier versions did not serialize nested objects before rendering them in table or markdown format.
Fix: Update to v0.9.18 or later:
npm install -g @gpc-cli/cli@latestGetting More Help
- Error Codes Reference -- full catalog of error codes and meanings
- Exit Codes -- process exit code reference
- Environment Variables -- all supported env vars
- GitHub Issues -- report bugs or request features