You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Non-fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object.
at OneSignalSDK.OneSignalAndroid.get_PushSubscriptionState(OneSignalSDK.OneSignalAndroid)
Steps to reproduce?
Happens sometimes with Android 13 devices
What did you expect to happen?
no NullReferenceException.
Unity version
2021.3.24f1
OneSignal Unity SDK version
3.0.7
Platform
Android
Relevant log output
Non-fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object.
at OneSignalSDK.OneSignalAndroid.get_PushSubscriptionState(OneSignalSDK.OneSignalAndroid)
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
oliverebert
changed the title
[Bug]: NullReferenceException at OneSignalSDK.OneSignalAndroid.get_PushSubscriptionState on Adroid
[Bug]: NullReferenceException at OneSignalSDK.OneSignalAndroid.get_PushSubscriptionState on Android
Jun 12, 2023
Had same problem !
Now using 3.0.9 SDK
and this code for Init and Prompt
internal async void InitializeOneSignal()
{
Debug.Log("Starting One Signal Init !");
OneSignal.Default.Initialize(m_OneSignalAppId);
var result = await OneSignal.Default.PromptForPushNotificationsWithUserResponse();
Debug.Log("Notifications_PermissionChanged - " + result);
}
and its working :) also i am on Unity 2022.3.x if it helps :)
What happened?
Some of our users with Android 13 get this error:
Non-fatal Exception: java.lang.Exception: NullReferenceException : Object reference not set to an instance of an object.
at OneSignalSDK.OneSignalAndroid.get_PushSubscriptionState(OneSignalSDK.OneSignalAndroid)
Steps to reproduce?
What did you expect to happen?
no NullReferenceException.
Unity version
2021.3.24f1
OneSignal Unity SDK version
3.0.7
Platform
Android
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: