Error codes

This page lists some common error codes, what they represent, and how your app or game can respond to them.

Common error codes

The following table lists the errors that the API can return on any platform, along with suggested next steps.

Error code Description Your action
API_NOT_AVAILABLE Integrity API is not available. The Play Store version might be old, or the application is not enabled to use this API. 1) Make sure that an app is enabled to use the API.
2) Ask the user to update Google Play Store.
NETWORK_ERROR No available network was found. Ask the user to check for network connectivity.
PLAY_STORE_NOT_FOUND No official Play Store app was found on the device. Ask the user to install or enable Google Play Store.
PLAY_STORE_VERSION_OUTDATED Play Store app needs to be updated. Ask the user to update Google Play Store.
PLAY_STORE_ACCOUNT_NOT_FOUND No Play Store account is found on the device. Ask the user to sign in to the Google Play Store.
CANNOT_BIND_TO_SERVICE Binding to the service in the Play Store has failed. This can be due to having an old Play Store version installed on the device. Ask the user to update the Google Play Store.
APP_NOT_INSTALLED The calling app is not installed. Something is wrong; possibly an attack. Non-actionable.
PLAY_SERVICES_NOT_FOUND Play services is unavailable or needs to be updated. Ask the user to install or enable Play Services.
PLAY_SERVICES_VERSION_OUTDATED Play services needs to be updated. Ask the user to update Google Play services.
TOO_MANY_REQUESTS The calling app is making too many requests to the API and has been throttled. Retry with an exponential backoff.
GOOGLE_SERVER_UNAVAILABLE Unknown internal Google server error. Retry with an exponential backoff. Consider filing a bug.
INTERNAL_ERROR Unknown internal error. Retry with an exponential backoff. Consider filing a bug.
NONCE_TOO_SHORT Nonce length is too short. The nonce must be a minimum of 16 bytes (before base64 encoding). Retry with a longer nonce.
NONCE_TOO_LONG Nonce length is too long. The nonce must be less than 500 bytes before base64 encoding. Retry with a shorter nonce.
NONCE_IS_NOT_BASE64 Nonce is not of base64 web-safe no-wrap form. Retry with correct nonce format.
APP_UID_MISMATCH The calling app UID (user ID) does not match the one from Package Manager. Something is wrong; possibly an attack. Non-actionable.

Native-specific error codes

The INTEGRITY_ prefix is prepended to native error codes to avoid potential naming conflicts. Apart from the error codes listed above, the native API also includes the following error codes:

Error code Description Your action
INTEGRITY_INITIALIZATION_NEEDED IntegrityManager is not initialized. Invoke IntegrityManager_init() first.
INTEGRITY_INITIALIZATION_FAILED There was an error initializing the Integrity API. Retry with an exponential backoff. Consider filing a bug.
INTEGRITY_INVALID_ARGUMENT Invalid argument passed to the Integrity API. Retry with correct argument.