When I test banner ads with test with test ad id everything works great, but when I use my real ad unit id, I receive this error: Internal error, an invalid response was received from the ad server. How can I make it work with real id?
EDIT:
For me it was solved by removing these two lines:
testDevices={[AdMobBanner.simulatorId]}
onAdFailedToLoad={error => console.error(error)}
Hope it helps someone!
This is probably not an issue with this library, but with your admob configuration. How do you use the library?
+1. I got this error when my phone is offline, presumably. I didn't see it in version 1.*
+1 Also got this when trying to use my own adUnitId from my admobs accouny
+1. I got this error when my phone is offline, presumably. I didn't see it in version 1.*
@artemukolov that's sound like a reasonable error message for when you're offline don't you think?
@koenpunt Correct
@artemukolov I also have the same problem as @bvv218 , and I don't think it's because of the admob configuration, because I test the real ad unit id in native code (java) and it works.
Same problem
This problem is because the ad unit was just created. It takes some time for it to start working so you just have to wait a bit
same problem
I have the same problem. Ads were working fine on version 1 though. Any help on this would be appreciated. Thanks.
For me it was solved by removing these two lines:
testDevices={[AdMobBanner.simulatorId]}
onAdFailedToLoad={error => console.error(error)}
@bvv218 no errors but no ads.
I have the same error, someone have solved this?
Closing since @bvv218 managed to solve it by removing the onAdFailedToLoad property.
I think we should keep this issue open. There are many others(including me) who are still searching for a solution. Removing onAdFailedToLoad did not solve it for me.
A common case for the adserver returning an incorrect response is when the AdMobBanner/PublisherBanner is not sized properly. If you have this error, you better test if you also have this error when you place the banner for example at the root of your app, without applying any styles.
I am getting the same error for interstitials as well.
I still get the same error.
Thanks to @artemukolov
+1. I got this error when my phone is offline, presumably. I didn't see it in version 1.*
I managed to solve this. For me, it was the emulator was offline. Try opening the browser app inside your emulator and try to navigate to a website (e.g. www.google.com). If you can open the site then re-run
react-native run-ios or react-native run-android.
This worked for me. https://imgur.com/a/ZlD5e
How to solve the problem. Thanks.
Create a new project and copy all files of old project to this new. This worked for me
I had the same error using my cod UnitId, but when i did use the test code delivered for google i could work fine
I had the same issue with my app. You just need to wait for a little. Your ad id is newly created so it will take some time to fetch ads from google servers. So give it some time and it will work soon. the first day I will try with my AdMob account its say "Internal error, an invalid response was received from the ad server." on next day try with run-android it's working fine for me. please wait for some time max 1 day after the create AdMob banner add after it's work.
Login to your admob account and follow the following steps
-
1)Click Home page,
In the dialog with this message
Your ad units are not displaying ads because you haven't provided your account payments information yet.
2)Click Fix It.
3)Click Select Payment,
4)And Submit.
and then within 24 hours it will verify your details and will start serving ads for your ad units
@bvv218
just removed 2 lines?
so what are testDevices and onAdFailedToLoad for?
Had the same issue and tried everything mentioned everywhere. It wasn't until I went into Google Developer Console -> My App -> Pricing & Distribution: checked Contains ads that it started working after half an hour.
not commented any lines, but tested with Sample ad unit ID ,, worked for me,, by the way i am not on emulator but physical device
Banner | ca-app-pub-3940256099942544/6300978111
Interstitial | ca-app-pub-3940256099942544/1033173712
Interstitial Video | ca-app-pub-3940256099942544/8691691433
Rewarded Video | ca-app-pub-3940256099942544/5224354917
Native Advanced | ca-app-pub-3940256099942544/2247696110
Native Advanced Video | ca-app-pub-3940256099942544/1044960115
After setting your payment details, first test with test ad unit id .
then change your own ad unit id. then if you get this error [Error: The ad request was successful, but no ad was returned due to lack of ad inventory.] if your app is created recently. you need to wait for some time to verify the app
Thanks, @artemukolov to saved my day 馃憤
Most helpful comment
Login to your admob account and follow the following steps
-
1)Click Home page,
In the dialog with this message
2)Click Fix It.
3)Click Select Payment,
4)And Submit.
and then within 24 hours it will verify your details and will start serving ads for your ad units