Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Network Mediation][Android] Multiple things do not work #34

Closed
perrosnk opened this issue Jun 7, 2020 · 48 comments
Closed

[Network Mediation][Android] Multiple things do not work #34

perrosnk opened this issue Jun 7, 2020 · 48 comments
Labels
bug Something isn't working enhancement New feature or request work in progress

Comments

@perrosnk
Copy link

perrosnk commented Jun 7, 2020

When using FB audience, onUnifiedNativeAdLoaded is never called. No children Views work apart from MediaView.

The issue appear on Android. On iOS everything works fine. Tested on both simulator and real devices.

@ammarahm-ed
Copy link
Owner

I do not understand the issue, kindly explain it more. How are you using FB audience, I have no experience with this right now

@perrosnk
Copy link
Author

perrosnk commented Jun 9, 2020

@ammarahm-ed
I am using FB audience as a mediation network on Admob.
I have followed all the instructions to add FB SDK and use it in order to show ads both from Admob and FB through this library.

All children Views are empty/blank (on Android) apart from MediaView.
When I use testMode, the Views do work and show some text.

This only happens on Android. On iOS devices it works fine.

Is there any chance that this gets prioritized?

@codervss
Copy link

codervss commented Jun 9, 2020

onUnifiedNativeAdLoaded just does not get called most of the times on Android.
Works fine on IOS.
But issue still prevails for Android.
I tested on Test ads, and get the same issue

@perrosnk
Copy link
Author

perrosnk commented Jun 9, 2020

I was trying to use onUnifiedNativeAdLoaded in order to access the ad's assets in order to replace the children Views that aren't working.

onAdLoaded is triggered correctly both on iOS and Android.

@codervss
Copy link

I too am in the same situation.
I needed the ad data to make the ad design according to the requirement.
onAdLoaded is called every time but there seems to be an issue with onUnifiedNativeAdLoaded.
It is not working most of the times in Android

@ammarahm-ed
Copy link
Owner

ammarahm-ed commented Jun 11, 2020

@codervss what do you mean most of the times? do you get the event sometimes and sometimes you don't? Also if onAdLoaded is called, it means that the ad is loaded properly, but for some reason is onUnifiedAdLoaded is not called, this is probably due to something causing an exception on Android which prevents onUnifiedAdLoaded to be called.

How you can help me, run adb logcat , run your app and see if you are getting any Exceptions there from your app. there must be something.
.
.
I don't have this setup with FB-Audience Mediation integrated properly, if you can provide me an example with this implemented in your app and not working, I can fix it asap, in a day or so.

@perrosnk @codervss are you both using FB Mediation?

@perrosnk
Copy link
Author

perrosnk commented Jun 11, 2020

I was reading again the docs and I noticed that "some Facebook native ad assets don't map one to one to Google native ad assets".

Could this be the reason?

@ammarahm-ed Yes, I am using FB mediation and as far as I understand, @codervss too

@perrosnk
Copy link
Author

perrosnk commented Jun 11, 2020

@ammarahm-ed I am getting this from the logcat:

