Skip to content

Troubleshooting

The SDK writes its logs to Logcat with the Wortise tag. You can filter them in Android Studio or with the following command:

Terminal window
adb logcat -s Wortise

By default only the most relevant messages are shown. To see the detailed logs, raise the log level before initializing the SDK:

WortiseLog.level = WortiseLog.Level.DEBUG

The same can be done on a device, without changing the code of the app, with this command:

Terminal window
adb shell setprop log.tag.Wortise DEBUG

These are some of the messages that help to verify an integration:

MessageMeaning
Wortise SDK - Version <version>Version of the SDK included in the app
Device identifier: <id>Identifier of the device, needed to register it as a test device in the Wortise dashboard
<Format> ad loaded for ad unit <id>The ad has been loaded
<Format> ad failed to load for ad unit <id>: <error>The ad could not be loaded, with the error code that caused it
showAd() called with no ad availableshowAd() was called on an ad that is not loaded

The on…FailedToLoad and on…FailedToShow callbacks receive an AdError, an enum with the following values:

ErrorMeaningWhat to do
ADAPTER_MISSINGAn ad network needs an adapter that is not in the appNo action is needed: the SDK continues with the next ad network
INVALID_PARAMSThe request has invalid or missing valuesCheck that the ad unit ID is set and that it is correct
LOAD_FAILEDThe content of the ad could not be loadedUsually temporary. Load a new ad later
NO_FILLThere is no ad available for the requestIt is a normal result. See No fill
NO_NETWORKThe device has no network connectionLoad the ad again when the connection is back
RENDER_ERRORThe ad could not be rendered or shownContinue the app flow and load a new ad
RENDER_PROCESS_GONEThe system killed the WebView process that rendered the adContinue the app flow and load a new ad
SDK_NOT_INITIALIZEDThe ad was requested before the SDK was initializedSee SDK not initialized
SERVER_ERRORThe Wortise servers returned an errorLoad the ad again later. Contact us if it persists
TIMEOUTThe ad took too long to loadCheck the connection of the device and load the ad again later
UNSPECIFIEDUnknown errorCheck the SDK logs for more details

An ad was requested before WortiseSdk.initialize was called. This usually happens when the SDK is initialized after the first ad is requested (for example, in an Activity whose layout already contains a banner), or when the ad is requested from a secondary process of the app, where the initialization has no effect.

As the app key is stored on the device after the first initialization, this error normally appears only on the first launch after installing the app. Test with a clean install to reproduce it.

Initialize the SDK in the onCreate method of the Application class, as explained in the SDK integration guide.

If the crash is an exception of the Google Mobile Ads SDK about a missing application ID, the com.google.android.gms.ads.APPLICATION_ID meta-data is missing in the AndroidManifest.xml file. Add it with the Google App ID shown in the Wortise dashboard, as explained in Setup Manifest.

ErrorCauseSolution
Could not find com.wortise:android-sdk (or another dependency)A Maven repository is missingAdd all the repositories listed in Setup project
AAR metadata check failuresThe Android Gradle Plugin or the compile SDK is too oldUse Android Gradle Plugin 8.9.1 or higher and compile SDK 36 or higher
Incompatible version of Kotlin (binary version of the metadata)The Kotlin compiler of the project is older than 2.2Update Kotlin to 2.2 or higher
Manifest merger failure because of minSdkVersionThe minimum SDK of the app is lower than 24Raise the minimum SDK to 24

NO_FILL means that no ad network had an ad for that request, which is a normal situation that depends on the country, the user and the ad unit. To find out whether the integration is correct:

  1. Request the test ad units, which always deliver an ad. If they work, the integration is correct.
  2. If the test ad units also fail, check the app key passed to WortiseSdk.initialize, the Google App ID of the manifest and the SDK logs.
  3. If only your own ad units fail, check that each ad unit ID is copied exactly from the dashboard, that it belongs to the same app as the app key, and that it is used with the format it was created for.

Do not retry in a loop when a load fails: follow the recommendations of the Best practices page.

showAd() only shows an ad that is loaded. When there is none, it writes showAd() called with no ad available to the logs and returns without invoking any callback. This happens when the ad has not finished loading, when it failed to load, when it was already shown, or, in app open ads, when it was loaded more than four hours ago.

Check isAvailable before showing the ad, and load it in advance.

A load request is ignored when the same ad is already loading or when, after a failed load, the ad is in cooldown. In the latter case, the SDK writes Ad load for <id> is in cooldown, skipping request to the debug logs. You can check isInCooldown and cooldownRemainingMs to know when the ad can be requested again.

ConsentManager.requestIfRequired only shows the dialog when the consent is required for the user and it has not been answered yet. In any other case the listener receives false, which is the expected behaviour.

If the dialog should be shown and it is not, enable the debug logs and look for the message Could not show consent form, which includes the reason reported by the Google consent manager.

The view that shows the media content must measure at least 120x120dp. When it is smaller, the SDK writes a warning to the logs with the measured size.