This content is likely not relevant anymore. Try searching or browse recent questions.
This post is a trending issue.
Hello AdMob Community,
Hope everyone is having a fantastic week so far. The Admob team would like to introduce a new Troubleshooting Series within our Admob forum. We will tackle the most commonly asked questions with in-depth articles curated by our team to help you better monetize with Admob. To kickstart the series, we would like to share more about understanding Admob error codes & logs. Happy learning!
When you send an Ad Request to Google, we try our best to return a relevant Ad. However, in some scenarios Google’s Ad Servers would not be able to return an Ad
This can be due to a variety of reasons such as: Invalid Ad Requests, a Network Connectivity issue or simply that the Ad Server did not have a suitable Ad at that moment when the Ad request was sent.
The error codes can be very helpful in troubleshooting unfilled Ad Requests as they indicate what went wrong when an Ad Request could not be filled. When an Ad Unit in an app sends an Ad Request to Google’s servers, the server either responds with an ad, or with an Error code to indicate what went wrong.
This page (Link) on the Google Developer Website lists and describes the common error codes you may receive when using AdMob. These would be visible in the logs in your development environment (e.g Android Studio), or within the Network Trace (Link) or Charles Logs recording the Ad Requests and Responses for your app.
How To Identify Error Codes :
- Development Environment (E.g Android Studio) :
- The Error Code is included in the logs surfaced in the app’s development environment (e.g Android Studio, xCopde for iOS, Unity Editor etc).
- When the App is ‘Run’ or executed in the development environment, there will be windows which record detailed logs of every process within the running app. If the App requests for an Ad, the Ad Request will be included in the Logs. If the Ad Request is ‘filled’ or responded to by our Ad Server, this ‘Response’ will also be in the logs. Any Error code will be part of the ‘Ad Response;’ in these logs.
Screenshots for Android Studio :
- Run The App
- Navigate to LogCat
- Scroll through the logs to locate the log line with error information (Generally includes the package name, Error Code (Numeric) and the Error Description (Reference Link)
2. Via Charles Logs
3. Via Network Trace
Common Error Codes are :
- Error Code 0 : ERROR_CODE_INTERNAL_ERROR
This indicates that something happened internally; for instance, an invalid response was received from the ad server.Newly created Ad Units can take upto 2 hours to become active (SpinUp Time). Any Ad requests from newly created Ad Units would also receive Error Code 0 in response to Ad requests until they are ready to serve live ads.What to do? Test Ads!!
- Error Code 1 : ERROR_CODE_INVALID_REQUEST
The ad request was invalid; for instance, the ad unit ID was incorrect.This commonly suggests that the Ad Request implementation is not as per the SDK’s requirements - Resources like the sample codes and sample apps provided in the developer documentation can help in implementing the functions correctly.
- Error Code 2 : ERROR_CODE_NETWORK_ERROR
The ad request was unsuccessful 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. Some Telecom providers may also limit specific traffic due to policy, which can also lead to such an error.
- Error Code 3 : ERROR_CODE_NO_FILL
Description (Dev Docs Link) : The ad request was successful, but no ad was returned due to lack of ad inventory.Why is it 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. Error code suggests that the implementation is correct, and that the Ad Request was not 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.Policy related restrictions on certain Apps or Ad Units will also lead to Error Code 3 being returned in response to Ad Requests.What Can The Pub Do About it :→ As we cannot manipulate advertiser demand, there are no particular ‘fixes’ for this error - the pub can cross-check the Ad Unit implementation to ensure that the Ad Units are implemented correctly.→ Mediation : In some instances, certain Ad Networks may have limited performance in some regions or for specific formats, in which case the pubs can try using mediation to add other Ad Networks that may potentially perform well.→ Check for Policy status for the Pub ID, the App and the Ad Unit ID. Also check the Brand Safety flags and Coppa status.→ If the Pub can obtain Test Ads for an Ad Unit (Instructions) - then their implementation is correct, and the Ad Units will serve Ads normally when an Ad is available depending on advertiser demand.
Reviewing the Error Codes can help optimize the troubleshooting efforts for issues like Low Match Rate or No Ads returned when implementing a new Ad Unit. It’s recommended to include the error codes and logs (Charles Logs and Network Trace) reporting an issue on the forum or when communicating with Google Support teams.
-The AdMob team.
This question is locked and replying has been disabled.
This will remove the reply from the Answers section.
Notifications are off
Your notifications are currently off and you won't receive subscription updates. To turn them on, go to Notifications preferences on your Profile page.
Google takes abuse of its services very seriously. We're committed to dealing with such abuse according to the laws in your country of residence. When you submit a report, we'll investigate it and take the appropriate action. We'll get back to you only if we require additional details or have more information to share.
Go to the Legal Help page to request content changes for legal reasons.