06-11 21:32:40.190  4558  4558 D FacebookAdapter: onMediaDownloaded
06-11 21:32:40.224  4558  4558 E Ads     : Remote exception getting video controller aspect ratio.
06-11 21:32:40.224  4558  4558 E Ads     : android.os.RemoteException
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.ads.nonagon.ad.nativead.ak.h(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.ads.internal.formats.client.e.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:33)
06-11 21:32:40.224  4558  4558 E Ads     : 	at fk.onTransact(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:4)
06-11 21:32:40.224  4558  4558 E Ads     : 	at android.os.Binder.transact(Binder.java:604)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.internal.ads.zzgi.transactAndReadException(com.google.android.gms:play-services-ads-base@@19.1.0:10)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.internal.ads.zzact.getAspectRatio(com.google.android.gms:play-services-ads-lite@@19.1.0:4)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.internal.ads.zzyg.getAspectRatio(com.google.android.gms:play-services-ads-lite@@19.1.0:5)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNNativeAdWrapper.setNativeAdToJS(RNNativeAdWrapper.java:163)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNNativeAdWrapper.access$100(RNNativeAdWrapper.java:24)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNNativeAdWrapper$3.onUnifiedNativeAdLoaded(RNNativeAdWrapper.java:113)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.internal.ads.zzafe.zza(com.google.android.gms:play-services-ads-lite@@19.1.0:6)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.internal.ads.zzaek.zza(com.google.android.gms:play-services-ads-lite@@19.1.0:18)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.internal.ads.zzgk.onTransact(com.google.android.gms:play-services-ads-base@@19.1.0:13)
06-11 21:32:40.224  4558  4558 E Ads     : 	at android.os.Binder.transact(Binder.java:604)
06-11 21:32:40.224  4558  4558 E Ads     : 	at fj.b(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:2)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.ads.internal.formats.client.au.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.ads.nonagon.ad.nativead.ac.run(Unknown Source:6)
06-11 21:32:40.224  4558  4558 E Ads     : 	at android.os.Handler.handleCallback(Handler.java:789)
06-11 21:32:40.224  4558  4558 E Ads     : 	at android.os.Handler.dispatchMessage(Handler.java:98)
06-11 21:32:40.224  4558  4558 E Ads     : 	at pt.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.google.android.gms.ads.internal.util.f.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:1)
06-11 21:32:40.224  4558  4558 E Ads     : 	at pt.dispatchMessage(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-11 21:32:40.224  4558  4558 E Ads     : 	at android.os.Looper.loop(Looper.java:164)
06-11 21:32:40.224  4558  4558 E Ads     : 	at android.app.ActivityThread.main(ActivityThread.java:6541)
06-11 21:32:40.224  4558  4558 E Ads     : 	at java.lang.reflect.Method.invoke(Native Method)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
06-11 21:32:40.224  4558  4558 E Ads     : 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
06-11 21:32:40.361  4558  4558 E Ads     : Unable to call play on video controller.
06-11 21:32:40.361  4558  4558 E Ads     : android.os.RemoteException
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.google.android.gms.ads.nonagon.ad.nativead.ak.b(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.google.android.gms.ads.internal.client.bw.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:16)
06-11 21:32:40.361  4558  4558 E Ads     : 	at fk.onTransact(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:4)
06-11 21:32:40.361  4558  4558 E Ads     : 	at android.os.Binder.transact(Binder.java:604)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.google.android.gms.internal.ads.zzgi.zza(com.google.android.gms:play-services-ads-base@@19.1.0:21)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.google.android.gms.internal.ads.zzxn.play(com.google.android.gms:play-services-ads-lite@@19.1.0:4)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.google.android.gms.ads.VideoController.play(com.google.android.gms:play-services-ads-lite@@19.1.0:15)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNNativeAdWrapper.addMediaView(RNNativeAdWrapper.java:140)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNAdMobNativeViewManager.setMediaView(RNAdMobNativeViewManager.java:108)
06-11 21:32:40.361  4558  4558 E Ads     : 	at java.lang.reflect.Method.invoke(Native Method)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:83)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:134)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:54)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:48)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.NativeViewHierarchyManager.updateProperties(NativeViewHierarchyManager.java:145)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.UIViewOperationQueue$UpdatePropertiesOperation.execute(UIViewOperationQueue.java:87)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:779)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:888)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.UIViewOperationQueue.access$2200(UIViewOperationQueue.java:42)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:948)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:28)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:174)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:84)
06-11 21:32:40.361  4558  4558 E Ads     : 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:909)
06-11 21:32:40.361  4558  4558 E Ads     : 	at android.view.Choreographer.doCallbacks(Choreographer.java:723)
06-11 21:32:40.361  4558  4558 E Ads     : 	at android.view.Choreographer.doFrame(Choreographer.java:655)
06-11 21:32:40.361  4558  4558 E Ads     : 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
06-11 21:32:40.361  4558  4558 E Ads     : 	at android.os.Handler.handleCallback(Handler.java:789)
06-11 21:32:40.361  4558  4558 E Ads     : 	at android.os.Handler.dispatchMessage(Handler.java:98)
06-11 21:32:40.361  4558  4558 E Ads     : 	at android.os.Looper.loop(Looper.java:164)
06-11 21:32:40.361  4558  4558 E Ads     : 	at android.app.ActivityThread.main(ActivityThread.java:6541)
06-11 21:32:40.361  4558  4558 E Ads     : 	at java.lang.reflect.Method.invoke(Native Method)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
06-11 21:32:40.361  4558  4558 E Ads     : 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
06-11 21:32:40.389  4558  4932 D RenderScript HIDL Adaptation: IRenderScriptDevice::getService()

