OneSignal-Android-SDK icon indicating copy to clipboard operation
OneSignal-Android-SDK copied to clipboard

[Bug]: User tags missing - OneSignal.User.addTag("abc", "xyz")

Open ayushi-sk opened this issue 8 months ago • 6 comments

What happened?

I am using
OneSignal.User.addTag("abc", "xyz") to register tags of the user.

But tags for many users are missing on the dashboard.

Steps to reproduce?

Happened randomly

What did you expect to happen?

All tags should be registered

OneSignal Android SDK version

Release 5.1.34

Android version

15, 14, 13, 12, 11, 10, 9

Specific Android models


Relevant log output


Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

ayushi-sk avatar May 27 '25 04:05 ayushi-sk

Hello @ayushi-sk, thanks for reporting this issue.

We're currently looking into it, but we could use a bit more information to help diagnose the problem:

  1. How often does this occur—frequently or only occasionally?
  2. Does it happen more often for specific users or tags?
  3. Do you have any logs from when this happens? It’s possible that the tag addition failed, and the response codes could help us understand why.

Thanks in advance for your help!

jinliu9508 avatar May 27 '25 17:05 jinliu9508

Hello @jinliu9508 ,

  1. Frequently
  2. There is no such pattern observed. Happens randomly
  3. I tried reproducing this, but for me the tags were always present. But for production users, I see tags missing for a lot of users.

ayushi-sk avatar May 28 '25 04:05 ayushi-sk

Hello @ayushi-sk, I'm facing the same issue while using onesignal_flutter: 5.2.9. After setting the tags, they are unexpectedly getting deleted shortly after — regardless of the Android version. It seems like the tags aren't persisting for some reason.

Is there a known fix or workaround for this behavior?

ranim12 avatar Jun 23 '25 16:06 ranim12

Sorry, I couldn't find any workaround as of now.

ayushi-sk avatar Jun 24 '25 04:06 ayushi-sk

Could you share all the OneSignal methods you are calling and where in the code you are calling them?

I also want to callout that tags are part of the User and not the Subscription.

  • If you are calling OneSignal.login or OneSignal.logout out keep in mind you should aways be checking the OneSignal ID or the External Id.

jkasten2 avatar Sep 29 '25 18:09 jkasten2

Hi @jkasten2,

We are just using

  • OneSignal.initWithContext
  • OneSignal.User.addTag
  • OneSignal.User.removeTag

ayushi-sk avatar Oct 06 '25 03:10 ayushi-sk