I am displaying multiple rewarded video ads on different screens. I am setting a different function on each screen at “rewardedVideoDidRewardUser” event of AdMobRewarded. What happens is that when i see a video ad at one screen the function executes on the event and it works fine. then i go to another screen i see another video ad and on the event the function of previous screen is executed and then the function of current screen. so basically the previous screen’s event is not being cleared. so i am trying to do this on componentWillUnmount using AdMobRewarded.removeAllListeners() on each screen but when i leave a screen i get this error: “Attempted to remove more ‘ExpoAdsAdMobRewardedVideoAdManager’ listeners that added”. I have no clue. its been hours and i haven’t found any solution. Any help would be appreciated. And one more thing which is weird that after i dismiss this error and go to next screen to view again another ad it actually works and only that screen’s function is executed meaning that it actually removed event listeners but still the error is appearing.
I actually have found the bug just now which is that if u want to use AdMobRewarded.removeAllListeners(); then u need to make sure you are adding all 8 events, if not needed you can just console.log something but u need to add them and after that it will work.
Expo need to fix this and what this function should do is remove all “added” listeners.