Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Chartboost bug on device. — Gideros Forum

Chartboost bug on device.

Hey guys,

I think I found a legit bug. My game displays a chartboost ad in between scenes but for some reason, on my device only, the scene never transitions to the next round. Everything is fine in the Android Simulator and also if I run the apk direct through Android Studio. This only occurs on the device...

My code:

in main.lua:
require "ads"
 
chartboost = Ads.new("chartboost")
chartboost:setKey("myKey", "myOtherKey")
and in the loading scene's init():
	chartboost:addEventListener(Event.AD_RECEIVED, function(e)
		print("Ad received.")
	end)
 
	chartboost:addEventListener(Event.AD_DISPLAYED, function(e)
		print("Ad displayed.")
	end)
 
	chartboost:addEventListener(Event.AD_DISMISSED, function(e)
		print("Ad dismissed.")
		sceneManager:changeScene(scenes[3], 1, SceneManager.fade, easing.linear)
	end)
 
	chartboost:addEventListener(Event.AD_FAILED, function(e)
		print("Ad failed.")
		sceneManager:changeScene(scenes[3], 1, SceneManager.fade, easing.linear)
	end)
 
	chartboost:showAd("interstitial");
So, it looks like something is happening when I get it from the test url on the Android Play store that breaks the event listener somehow? I mean, I guess I could disable the test mode in the chartboost web console and release the game to prod in Google Play but that's a bit of a gamble.

