Troubleshooting SDK integration

How do I test if the integration was successful?

You can check if your integration was successful in one of the following ways:

  • Load ads using demo ad units and check if the ads respond to clicks.
  • Use the SDK's built-in analyzer or the native Console tool.
  • For native ads, you can also enable the incorrect integration indicator and check if it turns red.

For more information about testing your integration, see the Yandex Mobile Ads SDK section:

The implementation button returns an incorrect SDK integration

Make sure that:

You can also use the integration debugging mode.

Possible integration errors

Your integration may be incorrect for the following reasons:

  1. The adapter isn't connected or connected incorrectly. See the instructions on connecting to third-party mediation platforms:

  2. The Unity plugin for Unity apps isn't integrated. See the guide on integrating the plugin.

  3. An ad unit ID is specified incorrectly in the Yandex Advertising Network interface or a third-party mediation account. Make sure that you use the same ad unit ID in all your accounts.

  4. The floor values specified in the Yandex Advertising Network interface and the third-party mediation account don't match. Make sure that you use the same floor values in all your accounts.

When integrating with Unity, I see the error resource android:attr/lStar not found

To fix this, downgrade the Target API Level to version 30. For more information, see this guide.

However, we recommend upgrading to Target API Level version 31 instead, because Google imposes restrictions on releasing updates for apps with outdated Target API Level versions. For more information, see this article.

When integrating with React Native (Android), I see the error Could not find any matches for com.facebook.react:react-android

To fix this, add the following code under allprojects in your app's android/build.gradle file:

allprojects {
    repositories {
	// ...
    }

    // this fixes an issue with react-native dependencies resolution
    configurations.all {
        resolutionStrategy.dependencySubstitution {
            substitute module("com.facebook.react:react-android") using module("com.facebook.react:react-native:+")
        }
    }
}
A Fatal Error occurs when finding class paths

This is likely caused by ProGuard performing manipulations and rearrangements at build time. This error occurs if the -keepclasseswithmembernames setting is enabled in the proguard config file. Comment out this code or delete the line.

An error indicating inability to reach a resource occurs at build time

This error may occur if the resource is incorrectly specified in Podfile. For more information, see this guide.

If the error persists, contact support.

Contact support

Provided block ID doesn't exist

The message Provided block ID doesn't exist appears after an ad request, even though the ad units have been created in the Yandex Advertising Network interface.

Make sure that the ad unit specified in the app's request is a valid ad unit from the Yandex Advertising Network interface.

What causes the NoAdsAvailable error?

This error indicates that the system was unable to select an ad. It can occur during testing for new unmatched devices because it takes time for our system to collect information on these devices and for Crypta to fetch it. After this process is completed, ad selection begins. This error may also occur for the following reasons:

  1. The CPM floor set for the ad unit is too high.
  2. The ad unit is archived.
  3. The mediation that you're using doesn't support advertising in Russia.
  4. The app's BundleID in the Yandex Advertising Network interface doesn't match the BundleID for which the ad was requested.

If the error persists, contact support.

Contact support

There's no response to the ad request, and the Banner Rendering Failed with Timeout error occurs

This error may occur if a request takes too long to process. Contact support providing the error log.

Contact support

The banner won't load after sending an ad request

We recommend checking if the passed AdUnitID, request parameters, and banner size are correct. Code samples:

Why does a banner become invisible after it's successfully loaded?

You may be applying android:visibility="gone" for the visibility settings. Set android:visibility="visible" either manually or via code.

Can I limit the duration of Rewarded videos?

Yes, you can. Contact support or your personal manager.

Contact support

Can I crop the image in a native ad?

You can crop the main image by no more than 25% and only relative to the center of the image. The icon can't be enlarged or cropped, but it can be reduced without changing the aspect ratio. For more details, see Native ads.

How do I embed video ads and display ads in native ad units?

By default, only Text & Image ads can be served in native ad units. To enable video ads and display ads in your native ad units, contact support or your personal manager.

