Skip to content

Troubleshooting

The plugin relies on our native SDKs, which write their own logs on each platform. These logs are not Dart logs, so they may not appear in the output of flutter run.

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 on a device, without changing the code of the app, run this command:

Terminal window
adb shell setprop log.tag.Wortise DEBUG

The SDK writes its logs to the system log, with the <Wortise> prefix and the com.wortise.ads subsystem. You can read them in the Xcode console when the app is launched from Xcode, or in the Console app of macOS by filtering by that subsystem.

The FAILED_TO_LOAD and FAILED_TO_SHOW events (FAILED in native ads) receive the name of the error in the error argument:

listener: (event, args) {
if (event == InterstitialAdEvent.FAILED_TO_LOAD) {
final String error = args['error'];
}
},
ErrorPlatformMeaningWhat to do
ADAPTER_MISSINGAndroidAn ad network needs an adapter that is not in the appNo action is needed: the SDK continues with the next ad network
INVALID_PARAMSBothThe request has invalid or missing valuesCheck that the ad unit ID is set and that it is correct
LOAD_FAILEDBothThe content of the ad could not be loadedUsually temporary. Load a new ad later
NO_FILLBothThere is no ad available for the requestIt is a normal result. See No fill
NO_NETWORKAndroidThe device has no network connectionLoad the ad again when the connection is back
RENDER_ERRORBothThe ad could not be rendered or shownContinue the app flow and load a new ad
RENDER_PROCESS_GONEAndroidThe system killed the WebView process that rendered the adContinue the app flow and load a new ad
SDK_NOT_INITIALIZEDBothThe ad was requested before the SDK was initializedSee SDK not initialized
SERVER_ERRORBothThe Wortise servers returned an errorLoad the ad again later. Contact us if it persists
TIMEOUTBothThe ad took too long to loadCheck the connection of the device and load the ad again later
UNSPECIFIEDBothUnknown errorCheck the SDK logs for more details

The ad was requested before WortiseSdk.initialize was called. Wait for its Future to complete before loading any ad, and before adding a BannerAd widget to the layout, as shown in Initialize SDK.

This error only appears the first time the app is opened after being installed, because the SDK stores the app key once it has been initialized. Uninstall the app before testing the fix.

There was no ad available for that request, which is a normal result. If it always happens:

  • Request the ad with one of the test ad units. If the test ad is shown, the integration is correct and the result depends on the ad unit or on the available demand.
  • Check that the ad unit ID is the one shown in the dashboard and that it matches the format of the ad (a banner ad unit for BannerAd, an interstitial ad unit for InterstitialAd, and so on).

After a failed load of a fullscreen or native ad, the SDK applies a short cooldown. A load requested during that time is ignored and no event is sent. Use isInCooldown or cooldownRemainingMs to know when the ad can be requested again.

There is no ad available to be shown: it has not been loaded yet, the load failed, or the ad was already shown. No event is sent in this case. Load the ad in advance and check isAvailable before showing it.

The listener of an ad stops receiving events

Section titled “The listener of an ad stops receiving events”

Another object was created with the same ad unit ID, and it took the events from the first one. Create a single InterstitialAd, RewardedAd, AppOpenAd or NativeAdLoader for each ad unit ID and reuse it.

NativeAdLoader.loadAd() throws this error on Android (Can't find WortiseNativeAdViewFactory with id on iOS) when there is no native ad factory registered with the identifier passed to NativeAdLoader. Register the factory on both platforms, with the same identifier, as explained in Native.

loadAd() fails with ACTIVITY_NOT_AVAILABLE

Section titled “loadAd() fails with ACTIVITY_NOT_AVAILABLE”

On Android, fullscreen ads need the Activity of the app to be created. Load them once the user interface of the app is running, and not from a background isolate or a background task.

A BannerAd with AdSize.MATCH_VIEW or with an anchored adaptive size takes all the height of its parent until the ad is loaded. Inside a parent that does not limit the height (such as a Column or a ListView), Flutter reports an error about an infinite height. Wrap the banner in a SizedBox or a Container with a defined height.

The app must meet the requirements of the native SDK. These are the usual causes:

CauseSolution
The minSdk of the app is lower than 24Set minSdk to 24 or higher in android/app/build.gradle
The compileSdk of the app is lower than 36Set compileSdk to 36 or higher in android/app/build.gradle
The Android Gradle Plugin is older than 8.9.1Update the Android Gradle Plugin to 8.9.1 or higher, and Gradle to 8.11.1 or higher
The Kotlin version is older than 2.2Update the Kotlin Gradle plugin of the app to 2.2 or higher

Gradle cannot find com.wortise:android-sdk

Section titled “Gradle cannot find com.wortise:android-sdk”

The plugin adds the Maven repositories it needs to the projects of the app. If the android/settings.gradle file of your app declares the repositories in a dependencyResolutionManagement block that does not allow project repositories, they are ignored (or the build fails), and they must be added to that block:

dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url 'https://maven.wortise.com/artifactory/public' }
maven { url 'https://artifact.bytedance.com/repository/pangle' }
maven { url 'https://artifactory.bidmachine.io/bidmachine' }
maven { url 'https://cboost.jfrog.io/artifactory/chartboost-ads/' }
}
}

The plugin requires iOS 15.0 or higher. Set that version (or a higher one) in the platform :ios line of the ios/Podfile file and in the deployment target of the Xcode project, and run pod install again.

Google Mobile Ads stops the app when it does not find the Google App ID. Check that the com.google.android.gms.ads.APPLICATION_ID meta-data is inside the <application> block of AndroidManifest.xml, and that the GADApplicationIdentifier key is in Info.plist, both with the Google App ID value of your app, as explained in SDK integration.

ConsentManager.requestIfRequired only shows the dialog when the consent is required and has not been collected yet, so it is expected that it is not shown to every user or on every launch. The value it returns tells whether the dialog has been shown.