React-native-admob: Handling the ad request was unsuccessful due to network connectivity

Created on 10 Jun 2018  路  6Comments  路  Source: sbugert/react-native-admob

Hi..
I am new on react native..
When use this library with no connectivity, it show "the ad request was unsuccessful due to network connectivity"..
How to handle it? don't show that message again..
thank you..
Sorry, my english not good enough..

Most helpful comment

i found fix for this with https://github.com/sbugert/react-native-admob/issues/228#issuecomment-352357150 . just replace console.error(error) with console.log(error).. it'll be fixed... Thank you every one

All 6 comments

check your internet connection

Your internet is off when you run command for AdMob testing, that's why this error comes. Be Sure your Internet is a must on while running the command.

@Verma-Pooja and @aligenc in real time, some times user may lost internet connection in mobile... in that cases app should not crash right? but with above error it'll happens... all we need is how to handle this error... any help thank you

i found fix for this with https://github.com/sbugert/react-native-admob/issues/228#issuecomment-352357150 . just replace console.error(error) with console.log(error).. it'll be fixed... Thank you every one

Thanks @Ramaraju1992

console.log("Admob Error")

This solved my problem

I am getting this warning even though the device is connected to the internet. Here are the results from the react-native-net-info library for internet connection

{
  'details': {
      'bssid': '02:00:00:00:00:00',
      'frequency': 2432,
      'ipAddress': '***.***.*.*',
      'isConnectionExpensive': false,
      'strength': 77,
      'subnet': '255.255.255.0'
  },
  'isConnected': true,
  'isInternetReachable': true,
  'isWifiEnabled': true,
  'type': 'wifi'
}
Was this page helpful?
0 / 5 - 0 ratings