Closed daheeahn closed 3 years ago
Hi there!
Your versions are out of date, please only file issues against current versions (v10.1.0 here, v7.1.0 of underlying firebase-ios-sdk along with up to date MobileAds pod)
I'm not sure how this is a react-native-firebase issue? The related issue was in react-native, and you don't appear to be using 0.63.3 there so you may be running into a bug already fixed
You mention Ad1 and Ad2 there is no notation of same in the example code
Please post a reproduction based solely on a clean up to date repro like that from https://github.com/mikehardy/rnfbdemo/blob/master/make-demo.sh and an App.js that is self-contained and shows the problem and we may investigate further
Hi ! Then, this issue could be version related. After fixing the version, I'll test it and come back. Thanks 😊
Also getting this issue when trying to use Interstitials and Rewarded at the same time. Setup is something like this:
const interstitial = InterstitialAd.createForAdRequest(intId);
interstitial.load();
const rewarded = RewardedAd.createForAdRequest(rewardId);
rewarded.load();
export default () => {
return <>
<Button onPress={interstitial.show}><Text>Int.</Text></Button>
<Button onPress={rewarded.show}><Text>Reward</Text></Button>
</>
}
Without ever having touched the interstitial button, the rewarded button will fail to show and produce the following error in the callback:
[Error: [admob/unknown] The provided view controller is already presenting another view controller.]
Podfile:
- Firebase/AdMob (7.1.0):
- Firebase/CoreOnly
- Google-Mobile-Ads-SDK (~> 7.66)
RN Version 0.63.3
Interesting - we're on firebase ios sdk 7.2.0 now underlying (working on testing it for release now - seems fine and you can override it to see) - but I don't think that will affect things
You might dive into node_modules and instrument the admob code with extra logging around the calls in question to untangle it. I don't use admob personally but if you can find the root cause for this and post a PR I'd happily work with you to get it merged and released to save yourself and any future explorers the hassle
This seemed to be a little more related to my code:
I was asking the user if they wanted to watch a rewarded ad with a RN Modal, and they did not like being up at the same time.
I set the presence of the modal to true or false using router state, so calling:
dismiss();
showAd();
Simultaneously did not cause the modal view to be dismissed in time for the rewarded ad to show.
I use setTimeout with a small delay to bypass this... not the best fix but it will do for now until I restructure.
I have a project that includes the same code. There isn't any error in android but I got this issue on iOS. I'm using Modal to display "open rewarded add" button. This issue because of react-native. You can fix your issue with this. Change Modal to view and render the view by if(isVisible) condition. This isVisible state is as the same as modal's.
Version
react-native: 0.61.5 @react-native-firebase/app: 8.4.1 @react-native-firebase/admob: 7.6.2
Issue
In my app, there are two advertisements with different ids. Ad 1 is displayed well, but when I try to load Ad 2, this error is displayed. There seems to be a related issue already, but has it been fixed yet? (Related Issue: https://github.com/invertase/react-native-firebase/issues/2292)
My Code
ios/Podfile
:TypeScript
?Y
&3.5.3