AppLovin/AppLovin-MAX-React-Native

java.lang.NullPointerException - Attempt to invoke virtual method 'int android.view.View.getWidth()' on a null object reference

SergiOnGit opened this issue · 3 comments

MAX Module Version

5.4.0

React Native Version

0.71.8

Device/Platform Info

Android

Current Behavior

App crashes during opening page with native ad banner. Happened once on emulator, now crashlitycs shows issue with many user.

Expected Behavior

Not to crash

How to Reproduce

I don't know. I just know that it happens randomly on different devices and different android versions

Additional Info

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getWidth()' on a null object reference
at com.applovin.reactnative.AppLovinMAXNativeAdView.sizeToFit(AppLovinMAXNativeAdView.java:2)
at com.applovin.reactnative.AppLovinMAXNativeAdView.access$900(AppLovinMAXNativeAdView.java)
at com.applovin.reactnative.AppLovinMAXNativeAdView$NativeAdListener.lambda$onNativeAdLoaded$0(AppLovinMAXNativeAdView.java:60)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6694)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)

@alhiwatan I guess you fixed it. When do you plan new version? Would be great if you do it immediatelly.

@SergiOnGit - I can release it now.