Documentation

LevelPlay SDK - Android

Troubleshooting show errors

Solve common issues with showing ads, such as capped placements, ads that expire before show, and show calls made while an ad is on screen.
Read time 4 minutesLast updated a day ago

These errors occur when the LevelPlay SDK can't display a loaded ad. Use this page to quickly identify and fix issues that might occur when showing an ad.
Note
If a show fails because no usable ad is available, load a new ad. If a show fails because another ad is already showing, keep the loaded ad and wait for the
onAdClosed
callback before you load or show another.

Symptoms

When you try to show an ad, the SDK returns the following error code and message:
[509] show called while ad unit is not ready to show

Cause

Common reasons for this error include:
  • Your app calls show when no loaded ad is ready to display
  • A loaded ad becomes unavailable before your app calls show

Resolution

To resolve this error, do the following:
  1. Load a new ad, and wait for the load success callback before you call show.
  2. If the error happens repeatedly, capture logs and contact LevelPlay support.

Symptoms

When you try to show an ad, the SDK returns one of the following error codes and messages:
[524] placement [name] is capped[530] adUnitId [id] is capped

Cause

A capping or pacing rule configured in the dashboard prevents an ad from showing.
Common reasons for this error include:
  • The daily or session cap is reached for the placement (524) or ad unit (530)
  • The pacing interval hasn't elapsed

Resolution

To resolve this error, do the following:
  1. Don't reload the ad. It stays loaded, so show it again after the cap or pacing period ends.
  2. Review the capping and pacing settings for the ad unit or placement in the LevelPlay dashboard.
Note
isAdReady()
returns false for ad unit capping (530), but not for placement capping (524). To check placement capping before you show an ad, call
isPlacementCapped()
.

Symptoms

When you try to show an ad, the SDK returns the following error code with one of the following messages:
[628] Show called before load success[628] Show is called while loading ad[628] Show called on expired ad
Note
This error applies to interstitial and rewarded ads. Banner ads don't return this error.

Cause

Common reasons for this error include:
  • Your app calls show without a successful load
  • Your app calls show while a load is still in progress
  • Too much time passes between load and show, so the ad expires

Resolution

To resolve this error, do the following:
  1. Call
    isAdReady()
    before you show, and show only after
    onAdLoaded
    fires.
  2. If the ad has expired, load a new ad. Add logic to reload automatically and check ad readiness right before you show.
Note
For rewarded ads, the SDK might load the next ad in the background after a show, so a call to load can return
onAdLoaded
immediately.

Symptoms

When you try to show an ad, the SDK returns the following error code with one of the following messages, depending on the state of the ad:
[630] Ad is already showing[630] Ad is already shown
Note
This error applies to interstitial and rewarded ads. Banner ads don't return this error.

Cause

Common reasons for this error include:
  • Your app calls show while an ad is already on screen
  • A user double-taps the button that shows an ad
  • Your app triggers show again before the ad closes

Resolution

To resolve this error, do the following:
  1. Prevent repeated taps on the button, and disable it while an ad is showing.
  2. Show another ad only after the
    onAdClosed
    callback fires.

Symptoms

When an ad network fails to show its ad and no other loaded ad can take over, the SDK returns the ad network's own error code and message instead of a LevelPlay error code.

Cause

The ad network can't show its ad, and no other loaded ad is available to show instead.

Resolution

To resolve this error, do the following:
  1. Load a new ad.
  2. Look up the error code in the ad network's documentation.
  3. If the error persists with one network, capture logs and contact LevelPlay support.