@ammarahm-ed
Copy link
Owner

Okay, so it is unable to get information from video controller. Can you provide an example app with this? it would be helpful to fix this quickly

@perrosnk
Copy link
Author

perrosnk commented Jun 11, 2020

I am not sure how I can do that. This doesn't happen with test ads.
With test ads we do get everything loaded properly. I have noticed that with test ads it doesn't show a single picture - it shows a carousel of pictures. I don't know if that's helpful

@ammarahm-ed
Copy link
Owner

maybe use this: facebook ad testing

@ammarahm-ed
Copy link
Owner

ammarahm-ed commented Jun 11, 2020

I doesn't matter, facebook ad network does not expose its media assets like images etc. It loads them only into the MediaView so it is handled natively

@ammarahm-ed
Copy link
Owner

If you are unable to provide such an, I will probably look into it myself to see where it is happening and why but if you can, it would save a ton of time.

@ammarahm-ed
Copy link
Owner

Are the events such as onAdImpression and onAdClicked called or not? Because I think you have to manually log it back to the FacebookAdapter so it is logged on Facebook Audience Network too.

@ammarahm-ed
Copy link
Owner

And @codervss can you update us on whether you are getting the event sometimes and sometime no event? And usually when you get the event, is the content of the ad a video or image/slideshow etc??

@ammarahm-ed ammarahm-ed added bug Something isn't working enhancement New feature or request work in progress labels Jun 11, 2020
@perrosnk
Copy link
Author

Hello @ammarahm-ed and thank you so much for your interest.
The majority of impressions and clicks are logged on Android - I cannot confirm that ALL clicks and impressions are logged. On iOS it seems that no clicks are logged and about 1/3 of impressions are logged. As a side note, my ads appear within a Flatlist.

I have been trying to find a way to build an example app, but I don't understand how I can do so without publicly exposing my ads ids. The link that you provided is about adding test devices and run test ads

@ammarahm-ed
Copy link
Owner

ammarahm-ed commented Jun 12, 2020

Was this an issue on react-native-fb-ads too? But i think there, no impressions or clicks are logged inside the list on both android and ios. Do we need to log the impressions and clicks manually? Like have you checked if the onAdImpression or onAdClicked event is being called on android and iOS? Its available in the NativeAdView,

If they are being logged then the issue is deeper inside the implementation on iOS. What about the usual ads from Admob network. Are their clicks being logged?

@perrosnk
Copy link
Author

Yes, on react-native-fb-ads no clicks or impressions were logged on both ios and android.

I am going to test your other questions now and revert back in a while.

@perrosnk
Copy link
Author

@ammarahm-ed
On iOS with testAds: Both clicks and impressions are logged.
On Android with testAds: Both clicks and impressions are logged

The problem is with real ads on devices:
I see a discrepancy in the number of ads impressions and clicks reported by Admob and FB.

Anyway, I believe this is a seperate issue that's why I have opened this.

The problem here is that onUnifiedNativeAdLoaded is not called, and all Views are blank even with test ads on Android.
It works fine if you enable test mode

@ammarahm-ed
Copy link
Owner

ammarahm-ed commented Jun 12, 2020

The views are blank always or sometimes? I mean is it so that sometimes the views load and sometimes they dont load at all?

@perrosnk
Copy link
Author

perrosnk commented Jun 12, 2020

@ammarahm-ed Always on Android, never on iOS

@perrosnk
Copy link
Author

@ammarahm-ed
On Android: the ad loads, MediaView is populated / All other Views are blank / onUnifiedNativeAdLoaded is not called
On iOS it works fine

