react-native-admob / admob

Admob for React Native with powerful hooks and components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot load banner ads

khoabuidev opened this issue · comments

{
"code": "E_AD_LOAD_FAILED",
"message": "Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.",
"nativeStackIOS": [
"0 MonNgonMoiNgay 0x00000001101f5a90 RCTJSErrorFromCodeMessageAndNSError + 112",
"1 MonNgonMoiNgay 0x000000010ffb701b -[RNAdMobBannerView bannerView:didFailToReceiveAdWithError:] + 139",
"2 MonNgonMoiNgay 0x0000000110583b05 GAD_GADBannerView_x86_64_8_13_0 + 5556",
"3 MonNgonMoiNgay 0x00000001105db190 __destroy_helper_block_e8_32s40s48s56s64s72w + 305",
"4 MonNgonMoiNgay 0x00000001105dad68 GAD_GADInternalBannerView_x86_64_8_13_0 + 6776",
"5 MonNgonMoiNgay 0x00000001105da972 GAD_GADInternalBannerView_x86_64_8_13_0 + 5762",
"6 MonNgonMoiNgay 0x00000001105dafd2 GAD_GADInternalBannerView_x86_64_8_13_0 + 7394",
"7 libdispatch.dylib 0x00007fff20110876 _dispatch_call_block_and_release + 12",
"8 libdispatch.dylib 0x00007fff20111a56 _dispatch_client_callout + 8",
"9 libdispatch.dylib 0x00007fff2011ee20 _dispatch_main_queue_callback_4CF + 1073",
"10 CoreFoundation 0x00007fff2036985d CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9",
"11 CoreFoundation 0x00007fff203640ba __CFRunLoopRun + 2772",
"12 CoreFoundation 0x00007fff20363103 CFRunLoopRunSpecific + 567",
"13 GraphicsServices 0x00007fff2c851cd3 GSEventRunModal + 139",
"14 UIKitCore 0x00007fff24ffbe63 -[UIApplication _run] + 928",
"15 UIKitCore 0x00007fff25000a53 UIApplicationMain + 101",
"16 MonNgonMoiNgay 0x000000010fac33c8 main + 104",
"17 dyld 0x0000000113024e1e start_sim + 10",
"18 ??? 0x00000001212884fe 0x0 + 4851270910"
],
"domain": "com.google.admob",
"userInfo": {
"NSLocalizedDescription": "Cannot find an ad network adapter with the name(s): com.google.DummyAdapter. Remember to link all required ad network adapters and SDKs, and set -ObjC in the 'Other Linker Flags' setting of your build target.",
"gad_response_info": null
},
"target": 329
}

I am also facing the same issue. Does anyone have a solution for this?

I use real Ad Unit Id, it working now. That problem happen when we use TestID

Screen Shot 2021-11-29 at 9 17 32 PM

@khoabuidev Thanks it works for me.

I had the same problem, I think I now understand why it doesn't work with TestIds.
As explained in the AdMob Documentation, you need to add a line to your app-ads.txt file. I didn't try since I find using tests devices is more convenient (no need to change Ads IDs between environments). The emulator is automatically a test device, you just have to add your own device, so you won't be "banned" from Google AdMob if ads are displayed on your own device.

Perfect, just adding google.com, pub-3940256099942544, DIRECT, f08c47fec0942fa0 into app-ads.txt.
Thanks @jeremyhalin