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

[Bug]: OneSignal.Default.PushSubscriptionState.userId return null #343

Open
2 of 3 tasks
ChoyWingLun opened this issue Nov 25, 2022 · 1 comment
Open
2 of 3 tasks

Comments

@ChoyWingLun
Copy link

What happened?

I am testing on my android phone and sometimes I found that OneSignal.Default.PushSubscriptionState.userId return null and I am not able to add tags to my subscription.

Steps to reproduce?

1. Using OneSignalSDK.Xamarin 4.1.3 and Xamarin Forms 5.0.0.2515

What did you expect to happen?

Return userId to me so that I can add my tag to the subscription.

OneSignal Xamarin SDK version

Release 4.1.3

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jkasten2
Copy link
Member

jkasten2 commented Dec 1, 2022

@ChoyWingLun PushSubscriptionState.userId might be null as the SDK may have not gotten the id yet. However you can use PushSubscriptionStateChanged to get this value when it becomes available.

If you still don't get the value you will need to check the Android logcat for any errors to find out the reason for why it didn't get an id.

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