@ammarahm-ed
Copy link
Owner

How are you showing test ads in debug mode on android & iOS with facebook Mediation?

@ammarahm-ed
Copy link
Owner

I think I will need to setup facebook mediation to fix this properly

@perrosnk
Copy link
Author

I don't know exactly. I believe that is because if you set eCPM of Facebook quite high, it will get a higher priority and show ads from FB

@ammarahm-ed
Copy link
Owner

I have a problem, i cant claim an app on facebook monetization network, it says your business is prohibited. What if you can make a test property on facebook ads and put it in an example? can that work for you? and a test app on admob network which you can delete later?

@perrosnk
Copy link
Author

@ammarahm-ed I am really worried to publicly expose a property because I don't know if that could affect my other properties. Do you have any idea if that is true?

@ammarahm-ed
Copy link
Owner

You can send it to me privately if not here on github on my email, the example so I can fix the bug and push the code here with the fix. And i dont think it will effect other properties. You can delete or disable it once we have fixed the issue.

@perrosnk
Copy link
Author

@ammarahm-ed sent you an email

@ammarahm-ed
Copy link
Owner

I will look into this very soon!!

@ammarahm-ed
Copy link
Owner

@perrosnk do you have anydesk/teamviewer installed? I am unable to access my admob account for some reason. I can maybe fix it on your system if possible.

@ammarahm-ed
Copy link
Owner

@ammarahm-ed
Copy link
Owner

ammarahm-ed commented Jun 15, 2020

https://github.com/ammarahm-ed/react-native-admob-native-ads/tree/fb-audience-fix

use this branch in your app. I think the issue with onUnifiedNativeAdLoaded not being called is fixed. Test and report back.

yarn add "https://github.com/ammarahm-ed/react-native-admob-native-ads.git#fb-audience-fix"

@ammarahm-ed
Copy link
Owner

Any updates on this @perrosnk

@perrosnk
Copy link
Author

@ammarahm-ed Sorry for the delay. Unfortunately it still is the same. It doesn't work

@ammarahm-ed
Copy link
Owner

ammarahm-ed commented Jun 19, 2020

Can you share the logcat report? @perrosnk . I have handled both errors above. Maybe now something else is causing the issue.

@perrosnk
Copy link
Author

