mobfox / MobFox-Android-SDK

26 stars 21 forks source link

No ad displayed if CustomEvent adapter has no fill #67

Closed andre-arsenault closed 6 years ago

andre-arsenault commented 6 years ago

Issue Description

Banner ads stop being served if the highest-priority network implemented via the Custom Event framework comes back with an error, including No Fill.

Here is an example log file. In it, you can see that a banner is requested every 30 seconds, but when the Amazon request comes back with error no fill, no further attempt at serving a banner ad is made. This is not the expected behaviour.

11-20 12:45:48.211 27809-27809/com.snowleopardgames.lifetotal D/MobFox: dbg: ### MobFoxPlugin >> showBanner
11-20 12:45:48.211 27809-27809/com.snowleopardgames.lifetotal D/MobFoxBanner: request params: {"s":"a03392acae5a7979ecd31244db5cc7b0","o_andadvid":"ee1f7301-f1ba-4625-af74-873692ae88eb","type":"waterfall","adFormat":"banner","autoplay":"true","skip":"","debug":"","rt":"android_app","adspace_width":320,"adspace_height":50,"adspace_strict":0,"sub_bundle_id":"com.snowleopardgames.lifetotal","auto_pilot":true,"v":"Core_3.2.8e","secure":false,"start_muted":false,"dev_js":1,"banner_pos":1,"dev_dnt":1}
11-20 12:45:48.931 27809-27809/com.snowleopardgames.lifetotal D/MobFoxWebView: data >>> :{"customEvents":[{"class":"Amazon","parameter":"002da47d74654bb8982653583e0a947f","pixel":"http:\/\/nvirginia-callbacks.mobfox.com\/customevent.pixel.php?h=a5ac609cd5ec2fd78619200afc9e6462&custom_event_id=stack393247","id":"stack393247"},{"class":"AdColony","parameter":"","pixel":"http:\/\/nvirginia-callbacks.mobfox.com\/customevent.pixel.php?h=a5ac609cd5ec2fd78619200afc9e6462&custom_event_id=stack393209","id":"stack393209"}]}
11-20 12:45:48.931 27809-27809/com.snowleopardgames.lifetotal D/MobFoxBanner: ad response
11-20 12:45:48.931 27809-27809/com.snowleopardgames.lifetotal D/MobFoxTime: ad response time: 717
11-20 12:45:48.931 27809-27809/com.snowleopardgames.lifetotal D/MobFoxBanner: iterator class not found exception
11-20 12:45:48.931 27809-27809/com.snowleopardgames.lifetotal D/MobFox: MobFox Amazon Custom >> constructor
11-20 12:45:48.931 27809-27809/com.snowleopardgames.lifetotal D/MobFox: MobFox Amazon Custom >> loadAd
11-20 12:45:49.481 27809-27809/com.snowleopardgames.lifetotal E/MobFox: MobFox Amazon Custom >> error
11-20 12:45:49.481 27809-27809/com.snowleopardgames.lifetotal D/MobFoxTime: MobFoxBanner >> banner load start time: 1266
11-20 12:45:49.481 27809-27809/com.snowleopardgames.lifetotal E/MobFox: dbg: ### MobFoxPlugin >> onBannerError: errorCode: NO_FILL errorMsg: Server Message: no results. Try again in 10 seconds
11-20 12:46:18.211 27809-27809/com.snowleopardgames.lifetotal D/MobFox: dbg: ### MobFoxPlugin >> showBanner
11-20 12:46:18.211 27809-27809/com.snowleopardgames.lifetotal D/MobFoxBanner: request params: {"s":"a03392acae5a7979ecd31244db5cc7b0","o_andadvid":"ee1f7301-f1ba-4625-af74-873692ae88eb","type":"waterfall","adFormat":"banner","autoplay":"true","skip":"","debug":"","rt":"android_app","adspace_width":320,"adspace_height":50,"adspace_strict":0,"sub_bundle_id":"com.snowleopardgames.lifetotal","auto_pilot":true,"v":"Core_3.2.8e","secure":false,"start_muted":false,"dev_js":1,"banner_pos":1,"dev_dnt":1}
11-20 12:46:18.921 27809-27809/com.snowleopardgames.lifetotal D/MobFoxWebView: data >>> :{"customEvents":[{"class":"Amazon","parameter":"002da47d74654bb8982653583e0a947f","pixel":"http:\/\/nvirginia-callbacks.mobfox.com\/customevent.pixel.php?h=c92afd6bbd31ac741423dedc50a4e6e4&custom_event_id=stack393247","id":"stack393247"},{"class":"AdColony","parameter":"","pixel":"http:\/\/nvirginia-callbacks.mobfox.com\/customevent.pixel.php?h=c92afd6bbd31ac741423dedc50a4e6e4&custom_event_id=stack393209","id":"stack393209"}]}
11-20 12:46:18.921 27809-27809/com.snowleopardgames.lifetotal D/MobFoxBanner: ad response
11-20 12:46:18.921 27809-27809/com.snowleopardgames.lifetotal D/MobFoxTime: ad response time: 714
11-20 12:46:18.921 27809-27809/com.snowleopardgames.lifetotal D/MobFoxBanner: iterator class not found exception
11-20 12:46:18.921 27809-27809/com.snowleopardgames.lifetotal D/MobFox: MobFox Amazon Custom >> constructor
11-20 12:46:18.921 27809-27809/com.snowleopardgames.lifetotal D/MobFox: MobFox Amazon Custom >> loadAd
11-20 12:46:19.441 27809-27809/com.snowleopardgames.lifetotal E/MobFox: MobFox Amazon Custom >> error
11-20 12:46:19.451 27809-27809/com.snowleopardgames.lifetotal D/MobFoxTime: MobFoxBanner >> banner load start time: 1240
11-20 12:46:19.451 27809-27809/com.snowleopardgames.lifetotal E/MobFox: dbg: ### MobFoxPlugin >> onBannerError: errorCode: NO_FILL errorMsg: Server Message: no results. Try again in 10 seconds
11-20 12:46:48.211 27809-27809/com.snowleopardgames.lifetotal D/MobFox: dbg: ### MobFoxPlugin >> showBanner
11-20 12:46:48.211 27809-27809/com.snowleopardgames.lifetotal D/MobFoxBanner: request params: {"s":"a03392acae5a7979ecd31244db5cc7b0","o_andadvid":"ee1f7301-f1ba-4625-af74-873692ae88eb","type":"waterfall","adFormat":"banner","autoplay":"true","skip":"","debug":"","rt":"android_app","adspace_width":320,"adspace_height":50,"adspace_strict":0,"sub_bundle_id":"com.snowleopardgames.lifetotal","auto_pilot":true,"v":"Core_3.2.8e","secure":false,"start_muted":false,"dev_js":1,"banner_pos":1,"dev_dnt":1}
11-20 12:46:48.751 27809-27809/com.snowleopardgames.lifetotal D/MobFoxWebView: data >>> :{"customEvents":[{"class":"Amazon","parameter":"002da47d74654bb8982653583e0a947f","pixel":"http:\/\/nvirginia-callbacks.mobfox.com\/customevent.pixel.php?h=321cefb0944ba8e9aae1f097f4cc8d52&custom_event_id=stack393247","id":"stack393247"},{"class":"AdColony","parameter":"","pixel":"http:\/\/nvirginia-callbacks.mobfox.com\/customevent.pixel.php?h=321cefb0944ba8e9aae1f097f4cc8d52&custom_event_id=stack393209","id":"stack393209"}]}
11-20 12:46:48.751 27809-27809/com.snowleopardgames.lifetotal D/MobFoxBanner: ad response
11-20 12:46:48.751 27809-27809/com.snowleopardgames.lifetotal D/MobFoxTime: ad response time: 549
11-20 12:46:48.751 27809-27809/com.snowleopardgames.lifetotal D/MobFoxBanner: iterator class not found exception
11-20 12:46:48.751 27809-27809/com.snowleopardgames.lifetotal D/MobFox: MobFox Amazon Custom >> constructor
11-20 12:46:48.761 27809-27809/com.snowleopardgames.lifetotal D/MobFox: MobFox Amazon Custom >> loadAd
11-20 12:46:49.441 27809-27809/com.snowleopardgames.lifetotal E/MobFox: MobFox Amazon Custom >> error
11-20 12:46:49.451 27809-27809/com.snowleopardgames.lifetotal D/MobFoxTime: MobFoxBanner >> banner load start time: 1242
11-20 12:46:49.451 27809-27809/com.snowleopardgames.lifetotal E/MobFox: dbg: ### MobFoxPlugin >> onBannerError: errorCode: NO_FILL errorMsg: Server Message: no results. Try again in 10 seconds

Expected Behaviour

When a custom event calls the CustomEventBannerListener's onBannerError() method, the SDK should continue down the waterfall and request an ad from the next network on the list.

Environment

I am working within a Cordova app, so the calling code is based on your example Cordova plugin. However I have put a lot of effort into improving it, so it may not be the same as your test environment. You can see my version here.

andre-arsenault commented 6 years ago

Any movement or advice on this issue? It's hurting our revenue significantly.

shahafss commented 6 years ago

Hi Andre, Unfortunately we didn't get a chance to address these issues on latest release as we were focused on MOAT development for the past month. We will include a fix for that on our next release which should occur during next week.

Sorry for the inconvenience.

Best, -Shahaf

nabriski commented 6 years ago

Fixed in 3.6.0