invertase / react-native-google-mobile-ads

React Native Google Mobile Ads enables you to monetize your app with AdMob.
https://docs.page/invertase/react-native-google-mobile-ads
Other
652 stars 134 forks source link

Having trouble walking through documentation (AdapterStatuses errors) #211

Closed StevenHarlow closed 1 year ago

StevenHarlow commented 1 year ago

I've been reading the documentation, but it looks like there are a bunch of broken links and I'm not sure if I'm doing something wrong. I've also noticed that the library that this module migrated from has more documentation steps (setting up firebase-core) that I'm not sure if I'm supposed to do, and the video in the "What it does" section of the installation page doesn't have much context, so I'm not sure if I'm supposed to follow any of those steps.

Currently I'm having problems initializing mobileAds(). On android the return adapterStatuses I get are:

[{"description": "", "name": "com.google.android.gms.ads.MobileAds", "state": 1}, 
{"description": "Failed to create Adapter.", "name": "com.google.ads.mediation.vungle.VungleMediationAdapter", "state": 0}, 
{"description": "Failed to create Adapter.", "name": "com.google.ads.mediation.applovin.AppLovinMediationAdapter", "state": 0}, 
{"description": "Failed to create Adapter.", "name": "com.google.ads.mediation.adcolony.AdColonyMediationAdapter", "state": 0}, 
{"description": "Failed to create Adapter.", "name": "com.google.ads.mediation.tapjoy.TapjoyMediationAdapter", "state": 0}]

and on iOs I get: [{"description": "<GADAdapterStatus: 0x6000008e9500; state = Not Ready;Could not retrieve application configuration data.>", "name": "GADMobileAds", "state": 0}]

mikehardy commented 1 year ago

The reference links are not that useful right now because of #83

The documents from the @react-native-firebase/admob era are no longer of any value with regard to this module, so I would ignore those, it will just be confusing

Have you tried just making a throwaway test app to play with it? We create the example app here with a script, which also serves as an MCVE (https://stackoverflow.com/help/mcve) of how to build an app with this module: https://github.com/invertase/react-native-google-mobile-ads/blob/main/refresh-example.sh

Following along with that might help

92sajid110 commented 1 year ago

i only getting this adapter status {"description": "", "name": "com.google.android.gms.ads.MobileAds", "state": 1} any help

mikehardy commented 1 year ago

@92sajid110 - this is threadjacking, please don't do that as it splinters discussion and is not fair to the original poster. Also, if it were its own issue, it would be unanswerable (https://stackoverflow.com/help/how-to-ask / https://stackoverflow.com/help/minimal-reproducible-example)

anwersolangi commented 1 year ago

I checked logcat, and got the following errors: 'status -> '

[ { description: '', state: 1, name: 'com.google.android.gms.ads.MobileAds' },
  { description: 'Failed to create Adapter.', state: 0, name: 'com.google.ads.mediation.vungle.VungleMediationAdapter' },
  { description: 'Failed to create Adapter.', state: 0, name: 'com.google.ads.mediation.applovin.AppLovinMediationAdapter' },
  { description: 'Failed to create Adapter.', state: 0, name: 'com.google.ads.mediation.adcolony.AdColonyMediationAdapter' },
  { description: 'Failed to create Adapter.', state: 0, name: 'com.google.ads.mediation.tapjoy.TapjoyMediationAdapter' } ]

I searched around the internet for somehelp, and found this similar to this issue, however the stackoverflow answers suggested that to add APP_ID in the manifest file, I also checked the lib code, but can't find anything wrong there. Anyone found a solution?

mikehardy commented 1 year ago

Yeah, we already add app_id to manifest (via placeholder substitution, processing app.json keys and injecting them into gradle) otherwise nothing would work, right? So that is likely working. Why would adapters not be working, unknown.

fmApss commented 1 year ago

In the emulator I get the same error (array of failed) But it works on a physical phone (actually I get a timeout instead of a failed. It's because of my government's censorship)

github-actions[bot] commented 1 year ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.