Skip to content

Troubleshooting

The events of the SDK in version 1.8.1 do not include the reason of a failure, so the logs of the native SDK are the best way to know what is happening. They are only available on a device, as the SDK does not work in the Unity Editor.

The SDK writes its logs with the Wortise tag. Connect the device and run:

Terminal window
adb logcat -s Wortise

To also see the debug messages, run this command before starting the app:

Terminal window
adb shell setprop log.tag.Wortise DEBUG

Run the app from Xcode and filter the console by <Wortise>. The logs are also available in the Console app of macOS, under the com.wortise.ads subsystem.

When an ad fails to load, the SDK writes a line that ends with the reason:

Interstitial ad failed to load for ad unit <ad unit ID>: NO_FILL
ReasonMeaning
NO_FILLThere was no ad available for the request. Use the test mode to verify the integration
NO_NETWORKThe device has no network connection (Android only)
SDK_NOT_INITIALIZEDThe ad was requested before calling WortiseSdk.Initialize
TIMEOUTThe ad took too long to load

The SDK does not work in the Editor: all the calls are ignored and no event is raised, including OnInitialized and the consent callbacks. Build the app and run it on a device.

The Android build fails with “Could not find com.wortise:android-sdk”

Section titled “The Android build fails with “Could not find com.wortise:android-sdk””

The Maven repositories of the SDK have not been added to the Gradle project. Enable the custom Gradle templates and resolve the dependencies again, as explained in SDK integration.

The Android build fails because of the minSdkVersion

Section titled “The Android build fails because of the minSdkVersion”

The SDK requires Android 7.0 (API level 24). Set Minimum API Level to 24 or higher in Project Settings -> Player -> Other Settings.

The Android log shows ClassNotFoundException: com.wortise.ads.WortiseSdk

Section titled “The Android log shows ClassNotFoundException: com.wortise.ads.WortiseSdk”

The native Android SDK has not been included in the build. Resolve the dependencies, as explained in SDK integration, and build the app again.

The build log shows “Could not load Wortise settings”

Section titled “The build log shows “Could not load Wortise settings””

The settings file Assets/Resources/WortiseSettings.asset does not exist, so the Google App IDs are not applied to the build. Open Wortise -> Settings, set the IDs and build again.

The iOS app crashes at startup because of GADApplicationIdentifier

Section titled “The iOS app crashes at startup because of GADApplicationIdentifier”

The Google App ID for iOS has not been set in Wortise -> Settings, so the key is missing in the Info.plist file. Set it and build again.

ShowAd only works when IsAvailable is true. Otherwise it does nothing, no event is raised and the log shows a called with no ad available message. Check IsAvailable first, and make sure that LoadAd was called and OnLoaded was raised.

LoadAd is ignored, without raising any event, in these cases:

  • An ad is already loading.
  • A previous load failed and the cooldown period (30 seconds by default) has not finished. Check IsInCooldown and CooldownRemainingMs, and request the ad again later.

Look for the reason in the SDK logs. To verify the integration, enable the test mode or use the test ad units, which always return ads.

RequestIfRequired only shows the dialog when it is required for the user, for example the first time for users in the European Economic Area. In any other case the callback receives false. Use Request to always show it.

The callback is not invoked in the Unity Editor. On a device, request the consent when the first scene is already running, for example from the OnInitialized event: the request is ignored when the app has no visible window yet.

Several banners are shown at the same time

Section titled “Several banners are shown at the same time”

A banner stays on screen until Destroy is called, even when the scene changes. Destroy the previous banner before creating a new one.