Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnAdClosed is being delayed after a Video Interstitial is closed #2029

Closed
Mecze opened this issue Apr 19, 2022 · 7 comments
Closed

OnAdClosed is being delayed after a Video Interstitial is closed #2029

Mecze opened this issue Apr 19, 2022 · 7 comments

Comments

@Mecze
Copy link

Mecze commented Apr 19, 2022

[REQUIRED] Step 1: Describe your environment

  • Unity version: 2020.3.15f2
  • Google Mobile Ads Unity plugin version: 6.1.2
  • Platform: Android
  • Platform OS version: any
  • Any specific devices issue occurs on: it happened in several of our test devices, like Xiaomi Redmi Note 8 Pro(Redmi)
  • Mediation ad networks used, and their versions: we do have mediations on our project, but I have reproduce it with no mediations.

[REQUIRED] Step 2: Describe the problem

Steps to reproduce:

  • Upon closing an Interstitial, there's an awkward delay (0.5≈2 seconds) since the control is back to Unity and the event OnAdClosed is fired.
  • It happens with Video Interstitials. I cannot reproduce it with Static Interstitials.
  • I'm talking by feeling here, since i have not put a time counter on it, but it looks that the delay is longer the longer the video inside the ad is.
  • The greater offender here is an ad that displays a full video from youtube (3+ minutes) of a song (I attach an image below) that provokes delays of 1+ seconds.
  • By chance, I got the same video as a Rewarded Video on the Rewarded AdUnitID, and this "delay" did not occur on the Rewarded Video, the OnAdClosed and OnUserEarnedReward were fired Instantly. So it only happens on Video Interstitials.
  • This is really bad for us, because this incurrs on bad behaviour enforced by google. And google punish us for using google.

In order to reproduce it:

  1. Download sample project from this GitHub
  2. Open it using with (I guess) any Unity version
  3. Import 6.1.2 Admob
  4. Switch to android
  5. Enter a valid AppID and a AdUnitID for the interstitial with video ads enabled.
  6. Force Resolve
  7. Build and install on a device
  8. Logcat the device
  9. Request, wait, and show the ad.
  10. Upon closing the interstitial you will notice a delay between the ad being closed and OnAdClosed being fired in Logcat. It only happens if a video ad was served. Static ads works mostly fine.

Note: I have a attached a project below for simplicity where it DOES happens.

##What happened? How can we make the problem occur?
##This could be a description, log/console output, etc.

The only log I could find relevant is this one:
W Activity: Slow Operation: Activity com.HelloDarkness.MyOldFriend/com.google.android.gms.ads.AdActivity onDestroy took 298ms
That says mostly nothing.

Here's a screenshot of the video ad I mentioned above:
image
(Clicking "More Info" on that screenshot takes me to the youtube video of that musician)

##Please share a downloadable sample project that reproduces the bug, if
##available. This greatly helps us to diagnose and fix the issue faster.

Here! (Unity version: 2020.3.15f2)
https://drive.google.com/file/d/1CsrWyt_LfTKshfAfntcAtVYQpGWEarPw/view?usp=sharing

Relevant Code:

No relevant code here. This is reproduceable with no code, just using the sample from this github.

@Mecze
Copy link
Author

Mecze commented Apr 21, 2022

As a Workaround we are using Unity's "OnApplicationPause" to know when we get back from an Interstitial.

In our case we have wrappers for every Admob Ad Format (one for Banner, one for Interstitials... etc), and its the Interstitial wrapper who handle this and launches our "OnAdClosed" equivalent event when OnApplicationPause triggers (under certain conditions). As our games depends on these wrappers events and not Admob events directly it works like a charm.

Hope this helps.

@DineshNeupane
Copy link

same issue

@Mecze
Copy link
Author

Mecze commented Jun 3, 2022

Bump... Any new on this front?

We are still using our workaround:
Launch our own "adclosed" event when "OnApplicationPause" and ignore admob's adclosed event.

@mhctseu
Copy link

mhctseu commented Jan 5, 2023

Same issue here. We are using:
Unity 2020.3.38
Google Ads Mobile Unity 7.2.0.

@kunny kunny added the wontfix label Feb 6, 2023
@kunny
Copy link
Collaborator

kunny commented Feb 6, 2023

Since there were no recent activities for this issue, we are therefore reluctantly going to close this bug for now.

If you are still experiencing the problem, please file a new issue with the same description, what happens and system / network tracing / Charles logs.

All system setups can be slightly different, so it's always better to open new issues and reference the related ones. Thanks for your contribution.

@kunny kunny closed this as completed Feb 6, 2023
@aceloq
Copy link

aceloq commented Mar 31, 2023

@kunny

I have that same issue on Google Ads Mobile Unity 7.4.1 and Unity Editor 2020.3.46f1.

Occurs only in interstitials. It works fine in test ads and using admob test ad units. Occurs only real ads. I'm using Admob mediation and other ad services are fine. It only happens with Admob video interstitial Ads. This issue doesn't happen on all devices. Some devices have issue. For example, the Xiaomi Redmi Note 6 Pro device has a delay of about 2 seconds. I've seen a delay of up to 5 seconds on some low hardware devices.

This is an annoying issue.I hope it will be solved soon.

@brockw
Copy link

brockw commented Feb 28, 2024

I'm seeing this too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants