Skip to main content

AdmobError

import type { AdmobError } from 'nitro-ui-admob'

An error reported by the Google Mobile Ads SDK, passed to onAdFailedToShow and onAdFailedToLoad.

FieldTypeDescription
codestringThe numeric GADErrorCode as a string on iOS, the SDK ErrorCode name on Android, or initialization-failed when the SDK could not start.
messagestringA description of the error from the SDK.

Codes​

codePlatformWhere
Numeric, such as "1"iOSonAdFailedToShow, onAdFailedToLoad, load() rejections
SDK ErrorCode nameAndroidonAdFailedToShow, onAdFailedToLoad, load() rejections
initialization-failedBothonAdFailedToLoad of a banner when the SDK could not start

Thrown errors​

These are Errors, not AdmobError objects:

Thrown byMessage
load()"<code>: <message>", with the same code as above.
load(), Admob.initialize()The missing app ID message; see native setup.
show()This ad was already shown. Load a new ad.
show()This ad expired. Load a new ad.

Guide: errors and troubleshooting.