Comments

  • antixantix Member
    @Astirian if you connect your device to your PC with a USB cable you can see debug text inside LogCat in Android Studio. Maybe check to see if 'ad displayed' etc actually appears in LogCat?

    Likes: totebo

    +1 -1 (+1 / -0 )Share on Facebook
  • totebototebo Member
    It may be simpler that that; why not build a player on the device, so you can get the debug prints straight to the Gideros console?
    My Gideros games: www.totebo.com
  • Yeah log cat's logging the ad messages, so the events are processing. I tried to get the wifi player working but had no luck at all.

    I've just released to production so we'll see if it behaves in the wild, yolo.

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    @Astirian you could have made a beta release and we could have tested ;)

    Likes: Astirian

    +1 -1 (+1 / -0 )Share on Facebook
  • AstirianAstirian Member
    edited May 2018
    Might have been something to do with the fact that I had 'no ads' ticked in the Google Play Console, we'll see if it suddenly starts working. Might explain why it only affects the game when it's obtained that way (i.e. through Google Play)? Anyway @antix I'm sure you're curious to see how it turned out, after all this time!

    https://play.google.com/store/apps/details?id=com.astirianraegames.blastdwarf

    It's a bit rough but it'll do for now. If it gets popular I'll tweak some stuff I'm not 100% happy with (rock collisions and frequency of pathing checks), might even add the fire breathing doods. :)

    I ended up using a mix of render target and grid systems. Which was insane (I know that now) but I made it work heh.

    Edit: Also I realised I'm not handling AD_ERROR, only AD_FAILED. So, that's important. ;)
  • OK, so still no joy here @antix @totebo. Here's the LogCat dump. The advert displays fine but on dismissal my transition to the next scene just never happens...

    Spoiler tag for the ugly log.


    05-24 20:24:57.225 17797-17797/com.astirianraegames.blastdwarf W/System: ClassLoader referenced unknown path: /system/app/Chrome/lib/arm
    05-24 20:24:57.232 17797-17797/com.astirianraegames.blastdwarf I/WebViewFactory: Loading com.android.chrome version 55.0.2883.91 (code 288309102)
    05-24 20:24:57.338 17797-17797/com.astirianraegames.blastdwarf I/cr_LibraryLoader: Time to load native libraries: 5 ms (timestamps 3416-3421)
    05-24 20:24:57.338 17797-17797/com.astirianraegames.blastdwarf I/cr_LibraryLoader: Expected native library version number "55.0.2883.91", actual native library version number "55.0.2883.91"
    05-24 20:24:57.365 17797-17797/com.astirianraegames.blastdwarf I/cr_LibraryLoader: Expected native library version number "55.0.2883.91", actual native library version number "55.0.2883.91"
    05-24 20:24:57.371 17797-17797/com.astirianraegames.blastdwarf I/chromium: [INFO:library_loader_hooks.cc(163)] Chromium logging enabled: level = 0, default verbosity = 0
    05-24 20:24:57.412 17797-17797/com.astirianraegames.blastdwarf I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
    05-24 20:24:57.674 17797-17797/com.astirianraegames.blastdwarf I/cr_Ime: ImeThread is enabled.
    05-24 20:24:57.678 17797-20121/com.astirianraegames.blastdwarf W/cr_media: Requires BLUETOOTH permission
    05-24 20:24:57.802 17797-20133/com.astirianraegames.blastdwarf E/libEGL: validate_display:99 error 3008 (EGL_BAD_DISPLAY)
    05-24 20:24:57.849 17797-17797/com.astirianraegames.blastdwarf E/chromium: [ERROR:interface_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver
    05-24 20:24:57.865 17797-17797/com.astirianraegames.blastdwarf W/IInputConnectionWrapper: finishComposingText on inactive InputConnection
    05-24 20:24:57.873 17797-20133/com.astirianraegames.blastdwarf W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc
    05-24 20:24:57.894 17797-20133/com.astirianraegames.blastdwarf W/VideoCapabilities: Unrecognized profile/level 0/3 for video/mpeg2
    05-24 20:24:57.930 17797-20133/com.astirianraegames.blastdwarf I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
    05-24 20:24:57.992 17797-17797/com.astirianraegames.blastdwarf W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 17797
    05-24 20:24:58.199 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.addEventListener ready,function (){var t=Chartboost&&Chartboost.Params?Chartboost.Params.BidderId:null,e=void 0;e=new RewardedView("58e2c082f6cd452ccfed3d75"===t?{CREATIVE_TYPE:"mraid",FORCE_CLOSE:!0}:{CREATIVE_TYPE:"mraid"}),isInIframe()||(initialize_template(),e instanceof RewardedView&&e.init())} -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.223 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.fireStateChangeEvent default -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.223 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.triggerEventListeners [object Arguments] -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.223 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:No listeners found -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.224 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.fireReadyEvent -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.224 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.triggerEventListeners [object Arguments] -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.225 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:Calling event listeners for ready -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.233 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.isCustomClose false -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.322 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:Chartboost.Utils.show -- From line 20 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.325 17797-17797/com.astirianraegames.blastdwarf D/CBWebChromeClient: JavaScript to native show callback triggered.
    05-24 20:24:58.333 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:Chartboost.Utils.tracking -- From line 20 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.333 17797-17797/com.astirianraegames.blastdwarf D/CBWebChromeClient: JavaScript to native tracking callback triggered.
    05-24 20:24:58.334 17797-17797/com.astirianraegames.blastdwarf D/com.chartboost.sdk.impl.bn: JS->Native Track VAST event message: imptrackers
    05-24 20:24:58.338 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:Chartboost.Utils.callNative -- From line 20 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.338 17797-17797/com.astirianraegames.blastdwarf D/CBWebChromeClient: JavaScript to native videoPlaying callback triggered.
    05-24 20:24:58.341 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:Chartboost.Utils.callNative -- From line 20 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.341 17797-17797/com.astirianraegames.blastdwarf D/CBWebChromeClient: JavaScript to native totalVideoDuration callback triggered.
    05-24 20:24:58.344 17797-17797/com.astirianraegames.blastdwarf D/CBWebChromeClient: JavaScript to native currentVideoDuration callback triggered.
    05-24 20:24:58.345 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:Chartboost.Utils.callNative -- From line 20 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.348 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.isCustomClose false -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.349 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.fireViewableChangeEvent true -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.350 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.triggerEventListeners [object Arguments] -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.350 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:No listeners found -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:24:58.553 17797-17797/com.astirianraegames.blastdwarf E/chromium: [ERROR:interface_registry.cc(104)] Failed to locate a binder for interface: autofill::mojom::PasswordManagerDriver
    05-24 20:24:58.704 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.addEventListener ready,function (){var t=Chartboost&&Chartboost.Params?Chartboost.Params.BidderId:null,e=void 0;e=new RewardedView("58e2c082f6cd452ccfed3d75"===t?{CREATIVE_TYPE:"mraid",FORCE_CLOSE:!0}:{CREATIVE_TYPE:"mraid"}),isInIframe()||(initialize_template(),e instanceof RewardedView&&e.init())} -- From line 22 of about:srcdoc
    05-24 20:25:00.224 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.getState -- From line 22 of about:srcdoc
    05-24 20:25:00.224 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.addEventListener ready,function eventMRAIDReady(){mraid.removeEventListener("ready",eventMRAIDReady),prepareAd()} -- From line 22 of about:srcdoc
    05-24 20:25:00.312 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.fireStateChangeEvent default -- From line 22 of about:srcdoc
    05-24 20:25:00.314 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.triggerEventListeners [object Arguments] -- From line 22 of about:srcdoc
    05-24 20:25:00.314 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:No listeners found -- From line 22 of about:srcdoc
    05-24 20:25:00.314 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.fireReadyEvent -- From line 22 of about:srcdoc
    05-24 20:25:00.315 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.triggerEventListeners [object Arguments] -- From line 22 of about:srcdoc
    05-24 20:25:00.316 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:Calling event listeners for ready -- From line 22 of about:srcdoc
    05-24 20:25:00.321 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.removeEventListener ready,function eventMRAIDReady(){mraid.removeEventListener("ready",eventMRAIDReady),prepareAd()} -- From line 22 of about:srcdoc
    05-24 20:25:00.324 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.useCustomClose true -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:25:00.325 17797-17797/com.astirianraegames.blastdwarf E/CBWebChromeClient: JavaScript to native useCustomClose callback not recognized.
    05-24 20:25:00.327 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.setOrientationProperties: -- From line 22 of about:srcdoc
    05-24 20:25:00.327 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:[object Object] -- From line 22 of about:srcdoc
    05-24 20:25:00.329 17797-17797/com.astirianraegames.blastdwarf E/CBWebChromeClient: JavaScript to native setOrientationProperties callback not recognized.
    05-24 20:25:00.331 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.addEventListener stateChange,function eventStateChange(a){MANAGE.debug} -- From line 22 of about:srcdoc
    05-24 20:25:00.331 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.addEventListener error,function eventError(a,b){MANAGE.debug} -- From line 22 of about:srcdoc
    05-24 20:25:00.332 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.isViewable: false -- From line 22 of about:srcdoc
    05-24 20:25:00.333 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.addEventListener viewableChange,function isInterstitialDisplayed(a){a&&(mraid.removeEventListener("viewableChange",isInterstitialDisplayed),showAd())} -- From line 22 of about:srcdoc
    05-24 20:25:00.333 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.fireViewableChangeEvent true -- From line 22 of about:srcdoc
    05-24 20:25:00.333 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.triggerEventListeners [object Arguments] -- From line 22 of about:srcdoc
    05-24 20:25:00.334 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:Calling event listeners for viewableChange -- From line 22 of about:srcdoc
    05-24 20:25:00.334 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.removeEventListener viewableChange,function isInterstitialDisplayed(a){a&&(mraid.removeEventListener("viewableChange",isInterstitialDisplayed),showAd())} -- From line 22 of about:srcdoc
    05-24 20:25:01.251 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.isCustomClose true -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:25:01.351 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.isCustomClose true -- From line 22 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/
    05-24 20:25:06.484 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.close -- From line 22 of about:srcdoc
    05-24 20:25:06.484 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.fireStateChangeEvent hidden -- From line 22 of about:srcdoc
    05-24 20:25:06.485 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.triggerEventListeners [object Arguments] -- From line 22 of about:srcdoc
    05-24 20:25:06.485 17797-17797/com.astirianraegames.blastdwarf D/bm: Chartboost Webview:Calling event listeners for stateChange -- From line 22 of about:srcdoc
    05-24 20:25:06.488 17797-17797/com.astirianraegames.blastdwarf D/CBWebChromeClient: JavaScript to native close callback triggered.

  • com.astirianraegames.blastdwarf D/bm: Chartboost Webview:mraid.addEventListener error,function eventError(a,b){MANAGE.debug} -- From line 22 of about:srcdoc

    and

    com.astirianraegames.blastdwarf D/bm: Chartboost Webview:No listeners found -- From line 34 of file:///data/user/0/com.astirianraegames.blastdwarf/cache/.chartboost/

    look a bit fishy.
  • antixantix Member
    @Astirian interesting. I can't see whats happening in the LogCat dump.. I really hate those things with a passion :D I don't see any of your debug texts being printed in there at all so I wonder if it's actually functioning at all.

    I downloaded and on my Pixel C I got to level 5 before dying (after a few attempts) and no ads showed at all but the game never failed to advance to the next level.

    What scaling mode are you using?
    - On my Pixel C it seems to use FIT_WIDTH and the top and bottom if the screen are chopped off.. I don't see half of the logo at the top and do not see the credit banner at the bottom. Luckily there was enough of the gamepad showing ingame that I could still move down.
    - On my Nexus 4 it looks to be FIT_HEIGHT because I can see the logo and bottom banner but a little is clipped off the sides of the display.

    I found it difficult to discern where I was facing and shooting. I think the player should face the way they are moving and I think there should be some visual projectile when you fire so you know where you are firing. From the looks of it when you shoot it picks a target within a certain range and damages them. If they are in range the next time you shoot.. they get shot again, otherwise it seems to select another target in range.

    I found it kind of difficult to use the rocks to squash the bad guys. The rocks seemed to be just something to avoid because I got stuck on them mostly when trying to use them and died heheh. After a bit more practice I figured out how to use them correctly ;)

    Anyway, you finished your game which is totally awesome! I like the ghostly barrels and being able to dig freely about the map, well done :)





    Likes: Astirian

    +1 -1 (+1 / -0 )Share on Facebook
  • Thanks @antix!

    Yeah, I overwrote the print function to squeeze every last bit of performance out of it. I usually comment that out when troubleshooting.

    I'll have to check the screen settings in the project to see what I've done there.

    Funnily enough I have most of the directional shooting code written but I had put it on the backburner and then got used to the current scheme haha! But I hadn't considered a visual projectile. Good feedback, thank you. :)

    I'm very proud of my ghosty() function indeed. :smiley:

    Interesting you made it to round 5, the ads are supposed to trigger on multiples of 3, although that could be a good thing. It's a mystery to me why my device doesn't respect the scene transition in AD_DISMISSED.

    Likes: antix

    +1 -1 (+1 / -0 )Share on Facebook
  • antixantix Member
    Leaving the print statements inside the ad code isn't a biggy, it won't save much performance since there is no need for performance when those events happen :)
  • piepie Member
    @Astirian are you aware that it's not available in italy?
  • Oops, all fixed now @pie :)

    Likes: pie

    +1 -1 (+1 / -0 )Share on Facebook
  • piepie Member
    @Astirian still not available, but maybe we just need to wait some time that the "thing" propagates through gplay store :)

    Likes: Astirian

    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.