AdMob Rewarded Video(Even Test Video) not loaded on iOS
Hey Everyone,
I am trying to Show rewarded video in IOS, But Every time I load the video I got the error Code: '"admob/error-code-no-fill"'. Even not able to Load test Video.
` import firebase from 'react-native-firebase'; import { EventRegister } from 'react-native-event-listeners'; import * as Constant from './../Common/Constant';
const advert = firebase.admob().rewarded(Constant.AddMob_UnitID); const AdRequest = firebase.admob.AdRequest; const request = new AdRequest(); export default class Admob {
static inititalizeAdd(){
firebase.admob().initialize(Constant.AddMob_AppID);
}
static loadAdd() {
advert.loadAd(request.build());
}
static loadListeners() {
advert.on('onRewarded', (event) => {
EventRegister.emit(Constant.EventTypes.Rewarded, Constant.EventTypes.Rewarded);
advert.loadAd(request.build());
});
advert.on('onAdClosed', () => {
advert.loadAd(request.build());
});
advert.on('onAdLoaded', (event) => {
// advert.show();
});
advert.on('onAdFailedToLoad', (error) => {
console.log(error);
});
}
static showAdd() {
if(advert.isLoaded()){
advert.show();
}else{
console.log('not loaded')
}
}
}`
and AppDelegate File Looks Like:
`- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [FIRApp configure]; [RNFirebaseNotifications configure]; [GADMobileAds configureWithApplicationID:@"ca-app-pub-9508394659859044~6040384343"];
[[RCTI18nUtil sharedInstance] allowRTL:YES]; NSURL *jsCodeLocation; [Fabric with:@[[Crashlytics class]]];
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"Playsive" initialProperties:nil launchOptions:launchOptions]; //[RCTSplashScreen open:rootView]; [RCTSplashScreen open:rootView withImageNamed:@"splash"]; // activate splashscreen, imagename from LaunchScreen.xib
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; UIViewController *rootViewController = [UIViewController new]; rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible];
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
return YES; }`
Any suggestion Y i am not able to load Video...?
error-code-no-fill shows when the ad request was successful, but no ad was returned due to lack of ad inventory. Check out this, https://rnfirebase.io/docs/v5.x.x/admob/error-handling
@hazeeb thanks, I already saw that, so It means my admob integration is fine ? there is issue with test ID?
I tried using Interstitial instead of Rewarded and got the same error ... admob running out of ads doesn't seem convincing to me
@sonlexqt any update?
@tusharmutreja no luck so far ...
Have you try addTestDevice(<your device id>) ?
@Chenjh1992 yes I tried with test Id and for simulator it automatically takes it
Hello 👋, this issue has been automatically marked as stale because it has not had activity for quite some time. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.