Chartboost plugin released

Sure I’ll try and get a log now (the device has wiped the log since the last time it happened). My first thought was that the SDK has an issue, rather than your plugin. Sometimes it might happen on the first ad request I make in a session, other times I can request 20 ads without a problem.

On a similar note, the android Chartboost ads have always been much slower for us. The time between the ad being “dismissed” and the game actually resuming is around 3 seconds at best on Android, it seems to be much faster on iOS. So it’s probably fair to say that the Android SDK is not as stable.

I’ll post again once I get the error.

Edit: Just called show() 50 times in a row with no error. My colleague has just sent me a message saying he had the same error about 5 mins ago but wiped his log. I think I’ll just have to wait until it happens and then grab the log as quickly as I can.

For Android, I think it’s also due to different vendors (Samsung, Google, LG etc ) providing different software components on Android on which the advertising SDK’s rely upon. Even if they provide the same software it may be different versions of the software where one works and one doesn’t.

With the Video Interstitial issue I noticed that the media player trying to be used on my Samsung device was different than that on my Nexus which leads me to conclude that the Samsung device’s media player is incompatible with the way Chartboost is trying to display videos, thus causing a hang.

Do you mind if I send your log to Chartboost? I can open a new ticket since it’s very similar to the one I already have with them regarding the Video Interstitials.

Once I have a log that has the error in it, sure  :slight_smile:

Did you observe issues regarding the position of the close button on Android?

When showing an interstitial on my Galaxy S3 (Android 4.3) the close button is not placed in the upper right corner of the interstitial but within the inner region of the interstitial.

Expected: ------(x) |       | |       | |       | |       | ------- Observed: ------- |       | |   (x) | |       | |       | -------

@vomasoft

Yes I noticed that. It seems to be related to certain ads. Some ads have the close button in the correct place, others not.

The button positioning is done internally within their SDK.

@ingemar

I’ve emailed you a log that a colleague had sent to me, hopefully there will be something useful in there.

Thanks. I got the email and I’ll have a look to see if I can spot anything myself.

I’ll also forward this to Chartboost as ultimately it sounds like an issue with their SDK on Android.

Can you tell me the device your colleague is using?

The Chartboost guys ask for such info to help them reproduce and identify the issue.

@Alan

Chartboost usually ask for Brand, model and Android version of the device…

HTC One M8

Android 4.4.2

Thanks!

I’ve read though the logs and I see an entry which is interesting. Something about a stale cache. I’m not certain that it’s related to the Chartboost SDK or not, however it does raise a question though.

I’ll double check my plugin code as well to see how the call to show() is being handled in case of an error.

@Alan 

I’ve double-checked my plugin and everything is in order, so I’ll be submitting this to Chartboost to see what they say about the issue.

Judging from your previous comments about this, would it be correct if I say it happens 4-5% of the time?

Hard to say, but that’s probably about right. Sometimes I can open the game and get it on the first ad twice in a row, other times I can get 30+ ads in a row with no problems.

OK. I’ll mention that as well. 

What about the device you’re using? I can add that too so they have several devices to test with.

Sure, mine was a Samsung Galaxy S4, Android 4.4.2.

Also been testing on a Nexus 7 (1st gen), Android 4.4.4, but if I’m honest I can’t remember if I’ve had the error on there or not.

It’s great we have the exact same device. It makes it easier to compare notes.

I have the Nexus 7 (1st gen) running 4.4.4 too, and I haven’t seen any errors on that device (even for video interstitials).

I’ll be forwarding the info you gave me to Chartboost today, and I’ll keep you posted on their replies.

@ingemar: I’m getting a strange app crash (app hangs) which I can reproduce on my Galaxy S3, but not on my Galaxy S.

It occurs on the Galaxy S3 when I cache Interstitials / MoreApps in applicationResume, but only if I suspend the app by turning off the screen. If I suspend it by pressing the Home button, the app seems to resume fine.

function onSystemEvent( event ) ... if event.type == "applicationResume" then -- resume game debug\_print("CB: Before startSession") chartboost.startSession( chartBoostAppId, chartboostAppSignature) debug\_print("CB: Before hasCachedInterstitial") local hasCachedInterstitial = chartboost.hasCachedInterstitial() debug\_print("CB: Before hasCachedMoreApps") local hasCachedMoreApps = chartboost.hasCachedMoreApps() if not hasCachedInterstitial then debug\_print("CB: Before cache( interstitial ) ") chartboost.cache( "interstitial" ) end if not hasCachedMoreApps then debug\_print("CB: Before cache( moreApps ) ") chartboost.cache( "moreApps" ) end resumeTime = os.time() end end

When the app resumes after the screen has been turned off then my last debug_print in logcat is “CB: Before hasCachedInterstitial”.

I can give you the logcat output if you would like to have a look at it.

Edit: If I execute the content of the above if-block per timer.performWithDelay(100, …) then the app won’t hang.

Is the following a bug of the chartboost SDK (at least for Android; didn’t have a chance to test it with iOS):

Repro steps:

  1. Suspend your app when an interstitial is displayed by pressing the HOME button.

  2. Resume your app.

Expected:

The app resumes showing the interstitial from step 1.

Observed:

The app resumes without showing the interstitial from step 1. This wouldn’t be a big issue if showing new interstitials would work. However, now we are unable to show new interstitials because chartboost thinks the interstitial from step 1 was still visible (event info claims IMPRESSION_ALREADY_VISIBLE). What can we do in this case to close the (not visible) interstitial from step 1 / to show new interstitials? (it’s also not possible to show MoreApps in this scenario)

type -\> interstitial name -\> chartboost phase -\> failed location -\> Home Screen info -\> IMPRESSION\_ALREADY\_VISIBLE response -\> failed

@vomasoft

I’ll categorize your issues as Issue 1: (caching issue) and Issue 2 : (resume with active ad issue).

From your descriptions I’d say both of these issues are related to Chartboost’s SDK, and not the plugin itself.

Issue 1:

I haven’t seen this issue myself, however I only have a startSession() call in my applicationResume event block without any delays implemented. I tested again on my Android devices and it works every time without the issues you mention.

It looks like some Android devices are slower to resume and need more time to initialize before calling certain functions. If putting a timer.performWithDelay solved your issue, I would say that’s your solution. Maybe even upping the value to 200 or 300ms to be on the safe side to accommodate for devices that are even slower to resume.

Issue 2:

I can’t reproduce this problem. When I resume, the ads always resume with the app so I can close them.

Are you saying that the ad is completely gone when resuming (no frame, no close button at all)?

@Alan, @vomasoft  (@everybody)

I’d appreciate if you could create a separate thread in this forum section (Chartboost 3rd Party) with your issues instead of as replies to this post. It can quickly become messy to track them. It’s better to keep the issues separated so others can easily find them and benefit from any solutions provided.

Done:  http://forums.coronalabs.com/topic/52070-chartboost-interstitials-freezing-on-android/