SDKBOX AdColony messes with IAP and others

SDKBOX AdColony messes with IAP and others
0.0 0

#1

Hi, i’m using chartboost, admob and adcolony. Adcolony messes with iap.

After some time, iap will stop working, first time shows this message in the log:
E/IAP: Purchase flow state exception. Please retry in a few seconds.

Then if you try to purchase again you get this:
E/IAP: Processing a previous payment.

Callback onFailure is never called.

Testing with SDKBOX 3.13 and Cocos 3.15. Android device. Only using rewarded ads. Don’t really know how to reproduce it, watch a few ads (using debug ads currently) from the three providers, cancel reward for some. Wait a few minutes or maybe half an hour and SOME TIMES iap stops working. Other times you can play for hours with no problem.

If i completely remove adcolony, game works fine.

Also once in a while, chartboost ad fails to display, screen goes black for a second and it exits back to the game again. This happens much more often when adcolony is also active,

Thanks.


#2

trying to reproduce.


#3

Been with this all day. Finally is not AdColony (sorry) it is AdMob. It only happens in low specs devices, mainly i’m having the issue with a nexus 7 (1st edition). AdMob seems to take too much resources while caching ad, app goes to less than 1 frame per second for 15 or 20 secs (not always, it happens kind of randomly). Also after video is played (it does not matter if you finish it to get the reward), sometimes app hangs after some seconds. This always happens with admob. adcolony errors where related to this. chartboost also runs fine.

Atfer view Admob ad crash log:

07-11 19:11:02.965 4403-4403/com.nurium.xxx I/Ads: Ad closing.
07-11 19:11:02.966 4403-4403/com.nurium.xxx I/Ads: Ad closing.
07-11 19:11:02.971 4403-4403/com.nurium.xxx W/Ads: The webview is destroyed. Ignoring action.
07-11 19:11:02.971 4403-4403/com.nurium.xxx I/Choreographer: Skipped 1402 frames! The application may be doing too much work on its main thread.
07-11 19:11:02.972 4403-4956/com.nurium.xxx W/nvwsi: dequeueBuffer failed, error -19
07-11 19:11:02.973 4403-4953/com.nurium.xxx D/AdMob: ad mpaths_rewarded_admob is available ?false
07-11 19:11:02.978 4403-4956/com.nurium.xxx E/libEGL: eglMakeCurrent:777 error 300b (EGL_BAD_NATIVE_WINDOW)
07-11 19:11:02.978 4403-4956/com.nurium.xxx A/OpenGLRenderer: Failed to make current on surface 0x6dd66b20, error=EGL_BAD_NATIVE_WINDOW

I’m also using fmod sound library. With Admob enabled i’m getting lots of messages like the following one. You get like 20 in a row, this also stops the app to a crawl, without AdMob, fmod runs fine. If I remove fmod, app does not stop so often but still get the chashes after viewing an AdMob ad.

07-11 19:10:40.275 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting

More log, here you can see lots of these errors after AdMob starts caching an ad. Usually but not always the underruns are after AdMob started some process. After all this errors app keeps running. It only hangs after viewing an ad.

