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 code | Cause | Resolution |
|---|---|---|
SERVER_ERROR | An error occurred on the Buzzvil server. | Send the error code to your Buzzvil representative. |
INVALID_PARAMETERS | The 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_TIMEOUT | The network request timed out. | Check the network connection. |
EMPTY_RESPONSE | The network response is empty. (For example, an ad request succeeded but returned zero ads.) | Send the error code to your Buzzvil representative. |
WAITING_FOR_RESPONSE | This 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_POLICY | The 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_ALLOWED | The user has not agreed to the privacy policy. | Check that the user agreed to the privacy policy before requesting ads. |
UNKNOWN | An 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(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
-
Cause: BuzzBanner's Vungle ad network integration method has changed.
-
Solution: Apply the changes described in Vungle integration for BuzzBanner.
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
-
Cause: Your Gradle configuration uses the
kotlin-android-extensionsplugin. -
Solution: Follow Google's https://developer.android.com/topic/libraries/view-binding/migration documentation to migrate to Jetpack view binding.
Cannot reference the android.view.DisplayCutout getCutout() method
- Cause: The
android.view.DisplayCutout getCutout()method was added in API 29. - Solution: Set
compileSdkVersionto 31 or later, or add-dontwarn android.view.Displayto your ProGuard rules.
Cannot register a repository in the project-level build.gradle
-
Cause: Configuration that belonged in
build.gradlein older Android Studio versions has moved tosettings.gradlein newer versions. -
Solution: Use either of the following methods.
Method 1. Add
maven { ... }tosettings.gradle.// 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(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
setUserProfiletriggers creation of a session key required for ad allocation. Requests made aftersetUserProfilebut before the key is issued may fail. Apply either solution below. -
Solution 1: Ads can be allocated after the
BuzzvilSetUserProfileListener.onSessionReady()registered insetUserProfileis called. See Register a user profile. -
Solution 2: Register a receiver to check when the session key has been issued, as follows.
-
Register
BroadcastReceiver. -
Register
SessionReadyBroadcastReceiverthroughBuzzAdBenefit.registerSessionReadyBroadcastReceiver. -
Unregister the receiver once ads are allocated successfully.
// 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.LifecycleObserverinBuzzAdBrowserto 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.
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.
implementation ("com.buzzvil:buzzvil-sdk:1.0.+") {
exclude (group: "com.buzzvil", module: "buzz-covi")
}