Skip to content
New issue

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

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

Already on GitHub? # to your account

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

Closed
SergiOnGit opened this issue May 26, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@SergiOnGit
Copy link

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)

@SergiOnGit
Copy link
Author

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

@thomasmso
Copy link
Member

@SergiOnGit - I can release it now.

@thomasmso
Copy link
Member

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants