react-native-google-mobile-ads icon indicating copy to clipboard operation
react-native-google-mobile-ads copied to clipboard

🔥 [🐛] RNGoogleMobileAdsExample Status bar could not be hidden for full screen ad

Open puckey opened this issue 3 years ago • 3 comments

Issue

When I display an Interstitial in the iOS RNGoogleMobileAdsExample example app on my phone (iPhone SE), I see the following warning in the output:

2022-05-09 14:32:51.757814+0200 RNGoogleMobileAdsExample[480:45469] <Google> Status bar could not be hidden for full screen ad. Ensure that your app is configured to allow full screen ads to control the status bar. For example, consider whether you need to set the childViewControllerForStatusBarHidden property on your ad's rootViewController.

In the past I have had issues where users were unable to close interstitials due to the close button being under the status bar. Might this be related to this warning?


Project Files

Javascript

Click To Expand

package.json:

# N/A

admob.json:

# N/A

iOS

Click To Expand

ios/Podfile:

# N/A

Android

Click To Expand

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

AndroidManifest.xml:

<!-- N/A -->

Environment

Click To Expand

react-native info output:

 OUTPUT GOES HERE
  • Platform that you're experiencing the issue on:
    • [ ] iOS
    • [ ] Android
    • [ ] iOS but have not tested behavior on Android
    • [ ] Android but have not tested behavior on iOS
    • [ ] Both
  • Are you using TypeScript?
    • Y/N & VERSION

  • 👉 Check out Invertase on Twitter for updates on the library.

puckey avatar May 09 '22 12:05 puckey

Sorry for being silent on this one until now - I appreciate the report and it appears it needs triage

mikehardy avatar May 12 '22 14:05 mikehardy

I'm seeing this warning in the console as well. Until there's a more permanent fix I'm using a workaround by toggling the status bar as follows:

import { StatusBar } from 'react-native';

...

const MyScreen = () => {

  const { isLoaded, isClosed, isEarnedReward, reward, load, show } =
    useRewardedAd(adUnitId, {
      requestNonPersonalizedAdsOnly: true,
      keywords: ["fashion", "clothing"],
    });

  useEffect(() => {
    if (isClosed) {
      StatusBar.setHidden(false);
      navigation.navigate("CompletionScreen");
    }
  }, [isClosed, navigation]);

  const handleShowAd = () => {
    StatusBar.setHidden(true);
    show();
  };

};

parasdaryanani avatar Jun 10 '22 13:06 parasdaryanani

Edit: After further diving into this today, my comment does not appear related to this issue with the status bar. Applying the fix from @parasdaryanani did not alleviate, so I'll create a new issue for it.

@mikehardy This is a quite serious bug - if a specific interstitial is shown on some devices, the app is useless because the user cannot close the ad.

Been seeing this too - but not the warning since it's happening on a live app. People have been complaining they can't close the interstitial ad on some devices.

Today I tested on 30+ devices on stackoverflow, and it only happened in these cases:

  • iPhone SE 2022 (iOS 15), iPhone 8 (iOS 15.3).
  • A specific type of interstitial ad which requires two clicks to close. I got them for Candy Crush, Shoot Bubble, Cubes Empire.

I could close the ad by clicking pixel-perfectly on the absolute bottom of the button, indicating something is blocking the clicks. There's only maybe 1-4 pixels in the height which reacts to the click.

Of course this wonderful issue doesn't occur in Simulators, as these can't seem to show non-test ads, which don't have this particular type of interstitial. And they also only happen for very few specific devices, and on top of that, only for some specific ads - which for some only happen a couple times a day.

Other devices this did NOT appear on - i.e. no issues:

  • iPhone 13 Mini (15)
  • iPhone 13 (15)
  • iPhone 13 Pro (15.6)
  • iPhone 13 Pro (15.0)
  • iPhone 13 Pro Max (15.0)
  • iPhone 13 (15.5)
  • iPhone 13 (15.4)
  • iPhone 12 (14)
  • iPhone 12 Mini (16 beta)
  • iPhone 12 Mini (14)
  • iPhone 12 Pro Max (16 beta)
  • iPhone 12 Pro Max (14)
  • iPhone 12 Pro (14.4)
  • iPhone XS (15.3)
  • iPhone XS Max (12)
  • iPhone 11 Pro (15.4)
  • iPhone 11 Pro Max (14.0)
  • iPhone XR (15.0)
  • iPhone 8 (12)
  • iPhone 7 (12.3)
  • iPhone 6S (12.1)
  • iPhone 8 Plus (12.3)
  • iPad Air 5 (15)
  • iPad Air 4 (14)
  • iPad Mini 2021 (15)
  • iPad Pro 2021 (12.9)
  • iPad Pro 12.9 2018 (15.3)
  • iPad Pro 11 2021 (14.5)
  • iPad 5th (15.3)

Edit - To reproduce:

  • Show interstial on iPhone 8 / iPhone SE 2022 with iOS 15.x (also happens on other devices, but haven't found any others so far)
  • Must be on physical devices (interstitials only seem to work in test-mode on Simulators)
  • Must be a real, live interstial - test ads are useless - you might risk getting your admob and Google account banned doing this.
  • Interstitial must be of the type where it requres two clicks to close - all other types seem to work. It can take a while before this type is shown depending on your luck/profile.

bitfabrikken avatar Aug 10 '22 14:08 bitfabrikken

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

github-actions[bot] avatar Dec 05 '22 20:12 github-actions[bot]

needs triage for anyone whose business is affected...

mikehardy avatar Dec 05 '22 22:12 mikehardy

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

github-actions[bot] avatar Jan 02 '23 23:01 github-actions[bot]