Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

NullPointerException calling IterableApi.initialize #616

Open
ruimendesM opened this issue Aug 21, 2023 · 6 comments
Open

NullPointerException calling IterableApi.initialize #616

ruimendesM opened this issue Aug 21, 2023 · 6 comments

Comments

@ruimendesM
Copy link

ruimendesM commented Aug 21, 2023

We recently launch our first version with Iterable SDK on it (version 3.4.14), and we have seen a small number of crashes on the app initialization.

The crash reports a NullPointerException when trying to run the method retrieveEmailAndUserId.
getKeychain can return null which can lead to this crash.
Can we maybe fallback gracefully on this case instead of crash?

image

Thanks.

@Ayyanchira
Copy link
Member

Hi @ruimendesM , thanks for writing in.

We will take a look into why it returned null and to add additional fallback.

Are there any reproducible steps to it or are these some random occurrence?
Are all of them on pixel 6a? Any additional pointers will be super helpful.

Thanks

@ruimendesM
Copy link
Author

Hello @Ayyanchira
Unfortunately I was not able to reproduce it yet.
It is not specific from Pixel 6a, as we have also seen crashes on an Hisense H40 (Android 10).

@Ayyanchira
Copy link
Member

Thanks for the inputs. Also what percentage of users are getting this crash?

@ruimendesM
Copy link
Author

It was a very small percentage.
Less than 1%, but it limits the user from opening the app as we saw multiple crashes associated to the same device.

@LoicJ
Copy link

LoicJ commented Sep 19, 2023

Hi team, we also got hundreds of crashes with v3.4.14.
Stacktrace looks like this:

Caused by java.lang.NullPointerException: Attempt to read from field 'java.lang.Object re.x0.d' on a null object reference in method 'void com.pepper.apps.android.app.PepperApplication.onCreate()'
       at com.iterable.iterableapi.IterableKeychain.getEmail(IterableKeychain.java:85)
       at com.iterable.iterableapi.IterableApi.retrieveEmailAndUserId(IterableApi.java:359)
       at com.iterable.iterableapi.IterableApi.initialize(IterableApi.java:512)
       at com.myapp..onCreate(MyApplication.kt:180)
       at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1285)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7261)
       at android.app.ActivityThread.-$$Nest$mhandleBindApplication()
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2296)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:240)
       at android.os.Looper.loop(Looper.java:351)
       at android.app.ActivityThread.main(ActivityThread.java:8427)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)

Any update ?

@Ayyanchira
Copy link
Member

Please try using the newly released 3.4.16. We have updated the crypto library to 1.1.0-alpha06 and added some null checks to avoid crashes.
Please update this issue if crashes still occur. Will keep this issue active for some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants