mobfox / MobFox-Android-SDK

26 stars 21 forks source link

Facebook Custom Event FATAL EXCEPTION: AbstractMethodError #65

Closed freakBoy008 closed 7 years ago

freakBoy008 commented 7 years ago

Dear MobFox-Github-Team,

MobFox is my base network, i want to use Facebook as a mediation network. Everything is fine and i can get Facebook Ads. But right after my app shows the Facebook Ad it crashes immediately. According to this stackoverflow issue: https://stackoverflow.com/questions/46022404/facebook-audience-sdk-causing-crash it's an adapter problem. I get this similar error on logcat:

09-21 13:00:33.683 19041-19041/E/AndroidRuntime: FATAL EXCEPTION: main PID: 19041 java.lang.AbstractMethodError: abstract method not implemented at com.mobfox.sdk.customevents.Facebook$1.onLoggingImpression(Facebook.java) at com.facebook.ads.AdView$1.b(Unknown Source) at com.facebook.ads.internal.DisplayAdController$9.onBannerLoggingImpression(Unknown Source) at com.facebook.ads.internal.adapters.h$2.d(Unknown Source) at com.facebook.ads.internal.adapters.a.a(Unknown Source) at com.facebook.ads.internal.adapters.h$1.b(Unknown Source) at com.facebook.ads.internal.view.c$1.a(Unknown Source) at com.facebook.ads.internal.j.a$b.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:808) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5333) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640) at dalvik.system.NativeStart.main(Native Method)

I tried different versions of Facebook Audience SDK and MobFox SDK it didn't help me. It would be great, if this could be solved.

Thanks, freakBoy008

nabriski commented 7 years ago

Hi, I think we already have the fix for this in the works. Hope we can release it next week.

freakBoy008 commented 7 years ago

Hey,

thanks for the quick response, i am facing two other Problems too; if using the latest MobFox SDK 3.2.8b i can't get any test ads by using the test hash. Logcat tells me "no ad" and if i activate the smart banner, it tells me "smart banner supports 50, 90 heights" although all my banners have this heights. The problem is only with the latest release.

Second one is an another problem with custom events(not only Facebook), i don't enable smart banner but i always get full width custom event ads in my second activity. But MobFox test ads are appearing correctly in it. I'm using the sizes 320x50 and 728x90(for tablets).

Thank you again, freakBoy008

nabriski commented 7 years ago

Hi, Can you please paste here your integration code and layout xml? We'll try to reproduce this.

Thanks

freakBoy008 commented 7 years ago

Hey, of course:

banner = (Banner) findViewById(R.id.banner); banner.setInventoryHash("fe96717d9875b9da4339ea5367eff1ec"); banner.setRefresh(30); banner.load(); banner2 = (Banner) findViewById(R.id.banner2);

this part is in the second activity: banner2.setInventoryHash("fe96717d9875b9da4339ea5367eff1ec"); banner2.setRefresh(30); banner2.load();

xml: <RelativeLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.6" android:layout_marginRight="64dp" android:layout_marginEnd="64dp">

            <com.mobfox.sdk.bannerads.Banner
                android:layout_height="50dp"
                android:layout_width="320dp"
                android:id="@+id/banner"
                mobfox:smart="true"
                android:layout_centerHorizontal="true">
            </com.mobfox.sdk.bannerads.Banner>

` <RelativeLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="0.2" android:orientation="vertical" android:layout_gravity="start">

            <com.mobfox.sdk.bannerads.Banner
                android:layout_height="90dp"
                android:layout_width="728dp"
                android:id="@+id/banner2"
                android:layout_alignParentBottom="true"
                android:layout_alignParentRight="true"
                android:layout_alignParentEnd="true">
            </com.mobfox.sdk.bannerads.Banner>

`

brachil commented 7 years ago

Can you please try the following jar and let us know if it solves the issue:

http://static.starbolt.io/MobFox-Android-SDK-Core-3.2.8b_fix.jar

freakBoy008 commented 7 years ago

Hey,

thanks, the problem with Facebook is solved now, no more crashes with the new adapter i received.

The second problem is solved too. I can receive MobFox test ads with and without enabling smart banner.

The last one is still existing, sometimes it appears as expected without enabling smart banner and sometimes it shows a full width banner. Smart banner is not enabled in both cases. Problem occurs in both portrait/landscape mode. But only my second activity is affected by this. Banners in the first activity are appearing correctly. I've done cleans/rebuild, no success. Also i completely uninstalled the app on the test devices and reinstalled it, no success.

Best regards, freakBoy008

brachil commented 7 years ago

Does that happen when when you use mobfox banner implementation or facebook adapter? Is your code implementation different between activity's? if you are using mobfox banner can you please send us a screenshot?

freakBoy008 commented 7 years ago

Hey,

thanks for the response, my implementation is the same as i posted above, it's releated to all custom events not only Facebook. Here is the one with Amazon test ad:

screenshot_2017-09-25-12-09-56

But it should appear like this: screenshot_2017-08-31-14-46-33

freakBoy008 commented 7 years ago

I could get it work now, it's not placed in the middle like second screenshot above but i'm satisfied with this:

screenshot_2017-09-26-15-34-37

Thanks a lot for the support! It was my mistake please excuse me for the trouble.

Best regards, freakBoy008

nabriski commented 7 years ago

Happy to help. We still need to formally release all the corrections and examine our custom events in this context.

brachil commented 7 years ago

You can now use latest release 3.2.8c and new facebook adapter.