Skip to content

Ad errors

Denis edited this page May 12, 2025 · 2 revisions

In cases where an ad fails to load/show, a callback is called which provides a AdError object.

AdError is commonly used in ad-related callbacks such as onAdFailedToLoad or onAdFailedToShow.

This ad error object has the following methods:

  • int getCode()
    Returns the unique AdErrorCode that identifies the type of error. Use to programmatically handle specific error cases.
  • String getMessage()
    Returns a human-readable message describing the error.
    Use for for logging or debugging purposes.

AdErrorCode constants

All errors are divided into the following categories defined in AdErrorCode.

Code Constant Description
0 INTERNAL_ERROR Indicates an internal error occurred.
1 NOT_READY Indicates that ads are not ready to be shown. Ensure to call the appropriate ad loading method or use automatic load mode. If using automatic load mode, wait a little longer for ads to be ready.
2 REJECTED Indicates that the device is rejected for services. Services may not be available for some devices that do not meet the requirements. For example, the country or version of the OS.
3 NO_FILL Indicates that no ads are available to be served. If ads are visible in test ads mode, your implementation is correct, and ads will be served once live.
6 REACHED_CAP Indicates that the ad creative has reached its daily cap for the user. This is typically relevant for cross-promotion ads only.
7 NOT_INITIALIZED Indicates that the CAS Mediation is not initialized. Ensure to add SDK initialization code in your Application's onCreate function.
8 TIMEOUT Indicates a timeout error occurred because the advertising source did not respond in time. The system will continue waiting for a response, which may delay ad loading or cause a loading error.
9 NO_CONNECTION Indicates that there is no internet connection available, which prevents ads from loading.
10 CONFIGURATION_ERROR Indicates that there is a configuration error in one of the mediation ad sources. Report this error to your support manager for further assistance.
11 NOT_PASSED_INTERVAL Indicates that the interval between impressions of interstitial ads has not yet passed. This error may also occur if a trial ad-free interval has been defined and has not yet passed since app start.
12 ALREADY_DISPLAYED Indicates that another fullscreen ad is currently being displayed, preventing new ads from showing. Review your ad display logic to avoid duplicate impressions.
13 NOT_FOREGROUND Indicates that ads cannot be shown because the application is not currently in the foreground.

🔗 Next
Impression Level data

Clone this wiki locally