06-19 04:37:29.900  1029  3189 W Ads     : App does not have the required permissions to get location
06-19 04:37:29.903  2705  3329 W Ads     : Not retrying to fetch app settings
06-19 04:37:29.945  1029  3353 E Ads     : Cannot determine request type. Is your ad unit id correct?
06-19 04:37:29.947  1029  3351 W Ads     : App does not have the required permissions to get location
06-19 04:37:29.950  2705  3329 I Ads     : Ad failed to load : 1
06-19 04:37:29.954  1029  1644 I Icing   : IndexChimeraService.getServiceInterface callingPackage=com.google.android.gms componentName=null serviceId=36 [CONTEXT service_id=21 ]
06-19 04:37:29.966  1029  1644 I Icing   : IndexChimeraService.getServiceInterface callingPackage=com.google.android.gms componentName=null serviceId=30 [CONTEXT service_id=21 ]
06-19 04:37:29.976  1029  2338 W Icing   : No valid account for uploading user actions [CONTEXT service_id=21 ]
06-19 04:37:29.981  1029  3349 I Ads     : SDK version: afma-sdk-a-v201604999.201604000.1
06-19 04:37:30.001  1029  2338 I Icing   : Usage reports ok 1, Failed Usage reports 0, indexed 0, rejected 0 [CONTEXT service_id=21 ]
06-19 04:37:30.004  1029  2338 W Icing   : No valid account for uploading user actions [CONTEXT service_id=21 ]
06-19 04:37:30.013  1029  2338 I Icing   : Usage reports ok 0, Failed Usage reports 0, indexed 0, rejected 0 [CONTEXT service_id=21 ]
06-19 04:37:30.170   365   551 D Sensors : batch handle 1, but there is no batch sensor in genymotion
06-19 04:37:30.372   365   365 D Sensors : batch handle 1, but there is no batch sensor in genymotion
06-19 04:37:30.836  2705  2705 D FacebookAdapter: onMediaDownloaded
06-19 04:37:30.869  2705  2705 E Ads     : Remote exception getting video controller aspect ratio.
06-19 04:37:30.869  2705  2705 E Ads     : android.os.RemoteException
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.ads.nonagon.ad.nativead.ak.h(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.ads.internal.formats.client.e.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:33)
06-19 04:37:30.869  2705  2705 E Ads     : 	at fk.onTransact(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:4)
06-19 04:37:30.869  2705  2705 E Ads     : 	at android.os.Binder.transact(Binder.java:604)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzgu.transactAndReadException(com.google.android.gms:play-services-ads-base@@19.2.0:10)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzadq.getAspectRatio(com.google.android.gms:play-services-ads-lite@@19.2.0:4)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzzc.getAspectRatio(com.google.android.gms:play-services-ads-lite@@19.2.0:5)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNNativeAdWrapper.setNativeAdToJS(RNNativeAdWrapper.java:174)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNNativeAdWrapper.access$100(RNNativeAdWrapper.java:26)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNNativeAdWrapper$3.onUnifiedNativeAdLoaded(RNNativeAdWrapper.java:120)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzagh.zza(com.google.android.gms:play-services-ads-lite@@19.2.0:6)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzafl.zza(com.google.android.gms:play-services-ads-lite@@19.2.0:18)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzgt.onTransact(com.google.android.gms:play-services-ads-base@@19.2.0:13)
06-19 04:37:30.869  2705  2705 E Ads     : 	at android.os.Binder.transact(Binder.java:604)
06-19 04:37:30.869  2705  2705 E Ads     : 	at fj.b(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:2)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.ads.internal.formats.client.au.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.ads.nonagon.ad.nativead.ac.run(Unknown Source:6)
06-19 04:37:30.869  2705  2705 E Ads     : 	at android.os.Handler.handleCallback(Handler.java:789)
06-19 04:37:30.869  2705  2705 E Ads     : 	at android.os.Handler.dispatchMessage(Handler.java:98)
06-19 04:37:30.869  2705  2705 E Ads     : 	at pt.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.google.android.gms.ads.internal.util.f.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:1)
06-19 04:37:30.869  2705  2705 E Ads     : 	at pt.dispatchMessage(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-19 04:37:30.869  2705  2705 E Ads     : 	at android.os.Looper.loop(Looper.java:164)
06-19 04:37:30.869  2705  2705 E Ads     : 	at android.app.ActivityThread.main(ActivityThread.java:6541)
06-19 04:37:30.869  2705  2705 E Ads     : 	at java.lang.reflect.Method.invoke(Native Method)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
06-19 04:37:30.869  2705  2705 E Ads     : 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
06-19 04:37:31.052  2705  2719 I zygote  : Background concurrent copying GC freed 194557(9MB) AllocSpace objects, 43(1480KB) LOS objects, 49% free, 10MB/20MB, paused 2.931ms total 190.403ms
06-19 04:37:32.122  2705  2705 D DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraNativeAdViewDelegateCreatorImpl
06-19 04:37:32.128  2705  2705 D DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdLoaderBuilderCreatorImpl
06-19 04:37:32.130  2705  2705 I Ads     : Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("28C844774F17E19AD06B5DCA7AEDD33C") to get test ads on this device.
06-19 04:37:32.156  2705  2705 D DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdLoaderBuilderCreatorImpl
06-19 04:37:32.159  2705  2705 I Ads     : Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("28C844774F17E19AD06B5DCA7AEDD33C") to get test ads on this device.
06-19 04:37:32.164  2705  3308 W Ads     : Not retrying to fetch app settings
06-19 04:37:32.180  1029  3349 W Ads     : App does not have the required permissions to get location
06-19 04:37:32.215  1029  3349 E Ads     : Cannot determine request type. Is your ad unit id correct?
06-19 04:37:32.227  2705  3326 W Ads     : Not retrying to fetch app settings
06-19 04:37:32.227  2705  3309 I Ads     : Ad failed to load : 1
06-19 04:37:32.262  1029  3349 W Ads     : App does not have the required permissions to get location
06-19 04:37:32.294  1029  3351 I Ads     : SDK version: afma-sdk-a-v201604999.201604000.1
06-19 04:37:32.809   365   365 D Sensors : batch handle 1, but there is no batch sensor in genymotion
06-19 04:37:32.866  2705  2770 W OkHttpClient: A connection to https://googleads.g.doubleclick.net/ was leaked. Did you forget to close a response body?
06-19 04:37:32.910  2705  2705 D FacebookAdapter: onMediaDownloaded
06-19 04:37:32.920  2705  2705 E Ads     : Remote exception getting video controller aspect ratio.
06-19 04:37:32.920  2705  2705 E Ads     : android.os.RemoteException
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.ads.nonagon.ad.nativead.ak.h(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.ads.internal.formats.client.e.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:33)
06-19 04:37:32.920  2705  2705 E Ads     : 	at fk.onTransact(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:4)
06-19 04:37:32.920  2705  2705 E Ads     : 	at android.os.Binder.transact(Binder.java:604)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzgu.transactAndReadException(com.google.android.gms:play-services-ads-base@@19.2.0:10)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzadq.getAspectRatio(com.google.android.gms:play-services-ads-lite@@19.2.0:4)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzzc.getAspectRatio(com.google.android.gms:play-services-ads-lite@@19.2.0:5)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNNativeAdWrapper.setNativeAdToJS(RNNativeAdWrapper.java:174)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNNativeAdWrapper.access$100(RNNativeAdWrapper.java:26)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.ammarahmed.rnadmob.nativeads.RNNativeAdWrapper$3.onUnifiedNativeAdLoaded(RNNativeAdWrapper.java:120)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzagh.zza(com.google.android.gms:play-services-ads-lite@@19.2.0:6)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzafl.zza(com.google.android.gms:play-services-ads-lite@@19.2.0:18)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.internal.ads.zzgt.onTransact(com.google.android.gms:play-services-ads-base@@19.2.0:13)
06-19 04:37:32.920  2705  2705 E Ads     : 	at android.os.Binder.transact(Binder.java:604)
06-19 04:37:32.920  2705  2705 E Ads     : 	at fj.b(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:2)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.ads.internal.formats.client.au.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.ads.nonagon.ad.nativead.ac.run(Unknown Source:6)
06-19 04:37:32.920  2705  2705 E Ads     : 	at android.os.Handler.handleCallback(Handler.java:789)
06-19 04:37:32.920  2705  2705 E Ads     : 	at android.os.Handler.dispatchMessage(Handler.java:98)
06-19 04:37:32.920  2705  2705 E Ads     : 	at pt.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.google.android.gms.ads.internal.util.f.a(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:1)
06-19 04:37:32.920  2705  2705 E Ads     : 	at pt.dispatchMessage(:com.google.android.gms.policy_ads_fdr_dynamite@[email protected]:0)
06-19 04:37:32.920  2705  2705 E Ads     : 	at android.os.Looper.loop(Looper.java:164)
06-19 04:37:32.920  2705  2705 E Ads     : 	at android.app.ActivityThread.main(ActivityThread.java:6541)
06-19 04:37:32.920  2705  2705 E Ads     : 	at java.lang.reflect.Method.invoke(Native Method)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
06-19 04:37:32.920  2705  2705 E Ads     : 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

@ammarahm-ed
Copy link
Owner

ammarahm-ed commented Jun 19, 2020 via email

@ammarahm-ed
Copy link
Owner

@perrosnk update me on this when you are free. Its a small bug, wont take much time hopefully

@perrosnk
Copy link
Author

@ammarahm-ed I have replied to your email

@ammarahm-ed
Copy link
Owner

@perrosnk just checked and replied back

@prasanthsd
Copy link

We are using everything default and onUnifiedNativeAdLoaded is never called on some android devices and on some others it gets called. We are testing with the test ads.

@ammarahm-ed
Copy link
Owner

@prasanthsd @perrosnk Can you test the fb-audience-fix branch now to see if it is working properly.

yarn add "https://github.com/ammarahm-ed/react-native-admob-native-ads.git#fb-audience-fix"

@perrosnk
Copy link
Author

perrosnk commented Jul 1, 2020

@ammarahm-ed No, it's not working. Same issues

EDIT: I am sending a link to compare the code that you published with the one saved one my mac https://www.diffchecker.com/6iChi9pq

@ammarahm-ed
Copy link
Owner

@perrosnk maybe we need to sit again on anydesk to fix this properly. Actually some part of the code was disabled, we need it for Admob ads, i think it is throwing exception there.

@ammarahm-ed
Copy link
Owner

Release a new version v0.3.1 today. test it and if you still face the same problem, share Log from Logcat.

@yaroslavnikiforov
Copy link

yaroslavnikiforov commented Jan 13, 2021

I have the same issue - onUnifiedNativeAdLoaded is never called when using mediation with Facebook Audience Network. And all Views are empty. Here is logs from Logcat:

2021-01-13 15:11:35.768 16032-16528/my.test.app I/ExoPlayerImpl: Init 3a8a88a [ExoPlayerLib/2.9.3] [lavender, Redmi Note 7, Xiaomi, 29]
2021-01-13 15:11:35.808 16032-16032/my.test.app D/ForceDarkHelper: updateByCheckExcludeList: pkg: my.test.app activity: my.test.app.MainActivity@34f700
2021-01-13 15:11:35.815 16032-16032/my.test.app D/ForceDarkHelper: updateByCheckExcludeList: pkg: my.test.app activity: my.test.app.MainActivity@34f700
2021-01-13 15:11:35.957 16032-16032/my.test.app D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraNativeAdViewDelegateCreatorImpl
2021-01-13 15:11:35.967 16032-16032/my.test.app D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdLoaderBuilderCreatorImpl
2021-01-13 15:11:35.972 16032-16032/my.test.app I/Ads: Use RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("FD4A656DDE3F095050B02BCF7B817612") to get test ads on this device.
2021-01-13 15:11:35.979 16032-17207/my.test.app W/roller.pregger: Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
2021-01-13 15:11:35.979 16032-16032/my.test.app W/roller.pregger: Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
2021-01-13 15:11:35.988 16032-17207/my.test.app I/AudioManager: In isSpeakerphoneOn(), calling application: my.test.app
2021-01-13 15:11:35.990 16032-17207/my.test.app D/AudioManager: getStreamVolume isRestricted mode = 0
2021-01-13 15:11:35.993 16032-17207/my.test.app D/AudioManager: getStreamVolume isRestricted mode = 0
2021-01-13 15:11:36.071 16032-17208/my.test.app W/roller.pregger: Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
2021-01-13 15:11:36.071 16032-17208/my.test.app W/roller.pregger: Accessing hidden method Lsun/misc/Unsafe;->getInt(Ljava/lang/Object;J)I (greylist, linking, allowed)
2021-01-13 15:11:36.071 16032-17208/my.test.app W/roller.pregger: Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
2021-01-13 15:11:36.072 16032-17208/my.test.app W/roller.pregger: Accessing hidden method Lsun/misc/Unsafe;->putInt(Ljava/lang/Object;JI)V (greylist, linking, allowed)
2021-01-13 15:11:36.072 16032-17208/my.test.app W/roller.pregger: Accessing hidden method Lsun/misc/Unsafe;->getObject(Ljava/lang/Object;J)Ljava/lang/Object; (greylist, linking, allowed)
2021-01-13 15:11:36.117 16032-17324/my.test.app W/roller.pregger: Accessing hidden method Lsun/misc/Unsafe;->putObject(Ljava/lang/Object;JLjava/lang/Object;)V (greylist, linking, allowed)
2021-01-13 15:11:36.117 16032-17324/my.test.app W/roller.pregger: Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
2021-01-13 15:11:36.179 16032-16032/my.test.app D/ForceDarkHelper: updateByCheckExcludeList: pkg: my.test.app activity: my.test.app.MainActivity@34f700
2021-01-13 15:11:36.698 16032-17292/my.test.app W/WavHeaderReader: Ignoring unknown WAV chunk: 1380533830
2021-01-13 15:11:36.698 16032-17292/my.test.app W/WavHeaderReader: Ignoring unknown WAV chunk: 1718449184
2021-01-13 15:11:36.718 16032-17332/my.test.app I/OMXClient: IOmx service obtained
2021-01-13 15:11:36.720 16032-17332/my.test.app I/ACodec: codec does not support config priority (err -2147483648)
2021-01-13 15:11:36.720 16032-17332/my.test.app I/ACodec: codec does not support config priority (err -2147483648)
2021-01-13 15:11:36.720 16032-17332/my.test.app I/ACodec: codec does not support config operating rate (err -2147483648)
2021-01-13 15:11:36.721 16032-17332/my.test.app W/ExtendedACodec: Failed to get extension for extradata parameter
2021-01-13 15:11:36.736 16032-17291/my.test.app V/AudioTrack: getMinFrameCount(): getMinFrameCount=3844: afFrameCount=1920, afSampleRate=48000, afLatency=80
2021-01-13 15:11:36.737 16032-17291/my.test.app V/AudioTrack: set(): streamType -1, sampleRate 48000, format 0x1, channelMask 0x1, frameCount 15376, flags #0, notificationFrames 0, sessionId 0, transferType 3, uid -1, pid -1
2021-01-13 15:11:36.737 16032-17291/my.test.app V/AudioTrack: set(): streamType -1 frameCount 15376 flags 0000
2021-01-13 15:11:36.737 16032-17291/my.test.app V/AudioTrack: set(): Building AudioTrack with attributes: usage=1 content=0 flags=0xa00 tags=[]
2021-01-13 15:11:36.759 16032-16528/my.test.app I/ExoPlayerImpl: Init 6800b9d [ExoPlayerLib/2.9.3] [lavender, Redmi Note 7, Xiaomi, 29]
2021-01-13 15:11:37.509 16032-17337/my.test.app W/WavHeaderReader: Ignoring unknown WAV chunk: 1380533830
2021-01-13 15:11:37.509 16032-17337/my.test.app W/WavHeaderReader: Ignoring unknown WAV chunk: 1718449184
2021-01-13 15:11:37.519 16032-17350/my.test.app I/OMXClient: IOmx service obtained
2021-01-13 15:11:37.521 16032-17350/my.test.app I/ACodec: codec does not support config priority (err -2147483648)
2021-01-13 15:11:37.522 16032-17350/my.test.app I/ACodec: codec does not support config priority (err -2147483648)
2021-01-13 15:11:37.522 16032-17350/my.test.app I/ACodec: codec does not support config operating rate (err -2147483648)
2021-01-13 15:11:37.523 16032-17350/my.test.app W/ExtendedACodec: Failed to get extension for extradata parameter
2021-01-13 15:11:37.538 16032-17336/my.test.app V/AudioTrack: getMinFrameCount(): getMinFrameCount=3844: afFrameCount=1920, afSampleRate=48000, afLatency=80
2021-01-13 15:11:37.538 16032-17336/my.test.app V/AudioTrack: set(): streamType -1, sampleRate 48000, format 0x1, channelMask 0x1, frameCount 15376, flags #0, notificationFrames 0, sessionId 0, transferType 3, uid -1, pid -1
2021-01-13 15:11:37.538 16032-17336/my.test.app V/AudioTrack: set(): streamType -1 frameCount 15376 flags 0000
2021-01-13 15:11:37.538 16032-17336/my.test.app V/AudioTrack: set(): Building AudioTrack with attributes: usage=1 content=0 flags=0xa00 tags=[]
2021-01-13 15:11:38.138 16032-16032/my.test.app D/FacebookAdapter: onMediaDownloaded
2021-01-13 15:11:38.180 16032-16527/my.test.app I/ReactNativeJS: 'onAdLoaded: ', {}

@ammarahm-ed
Copy link
Owner

Fixed on master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request work in progress
Projects
None yet
Development

No branches or pull requests

5 participants