Error codes can be very helpful when troubleshooting unfilled ad requests.
In this article, you’ll learn about:
- Google Mobile Ads SDK error codes
- Options for retrieving SDK errors codes
- Types of common SDK error codes
- Additional resources
Google Mobile Ads SDK error codes
Google Mobile Ads SDK error codes help you to understand why an ad request can’t be filled. When the SDK sends an ad request to Google’s servers, the server either responds with an ad or a no fill response. Sometimes, the no fill response will include an error message to indicate what went wrong.
In cases where an error code is not provided, you can check our Resources to troubleshoot ads not showing. You can also troubleshoot issues found using ad inspector.
Options for retrieving SDK errors codes
For Android:
- Retrieve ad load errors using the ad load failure callback
- Set up network tracing and look for logs with
"Ads.*: Ad failed to load"
For iOS:
- Retrieve ad load errors using the ad load failure callback
- View your ads logs from the Xcode Debug Console
Types of common SDK error codes
This table lists the most common error codes, what the error code means, and the steps you can take.
Error code (Android) |
Error code (iOS) |
What does it mean? | What can you do? |
---|---|---|---|
ERROR_CODE_ |
GADErrorServer |
You get this error code when there is an ad server error, for example, an invalid response was received from the ad server. |
|
ERROR_CODE_ |
GADErrorInvalid |
You get this error code for an invalid ad request, for example, when the ad unit ID is incorrect. This error code commonly indicates that the ad request implementation doesn’t meet SDK requirements. |
Reference the sample code and sample apps provided in the developer documentation to help you implement the functions correctly. |
ERROR_CODE_ |
GADErrorNetwork |
You receive this error when an ad request cannot be filled due to network connectivity. This could be due to a user’s phone switching networks or network disturbances distorting the communication between the app and the ad server. |
Ensure you have a stable internet connection. Note: Some telecom providers may also limit specific traffic due to policy, which can also cause this error.
|
ERROR_CODE_ |
GADErrorNoFill |
If you have this error code, it means that the ad request was successful, but no ad was returned due to lack of demand. What is happening? Advertisers can target specific regions, platforms and user profiles based on business relevance, which can sometimes result in lower availability of ads for a particular region or user profile. This error code suggests that the implementation is correct, but the ad request wasn’t filled because of lack of availability of a suitable ad at that particular instant of time when an ad request was sent from the app. |
|