Skip to main content

Ad Errors

When an error occurs during ad loading or rendering, a callback providing a GfpError is invoked.

When using GfpAdLoader to load ads, the onError() callback of the AdEventListener set via withAdListener() is called to handle the error.

val adLoader = GfpAdLoader.Builder(this, adParam)
...
.withAdListener(object : AdEventListener() {
...

override fun onError(error: GfpError, responseInfo: GfpResponseInfo?) {
// Called when an error happened while the ad is
// attempting to load or rendering an ad.
}
})
.build()

The following shows the format of the error information provided when an error occurs during ad loading or during the rendering process after loading.

override fun onError(error: GfpError, responseInfo: GfpResponseInfo) {
// Gets a GfpErrorType enum indicating the type of error.
val errorType = error.errorType

// Gets an error code specific to the errorType.
val errorCode = error.errorCode

// Gets a string representing the detailed error sub-code.
val errorSubCode = error.errorSubCode

// Gets an error message.
val errorMessage = error.errorMessage

// Gets additional response information about the request.
Log.d("NamAds", responseInfo.toString())

// All of this information is available using the error's toString() method.
Log.d("NamAds", error.toString())
}

NAM SDK Error Codes

errorCodeerrorTypeDescriptionLoad / Render
1000GfpErrorType.INTERNAL_ERRORUnspecified internal errorLoad
3000GfpErrorType.LOAD_ERRORFailed to load the adLoad
3100GfpErrorType.LOAD_PARAM_ERRORMissing required parameters for loading the adLoad
3210GfpErrorType.LOAD_REQUEST_WF_ERRORError during the ad request process to the ad serverLoad
3220GfpErrorType.LOAD_PARSE_WF_ERRORError when the response from the ad server is invalidLoad
3310GfpErrorType.LOAD_NO_FILL_ERRORAd request succeeded, but no ad was returned due to insufficient inventoryLoad
3400GfpErrorType.LOAD_REQUEST_TIMEOUT_ERRORFailed to load the ad within the given request timeoutLoad
5100GfpErrorType.NATIVE_RENDERING_ERRORError during the rendering process of a native adRender
6100GfpErrorType.REWARDED_RENDERING_ERRORError during the rendering process of a rewarded adRender
7100GfpErrorType.INTERSTITIAL_RENDERING_ERRORError during the rendering process of an interstitial adRender

Common Error Logging Messages Debugging

errorMessageDescriptionSolution
Empty render typeNo ad was returned due to insufficient inventory, or a mediation network dependency is missing, making it impossible to find a usable mediation adapter.Contact the NAM administrator.
There is no adapter available or Not found adapter: xxx, xxx, xxx, xxxNAM SDK could not find a usable mediation adapter.1. Add the missing mediation adapter to the project.
2. Verify that the ad is being loaded with the correct adUnitId for the ad format.
Network failed to respond in a timely mannerAd request timeout.1. Improve the internet connection and retry.
2. Adjust the request timeout globally or for specific ad formats.
MediaRenderer is requiredThe native ad response does not include media assets.1. Since this is a native ad that does not require a media view, remove GfpMediaView when defining GfpNativeAdView.
2. When configuring GfpNativeAdOptions, explicitly set false as the argument for setHasMediaView() to request a native ad without a media view.
Bid 421...586 for template 200 being used on template NATIVE_BANNERUnable to process Meta(FAN) native banner ads.1. Verify in Meta Admin that the unit type is Native Banner.
2. When configuring GfpNativeAdOptions, ensure that setHasMediaView(false) is set to allow the use of Native Banner.
No ad configGoogle Ad Manager(DFP) configuration issue.Check the Google Ad Manager Admin.