Note

Before enabling them, make sure that you're passing the dimensions in the request. For more information, see the following guides:

Contact support

What can cause a low fill rate?

An ad unit may have a low fill rate because of a CPM floor, category or brand blocking, or technical issues. To increase the fill rate, identify what's causing the problem and take steps to address it.

For more information about increasing the effectiveness of your ads, see Help.

How do I record a sniffer session (Сharles)?

Charles is a proxy server that runs on your computer and allows you to record the HTTP and HTTPS traffic of connected devices. Recorded sessions help support teams in quickly troubleshooting issues related to loading and displaying ads because they contain the data of the requested ad unit, placement parameters, information about served banners, and technical specifications of the device.

Installing Charles

  1. Download Charles from the official site and install it on your computer.
  2. If the app offers to automatically configure the network settings when you launch it for the first time, click Grant Privileges.
  3. The app has a free 30-day trial. If you have a license key, in the Charles menu, select Help → Register Charles and register the app.

For detailed information about using the app, see the Charles documentation.

Configuring a proxy

To record the traffic of a mobile device:

  1. In the Charles menu, select Proxy → SSL Proxying Settings.
  2. Enable the Enable SSL Proxying option.
  3. Click Add under Include Location and enter an asterisk in the Host field. Save changes.
  4. In the Charles menu, select Help → SSL Proxying → Install Root Certificate on a Mobile Device or Remote Browser. After this, Charles should display the IP address and port of the proxy server that correspond to the IP address of your computer and the default port, 8888.
  5. Restart Charles.
  6. Connect your mobile device to the same Wi-Fi network as your computer. Go to the network's settings, select manual proxy setup, and enter the IP address and port of the proxy server.

Installing the certificate

To record HTTPS traffic, install the Charles root SSL certificate on your mobile device. Learn more in the Charles documentation.

  1. Using your default browser, download the certificate at http://chls.pro/ssl.

    Note

    If the certificate can't be downloaded, it's possible that the firewall on your computer is blocking incoming connections. In the firewall settings, allow Charles to accept incoming connections and try again.

  2. If the certificate installation doesn't start automatically, find the certificate installation section in the device settings and install the Charles certificate. Set "Credential use" to "VPN and apps." If you need to set a PIN, enter a PIN of your choice in the corresponding field.

  3. For Android 10 and higher, configure the app (APK) that requests the ads:

    • In the res/xml folder, create a network_security_config.xml file containing the following text:

      <?xml version="1.0" encoding="utf-8"?>
      <network-security-config>
            <base-config>
               <trust-anchors>
                  <!-- Trust preinstalled CAs -->
                  <certificates src="system" ></certificates>
                  <!-- Trust user added CAs -->
                  <certificates src="user" ></certificates>
               </trust-anchors>
            </base-config>
      </network-security-config>
      
    • Add an attribute for the application section in the AndroidManifest.xml file:

      <manifest>
            ...
            <application android:networkSecurityConfig="@xml/network_security_config">
               ...
            </application>
      </manifest>
      
  1. Using Safari, download the certificate at http://chls.pro/ssl.

    Note

    If the certificate can't be downloaded, it's possible that the firewall on your computer is blocking incoming connections. In the firewall settings, allow Charles to accept incoming connections and try again.

  2. If the certificate installation doesn't start automatically, go to the Profile section in the device settings, select the Charles certificate, and install it.

  3. In the device settings, go to General → About → Certificates Trust Settings and enable trust for the Charles certificate.

Recording a session

To start or stop recording traffic, click  /  on the Charles toolbar. When recording is in progress, the button looks like this: .

Refresh the screen in the app that requests the ads. Make sure that the ad download URL appears in the session: mobile.yandexadexchange.net/v4/ad. In the Charles menu, select File → Save Session As... and save the file with the .chls extension.

Tip

Once you're done debugging, delete the certificate from your device and disable proxying.

Contact support