Possible error in FacebookAdapter 5.8.0
See original GitHub issueI think that there is an error in Facebook adapter related to mapping Facebook native ad to the mapper. Please take a loot at mapNativeAd method in FacebookAdapter.java class. When isNativeBanner is true it maps data from mNativeBannerAd only. But when isNativeBanner is false it maps headline, body text, images from mNativeAd and, for some reason, it maps icon from mNativeBannerAd. It looks like it should map icon from mNativeAd but not from mNativeBannerAd. We are having crashes because of this:
Non-fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'com.facebook.ads.NativeAdBase$Image com.facebook.ads.NativeAdBase.getAdIcon()' on a null object reference
at Message.Attempt to invoke virtual method 'com.facebook.ads.NativeAdBase$Image com.facebook.ads.NativeAdBase.getAdIcon()' on a null object reference(NativeAdBase.java)
at Message.Attempt to invoke virtual method 'com.facebook.ads.NativeAdBase$Image com.facebook.ads.NativeAdBase.getAdIcon()' on a null object reference(NativeAdBase.java)
at com.google.ads.mediation.facebook.FacebookAdapter$AppInstallMapper.mapNativeAd + 1006(FacebookAdapter.java:1006)
at com.google.ads.mediation.facebook.FacebookAdapter$NativeListener.onAdLoaded + 779(FacebookAdapter.java:779)
at com.facebook.ads.redexgen.X.YF.A01 + 65983(YF.java:65983)
at com.facebook.ads.redexgen.X.21.run + 4734(21.java:4734)
at android.os.Handler.handleCallback + 883(Handler.java:883)
at android.os.Handler.dispatchMessage + 100(Handler.java:100)
I tried to debug and it seems that the icon present in mNativeAd but doesn’t present in mNativeBannerAd.
Could you please clarify is it a bug or it is intended and icon should be mapped from different class?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
Integrate Meta Audience Network with bidding | Android
Failed to create a native ad from the bid payload. The Meta Audience Network SDK failed to present their interstitial/rewarded ad.
Read more >A warning message is output in the new version of Xcode.
AdMob uses cocoapods, facebook SDK is carthage, FacebookAdapter and FBAudienceNetwork are static libraries. If I build in Xcode after setting as ...
Read more >Audience Network SDK for Android Change Log
Bug fixes. Fixed Error: java.lang.IllegalStateException: The specified child already has a parent. Fixed missing onAdClicked() callback for some ads.
Read more >Facebook audience network android sdk - Weebly
4.3.13 5.8.0 2020/04/20 • Init process improvements 4.3.12 5.8.0 2020/04/06 ... If the AdMob dashboard shows pending or error status for more than...
Read more >Re: [google-admob-ads-sdk] Digest for ... - Google Groups
Admob mediation on iOS (Facebook, InMobi) - error "Undefined symbols for ... objc-class-ref in FacebookAdapter(GADFBNativeAd.o) ... If 5.8.0 or lower.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for fix and quick response.
I am curious about how to prevent similar issues in the future. Refactoring code with wrong field names could break library again. And the fix for issue doesn’t include any test or any other checks. Is there any plan to add integration test or code analysis to catch this kind of issue before release?
Hi All The fix should be live now with the Facebook Android adapter version 5.8.0.2 release.