-
Notifications
You must be signed in to change notification settings - Fork 368
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 boolean com.onesignal.OneSignal$Builder.mPromptLocation #811
Comments
Small update: Crash occurs also when app is in background randomly. |
Howdy, |
As we need to have a dynamic key for initialization, do we need to init it during the onCreate() of Application class, or it can be initialized anytime as long as the initialization occurs in Application class? |
We're having the same issue. Happens when resuming to application after longer time being in background.
Android 8 |
To reproduce on Android 8 : EDIT : I also noticed that when you set autoPromptLocation property to true or false problem goes away. EDIT2 : Problem still persists in production after setting autoPromptLocation property. |
Same issue with 3.11.1, i have too many crash (1% of user bases) |
3.10.6 is stable ? |
Well it crash less than 3.11.1 |
When you initialize the OneSignal SDK it should be done within an extended For Example:
This gives our SDK the application context, instead of activity context, which is suspected to be causing these issues. Please confirm that this is similar to how you are initializing the OneSignal SDK in your app. A link to this setup is shown below, but it is easy to mistake calling Another case I can think of is that you're using the Privacy Consent for our SDK and the builder is not being setup for some reason. Are you using our Privacy Consent methods? |
Hi, SDK is initialised within onCreate(). We rolled back to 3.10.6 and crashing is gone. We are using Privacy Consent methods. |
We are rolling back for now because we cannot init during onCreate, as we first need to request the key from our server (it is dynamic depending on the region). |
We are facing this same issue running 3.10.9
|
Further investigation led to finding the root cause, this should be fixed in the next release. |
@mikechoch Will we be able to keep the init of the OneSignal SDK inside the onCreate of Activity (or is it mandatory to do it inside the Application class) in the next release ? |
@smartties It is highly recommend to init the OneSignal SDK from the If for some reason you can't init from the |
@mikechoch any plan to fix this bug for Unity SDK ? Cause as I seen UnitySDK still use an old version, and my game currently have many crashes from this exception. |
We will release a new Unity SDK version very soon! Thanks for your patience |
Just following up to note that this issue was fixed in version 3.11.2 |
Gradle:
Getting the same error even though I am not using OneSignal. That is I have not called OneSignal.startInit() or used any OneSignal class. Do I need to call OneSignal.startInit() even though I am not using it? |
@KristapsKrumins Can you share your full stacktrace and steps to reproduce the crash? |
Hello guys, a friend introduced me to Onesignal as a better platform for push messaging, i have been using it for a month now but this crash error keeps popping up : Caused by: java.lang.NullPointerException: Please any solution yet??? |
@jkasten2
I have not been able to reproduce the crash, but it is the most common crash in Crashlytics after we updated from 3.6.5 to 3.11.2. OneSignal is included in core module. |
Has this issue been resolved in 3.11.2 ? We are also getting lot of these issues. |
3.11.2 still crash |
We are facing same issue on unity sdk 2.8.2 version. We are not using Privacy consent methods and can't reproduce it. It is only shows on analytics. I don't think it is related to privacy consent. |
When can we expect a new sdk for unity with this bug fix? |
Onesignal has become the hero of my ANRs & crashes reports on Play Store with this issue
Getting the crash on: I hope there will be a quick update for this issue! |
Same here, hope it doesn't ruin my installs again..
…On Sun, Aug 25, 2019, 15:12 Muhammed Ballan ***@***.*** wrote:
Onesignal has become the hero of my *ANRs & crashes* reports on Play
Store with this issue
Caused by: java.lang.NullPointerException:
at com.onesignal.OneSignal.startLocationUpdate (OneSignal.java:865)
at com.onesignal.OneSignal.startRegistrationOrOnSession (OneSignal.java:846)
at com.onesignal.OneSignal.doSessionInit (OneSignal.java:761)
at com.onesignal.OneSignal.onAppFocus (OneSignal.java:1222)
at com.onesignal.ActivityLifecycleHandler.handleFocus (ActivityLifecycleHandler.java:207)
at com.onesignal.ActivityLifecycleHandler.onActivityResumed (ActivityLifecycleHandler.java:121)
at com.onesignal.ActivityLifecycleListener.onActivityResumed (ActivityLifecycleListener.java:78)
Getting the crash on:
Android 9.0
Android 8.1
Android 8.0
Android 7.0
Android 6.0
Android 7.1
Android 4.4
Android 5.1
Android 5.0
[image: Screen Shot 2019-08-25 at 4 36 36 PM]
<https://user-images.githubusercontent.com/735154/63650746-c5bb1d80-c756-11e9-95c6-7d1df0d09a70.png>
I hope there will be a quick update for this issue!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#811?email_source=notifications&email_token=ALR7DQREAXCN6VOQVYKOZT3QGKHLVA5CNFSM4IFXK532YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5CULMI#issuecomment-524633521>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALR7DQXQ74VWQHRM3SD7UFTQGKHLVANCNFSM4IFXK53Q>
.
|
Same here, i have been waiting for a fix now over a month, very scary... |
Xamarin.android has the same problem. Why is that even close without a proper fix? Can you please advise? |
@iballan Can you please confirm if the new release fixed this issue? |
Howdy @EmilAlipiev , |
Facing same issue in One signal flutter SDK |
Any updates on this one? |
Hello, I am getting this error:
gradle :
reproduction:
Exception sometimes occurs when clicking on a notification and user is logged out.
The text was updated successfully, but these errors were encountered: