didomi / react-native

Didomi SDK for React Native
Other
9 stars 2 forks source link

java.lang.NullPointerException ARN #33

Closed ChengZh98 closed 2 years ago

ChengZh98 commented 2 years ago

Hi, i m having many ARN related to

java.lang.NullPointerException: at java.util.Objects.requireNonNull (Objects.java:228) at com.reactnativedidomi.DidomiModule$setupUI$1.run (DidomiModule.java:278) at android.os.Handler.handleCallback (Handler.java:888) at android.os.Handler.dispatchMessage (Handler.java:100) at android.os.Looper.loop (Looper.java:213) at android.app.ActivityThread.main (ActivityThread.java:8178) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1101)

Can you do something about it? The logs says that the problem is located here :

DidomiModule.java line 278
com.reactnativedidomi.DidomiModule$setupUI$1.run

Thanks.

pmerlet-at-didomi commented 2 years ago

Hello, we will publish a fix so it does not crash. This is probably because SetupUI is called at a time when your app is not active (currentActivity returns null), so you may check if notice is correctly displayed after the fix. It is possible that the call to SetupUI is done while the application is not ready yet, or when the user already left the app.

pmerlet-at-didomi commented 2 years ago

Should be fixed in version 1.7.0