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

Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'void io.branch.referral.Branch$BranchReferralInitListener.onInitFinished(org.json.JSONObject, io.branch.referral.BranchError)' on a null object reference(short issue description) #1043

Open
vabhatia opened this issue Feb 7, 2023 · 0 comments

Comments

@vabhatia
Copy link

vabhatia commented Feb 7, 2023

Describe the bug

We are seeing ~100 crashes per day with the following stack trace.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'void io.branch.referral.Branch$BranchReferralInitListener.onInitFinished(org.json.JSONObject, io.branch.referral.BranchError)' on a null object reference
       at io.branch.referral.ServerRequestRegisterOpen.handleFailure(ServerRequestRegisterOpen.java:95)
       at io.branch.referral.Branch$BranchPostTask.onRequestFailed(Branch.java:2443)
       at io.branch.referral.Branch$BranchPostTask.onPostExecuteInner(Branch.java:2333)
       at io.branch.referral.Branch$BranchPostTask.onPostExecute(Branch.java:2317)
       at io.branch.referral.Branch$BranchPostTask.onPostExecute(Branch.java:2276)
       at android.os.AsyncTask.finish(AsyncTask.java:771)
       at android.os.AsyncTask.access$900(AsyncTask.java:199)
       at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8663)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Steps to reproduce

From Firebase logs, it looks like the app is crashing soon after launch and a lot of instances suggest this as the first launch post update.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'void io.branch.referral.Branch$BranchReferralInitListener.onInitFinished(org.json.JSONObject, io.branch.referral.BranchError)' on a null object reference
       at io.branch.referral.ServerRequestRegisterOpen.handleFailure(ServerRequestRegisterOpen.java:95)
       at io.branch.referral.Branch$BranchPostTask.onRequestFailed(Branch.java:2443)
       at io.branch.referral.Branch$BranchPostTask.onPostExecuteInner(Branch.java:2333)
       at io.branch.referral.Branch$BranchPostTask.onPostExecute(Branch.java:2317)
       at io.branch.referral.Branch$BranchPostTask.onPostExecute(Branch.java:2276)
       at android.os.AsyncTask.finish(AsyncTask.java:771)
       at android.os.AsyncTask.access$900(AsyncTask.java:199)
       at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.app.ActivityThread.main(ActivityThread.java:8663)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Expected behavior

No crash is expected.

SDK Version

5.2.0

Make and Model

Multiple Devices

OS

All OS versions above 7

Additional Information/Context

No response

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

No branches or pull requests

1 participant