Skip to content
:docs

Troubleshooting

Find solutions to common problems that occur when integrating placements.

An error code appears

If a Buzzvil SDK method call fails, an error code is passed to the onError callback. Use the table below to identify the cause and resolve the problem.

Error codeCauseResolution
SERVER_ERRORAn error occurred on the Buzzvil server.Send the error code to your Buzzvil representative.
INVALID_PARAMETERSThe request did not meet the requirements.
(For example, an ad was requested before the user logged in.)
Check that the request arguments contain valid values.
CONNECTION_TIMEOUTThe network request timed out.Check the network connection.
EMPTY_RESPONSEThe network response is empty.
(For example, an ad request succeeded but returned zero ads.)
Send the error code to your Buzzvil representative.
WAITING_FOR_RESPONSEThis error can occur if you request another preload while a preload request is already being processed for the Pop BenefitHub placement. Ad allocation still proceeds normally when this error occurs.Check that you have not requested a duplicate preload.
GOOGLE_AGE_POLICYThe user is younger than the minimum age allowed to receive ads under the platform policy.Set the age to 15 or older when calling setProfile.
PRIVACY_POLICY_NOT_ALLOWEDThe user has not agreed to the privacy policy.Check that the user agreed to the privacy policy before requesting ads.
UNKNOWNAn unidentified error occurred.Check for errors in the SDK integration and app build.

Compilation error

  • Cause: This error occurs when integrating a BuzzScreen Android SDK version earlier than 3.11 alongside BuzzAd.

  • Solution: Use BuzzScreen Android SDK 3.11.+.

App build errors

Several issues can cause build failures after integrating Buzzvil SDK. Use the solutions below to troubleshoot.

Duplicate class androidx.lifecycle.ViewModelLazy found in modules

  • Cause: The Java and Kotlin versions of lifecycle-viewmodel conflict.

  • Solution: Declare the following dependency to avoid the version conflict.

Add the dependency in the app-level build.gralde.

build.gradle · Java
// build.gradle(app)
def lifecycle_version = "2.5.1"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"

Previously working OkHttp code fails to compile

  • Cause: Buzzvil SDK supports OkHttp 4.11 or later, but your app uses an older version.

  • Solution: Follow the official OkHttp 4 migration guide to migrate to 4.11 or later.

Could not resolve com.squareup.okhttp3:okhttp:3.12.0

Incompatible Kotlin version

  • Cause: Your app uses Kotlin 1.3 or earlier, which is incompatible. Buzzvil SDK has used Kotlin 1.5 since v3.0.
  • Solution: Set the Kotlin version to 1.4 or later.

The kotlin-android-extensions Gradle plugin is deprecated

Cannot reference the android.view.DisplayCutout getCutout() method

  • Cause: The android.view.DisplayCutout getCutout() method was added in API 29.
  • Solution: Set compileSdkVersion to 31 or later, or add -dontwarn android.view.Display to your ProGuard rules.

Cannot register a repository in the project-level build.gradle

  • Cause: Configuration that belonged in build.gradle in older Android Studio versions has moved to settings.gradle in newer versions.

  • Solution: Use either of the following methods.

    Method 1. Add maven { ... } to settings.gradle.

    settings.gradle · Java
    // settings.gradle
    
      pluginManagement {
          repositories {
              gradlePluginPortal()
              google()
              mavenCentral()
          }
      }
      dependencyResolutionManagement {
          repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
          repositories {
              google()
              mavenCentral()
              maven { url "https://dl.buzzvil.com/public/maven" } // 버즈빌 저장소
          }
      }
    

Method 2. Delete lines 10–17 from the settings.gradle file above, then add the dependencies in the project-level build.gralde.

build.gradle · Java
// build.gradle(proejct)
  allprojects {
      repositories {
          maven { url "https://dl.buzzvil.com/public/maven" } // 버즈빌 저장소
      }
  }

Ads are not allocated correctly

Ad allocation can fail for several reasons even after the app builds successfully. Use the solutions below to troubleshoot.

No ads are allocated

  • Cause: The user profile required for ad allocation was not registered during SDK initialization.
  • Solution: Follow Register a user profile.

No ads are allocated despite a valid user profile

  • Cause: Registering user information through setUserProfile triggers creation of a session key required for ad allocation. Requests made after setUserProfile but before the key is issued may fail. Apply either solution below.

  • Solution 1: Ads can be allocated after the BuzzvilSetUserProfileListener.onSessionReady() registered in setUserProfile is called. See Register a user profile.

  • Solution 2: Register a receiver to check when the session key has been issued, as follows.

  1. Register BroadcastReceiver.

  2. Register SessionReadyBroadcastReceiver through BuzzAdBenefit.registerSessionReadyBroadcastReceiver.

  3. Unregister the receiver once ads are allocated successfully.

Kotlin
// 1. BroadcastReceiver를 등록하세요
val sessionReadyReceiver = object : BroadcastReceiver() {
    override fun onReceive(context: Context?, intent: Intent?) {
        // 세션이 준비 되었습니다.
    }
}

// 2. SessionReadyBroadcastReceiver 를 등록하세요
private fun registerSessionReadyReceiver() {
    BuzzAdBenefit.registerSessionReadyBroadcastReceiver(context, sessionReadyReceiver)
}

// 3. 광고가 정상적으로 할당되면 receiver 등록을 해제하세요 
private fun unregisterSessionReadyReceiver() {
    BuzzAdBenefit.unregisterSessionReadyBroadcastReceiver(sessionReadyReceiver)
}

Video ads are not allocated after setup is complete

  • Cause: Buzzvil SDK uses Covi SDK for video ads. Compatibility issues can prevent this module from working, most commonly using an ExoPlayer version other than 2.11.8.
  • Solution: Use a compatible ExoPlayer version. If that is not possible, exclude Covi SDK to prevent unexpected errors. See Exclude Covi SDK from dependencies.

The Buzzvil SDK in-app browser does not work correctly

  • Cause: The SDK browser may be affected by functions that respond globally to other activities' lifecycles.

  • Solution: Register BuzzAdBrowser.LifecycleObserver in BuzzAdBrowser to run actions according to the browser's own lifecycle. This observer lets the browser run its configured actions at the appropriate points in its independent lifecycle. Observer functions also provide the browser's context, which you can use while its containing activity is alive.

The following example creates a WebView object to handle a case where [WebView.pauseTimers()](https://developer.android.com/reference/android/webkit/WebView#pauseTimers() is called while the app is onPause(), stopping JavaScript in all app WebViews and freezing the SDK browser.
Register BuzzAdBrowser.LifecycleObserver in BuzzAdBrowser to manage the browser lifecycle and resume or pause JavaScript in onResume() and onPause() respectively.

Kotlin
BuzzAdBrowser.getInstance(this).browserLifecycleObserver = object : BuzzAdBrowser.LifecycleObserver {
    override fun onResume(context: Context) {
        super.onResume(context)
        WebView(context).resumeTimers()
    }

    override fun onPause(context: Context) {
        super.onPause(context)
        WebView(context).pauseTimers()
    }
}

Exclude Covi SDK from dependencies

Buzzvil SDK uses Covi SDK for video ads. If you need to exclude it for compatibility or another reason, exclude the buzz-covi module when declaring the buzzvil-sdk dependency in build.gradle, as shown below.

Groovy
implementation ("com.buzzvil:buzzvil-sdk:1.0.+") {
    exclude (group: "com.buzzvil", module: "buzz-covi")
}