-
Notifications
You must be signed in to change notification settings - Fork 61
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
[Bug]: NullReferenceException : Object reference not set to an instance of an object - GetTags #472
Comments
Hey @RaphaelNSG can you tell me more about the device you tested this on? The device model and which version of Android you used would be great. |
Hey @adamschlesinger sorry for the delay. Actually this error is happening on Android and IOS in many devices. For exemple:
|
IOS error:
|
@RaphaelNSG Thanks for the stacktrace, however it doesn't provide any extra details to investigate. Could you share where and how you are calling GetTags? Could you share some of your code? We have a new 3.0.1 version, could you also tell us if the issue happens there as well? |
@jkasten2 I figure out that the public static async void SendIncrementalData(string key)
{
Dictionary<string, object> tags = await OneSignal.Default.GetTags();
if (tags.ContainsKey(key))
{
int value = int.Parse(tags[key].ToString());
value++;
OneSignal.Default.SendTag(key, value.ToString());
}
else
{
OneSignal.Default.SendTag(key, "1");
}
} Can the result of |
Hi @RaphaelNSG yes the object returned by |
@adamschlesinger thanks for the answer, but this is new because in the older version this never happened, so it might be a good idea to update the documentation with this information. |
@RaphaelNSG definitely! We're also going to evaluate if this is ideal behavior or not. |
Closing this issue as it has gone stale. We haven’t seen any further reports of this. Please try upgrading the OneSignal SDK if you or anyone is still having this issue. If this is still an issue, please open a new report with updated information. |
What happened?
I updated my project to OneSignal 3.0 and everything was working fine, but some users are reporting an error. It seems related with
GetTags
method, but i don't know what is causing this error.Steps to reproduce?
What did you expect to happen?
I expected to call the
GetTags
method and receive no error.Unity version
2019.4.35f1
OneSignal Unity SDK version
3.0.0
Platform
Android and IOS
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: