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

java.lang.NullPointerException: Attempt to invoke virtual method 'void com.onesignal.OSOutcomeEventsController.sendSavedOutcomes()' on a null object reference #1551

Closed
TaoGEe opened this issue Mar 18, 2022 · 3 comments

Comments

@TaoGEe
Copy link

TaoGEe commented Mar 18, 2022

Description:

hi, I found this crash from firebase crashlytics, i can not reproduct it.please have a look

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.onesignal.OSOutcomeEventsController.sendSavedOutcomes()' on a null object reference
at com.onesignal.OneSignal.init(OneSignal.java:837)
at com.onesignal.OneSignal.setAppId(OneSignal.java:692)
at com.onesignal.OneSignal.reassignDelayedInitParams(OneSignal.java:1136)
at com.onesignal.OneSignal.onRemoteParamSet(OneSignal.java:844)
at com.onesignal.OneSignal$6.complete(OneSignal.java:1077)
at com.onesignal.OneSignalRemoteParams.processJson(OneSignalRemoteParams.java:206)
at com.onesignal.OneSignalRemoteParams.access$100(OneSignalRemoteParams.java:12)
at com.onesignal.OneSignalRemoteParams$1.onSuccess(OneSignalRemoteParams.java:151)
at com.onesignal.OneSignalRestClient$5.run(OneSignalRestClient.java:283)
at java.lang.Thread.run(Thread.java:764)

Environment

OneSignal:4.6.3

image

image

@nan-li
Copy link
Contributor

nan-li commented Mar 18, 2022

Hi @TaoGEe,

Thank you for reporting. This issue has been reported by others and tracked here: #1514.

Can you share some information?
Did you start seeing this crash after updating the OneSignal-Android-SDK? If this started after updating, what version were you on before?

@TaoGEe
Copy link
Author

TaoGEe commented Mar 21, 2022

I think the cause of this issue is put the onesignal initialization code into other thread.
image

@nan-li
Copy link
Contributor

nan-li commented Apr 8, 2022

Hi @TaoGEe,

A fix for this crash has been released in version 4.7.1.

I will close this issue for now, please upgrade and reach out if you are still experiencing crashes.

@nan-li nan-li closed this as completed Apr 8, 2022
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

2 participants