invertase / react-native-google-mobile-ads

React Native Google Mobile Ads enables you to monetize your app with AdMob.
https://docs.page/invertase/react-native-google-mobile-ads
Other
688 stars 139 forks source link

[🐛] iOS video interstitial ad starts playing in background right after pre-loading #344

Closed birdofpreyru closed 1 year ago

birdofpreyru commented 1 year ago

What happened?

After upgrading an existing project from rn-google-mobile-ads v9.0.0 to the latest v10.0.0 I just noticed on iOS that a video interstitial ad starts playing (its sound) in the background, right after it is preloaded, I guess, before it is really asked to be shown. It worked alright with the previous library version, I believe. Haven't noticed the problem on Android yet, but haven't been checking it carefully either. I'll probably do more investigation myself in a week or two, but leaving this note here, in case anybody has a time to double-check it before.

Platforms

Only on iOS

React Native Info

N/A

Are your using Typescript?

package.json

N/A

app.json

N/A

ios/Podfile

No response

android/build.gradle

No response

android/app/build.gradle

No response

android/settings.gradle

No response

AndroidManifest.xml

No response

mikehardy commented 1 year ago

Hey @birdofpreyru 👋 thanks for the heads up Does the example app exhibit the same behavior? I haven't checked it since @dylancom bumped the underlying SDK

birdofpreyru commented 1 year ago

Hi @mikehardy :wave: I tested again today, and seeing other interstitial ads, I don't experience this issue. Probably a one-time glitch in SDK / a problem with some particular ad :man_shrugging: I'll close the issue for now.

gyl-jer commented 1 year ago

@birdofpreyru @mikehardy

Users of our app have been experiencing this issue for about 2 months now. It is very sporadic - I estimate it is only affecting 0.5-2% of our users - and we cannot reproduce it on any devices. We get about 1-2 emails a day from users complaining about the "background music in the app being annoying", which we have isolated as music from ads since there is no other sound in the app.

Despite only affecting a small percentage of users, this is a serious issue for them as they cannot enjoy the app with the noise playing in the background.

Several users have sent videos of the issue, so I can confirm it does happen - I just can't figure what causes it, and why it is not affecting everyone.

If it is an issue with specific ads, is there any way we could try to track and log them, and see which ones are problematic?

We are going to try reverting our react-native-google-ads package to 9.1.2 to see if it solves the issue.

gyl-jer commented 1 year ago

Sadly reverting back to the old version did not fix the issue for the user experiencing it.

Does anyone have any ideas how we can reproduce it, or what I need to find out from the user as a possible cause?

birdofpreyru commented 1 year ago

@gyl-jer I am quite convinced now it is a rarely-triggered bug in the underlying Google SDK. Not much we can do with it in this library, beside ensuring we are stating up-to-date with the latest SDK versions.

lachtos commented 9 months ago

Still happening with the latest version. Interstitials playing and looping in the background on load, with no way to stop them, except killing the app (audio still playing even when the app is in background).

Since the problem is the audio - is it possible to mute interstitial audio by default, then unmute once play() is called, and then mute again after the ad is closed?