07-11 19:05:49.858 4403-4953/com.nurium.xxx D/cocos2d-x debug info: find in flash memory dirPath(/data/data/com.nurium.xxx/files/user/)
07-11 19:05:51.098 4403-4403/com.nurium.xxx W/Ads: JS: ‘Attr.nodeValue’ is deprecated. Please use ‘value’ instead. (:0)
07-11 19:05:51.098 4403-4403/com.nurium.xxx I/chromium: [INFO:CONSOLE(0)] “‘Attr.nodeValue’ is deprecated. Please use ‘value’ instead.”, source: (0)
07-11 19:05:51.809 4403-4403/com.nurium.xxx I/ExoPlayerImpl: Init 1.5.6
07-11 19:05:54.363 4403-4403/com.nurium.xxx I/Ads: Ad finished loading.
07-11 19:05:54.377 4403-4403/com.nurium.xxx I/Ads: Ad finished loading.
07-11 19:05:54.377 4403-4403/com.nurium.xxx D/AdMob: Interstitial onAdLoaded
07-11 19:05:55.133 4403-5665/com.nurium.xxx W/VideoCapabilities: Unsupported mime video/mpeg2
07-11 19:05:55.138 4403-5665/com.nurium.xxx W/AudioCapabilities: Unsupported mime audio/mpeg-L2
07-11 19:05:55.182 4403-4418/com.nurium.xxx I/art: Background partial concurrent mark sweep GC freed 27269(1564KB) AllocSpace objects, 11(313KB) LOS objects, 39% free, 13MB/22MB, paused 3.921ms total 132.610ms
07-11 19:05:55.211 4403-5665/com.nurium.xxx I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
07-11 19:05:55.239 4403-5754/com.nurium.xxx I/OMXClient: Using client-side OMX mux.
07-11 19:05:55.938 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:05:57.854 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:05:57.855 4403-5730/com.nurium.xxx I/Choreographer: Skipped 114 frames! The application may be doing too much work on its main thread.
07-11 19:05:58.564 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:05:59.314 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:05:59.329 4403-5730/com.nurium.xxx I/Choreographer: Skipped 43 frames! The application may be doing too much work on its main thread.
07-11 19:06:00.031 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:00.741 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:00.753 4403-5730/com.nurium.xxx I/Choreographer: Skipped 42 frames! The application may be doing too much work on its main thread.
07-11 19:06:01.475 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:02.887 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:02.896 4403-5730/com.nurium.xxx I/Choreographer: Skipped 83 frames! The application may be doing too much work on its main thread.
07-11 19:06:03.612 4403-4413/com.nurium.xxx W/art: Suspending all threads took: 709.950ms
07-11 19:06:03.619 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:04.388 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:05.161 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:05.167 4403-5730/com.nurium.xxx I/Choreographer: Skipped 91 frames! The application may be doing too much work on its main thread.
07-11 19:06:05.927 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:07.015 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:07.017 4403-5730/com.nurium.xxx I/Choreographer: Skipped 64 frames! The application may be doing too much work on its main thread.
07-11 19:06:08.147 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:08.151 4403-4413/com.nurium.xxx W/art: Suspending all threads took: 5.434ms
07-11 19:06:08.877 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:08.890 4403-5730/com.nurium.xxx I/Choreographer: Skipped 43 frames! The application may be doing too much work on its main thread.
07-11 19:06:09.649 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:10.362 4403-4413/com.nurium.xxx W/art: Suspending all threads took: 714.076ms
07-11 19:06:10.366 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:11.125 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:11.131 4403-4413/com.nurium.xxx W/art: Suspending all threads took: 6.793ms
07-11 19:06:12.128 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:13.667 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:13.673 4403-4413/com.nurium.xxx W/art: Suspending all threads took: 6.956ms
07-11 19:06:13.685 4403-4403/com.nurium.xxx W/Ads: Failed to load ad: 0
07-11 19:06:14.409 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:15.147 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:15.868 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:19.038 4403-4413/com.nurium.xxx W/art: Suspending all threads took: 3.108s
07-11 19:06:19.043 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:19.815 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:20.547 4403-4413/com.nurium.xxx W/art: Suspending all threads took: 727.912ms
07-11 19:06:20.552 4403-5232/com.nurium.xxx W/AudioTrack: releaseBuffer() track 0x6c6563e0 disabled due to previous underrun, restarting
07-11 19:06:20.664 4403-6384/com.nurium.xxx I/SoftAAC2: Reconfiguring decoder: 0->44100 Hz, 0->2 channels
07-11 19:06:20.678 4403-4403/com.nurium.xxx W/Ads: Failed to load ad: 3


#4

En, you can config a ad without video. AdMob will not take too much resources.


#5

Note SDKBOX internally will auto cache next ad for you, so if you also caching the ad, it might be possible to cause some performance issue.


#6

I’m using rewarded ads, so they’re mostly video. Using only AdColony and ChartBoost works well, no noticeable frame drops at all, i’m fine with just two ad providers and there are even more to try. AdMod definitely breaks my game.

I’m not using sdkbox ads, just the ad units. Now remember i removed sdkbox ads because admob cache failed and stopped serving ads.

I call this function at game start to check if available ads and start caching them if needed. Show the function with the three providers, currently admob is disabled.

  bool co_control::sdkbox_checkAvalableAd_log_cache()
  {
    // If not connected return
    cocos2d::JniMethodInfo methodInfo;
    if(cocos2d::JniHelper::getStaticMethodInfo(methodInfo, "org/cocos2dx/cpp/AppActivity", "ngs__isConnected", "()Z")) {
      bool isConnected = methodInfo.env->CallStaticBooleanMethod(methodInfo.classID, methodInfo.methodID);
      methodInfo.env->DeleteLocalRef(methodInfo.classID);

      if(!isConnected) { return false; }
    }
    else { ut_assert(0); }

    const bool adMobAvailable = sdkbox::PluginAdMob::isAvailable(AD_NAME_ADMOB);
    const bool chartBoostAvailable = sdkbox::PluginChartboost::isAvailable(AD_NAME_CHARTBOOST);
    const sdkbox::AdColonyAdStatus adColonyState = sdkbox::ADCOLONY_ZONE_STATUS_OFF;

    if(!adMobAvailable)     { sdkbox::PluginAdMob::cache(AD_NAME_ADMOB); }
    if(!chartBoostAvailable) { sdkbox::PluginChartboost::cache(AD_NAME_CHARTBOOST); }

    G_boxFlurry->update_adRequest(adMobAvailable, chartBoostAvailable, adColonyState == sdkbox::ADCOLONY_ZONE_STATUS_ACTIVE);

    return (adMobAvailable || chartBoostAvailable || adColonyState == sdkbox::ADCOLONY_ZONE_STATUS_ACTIVE);
  }