Onesignal : discrepancy between player ids and sent notifications

28 Views Asked by At

I am using OneSignal to push notifications on Android/iOS through my Node.js backend.

It seems to work well, but I noticed some discrepancy between the number of player_ids included and the number of notifications marked as sent/delivered on OneSignal's dashboard.

As of consequence, there's plenty of times where some of the targeted end users don't receive a notification (even though all notifications are marked as "delivered" by OneSignal).

As an example :

  • For a given user, I have an array of subscriptionIds :
[
  '308839e3-d31f-486f-a0ed-445643a0abda',
  'baedc952-af1e-4dad-b45e-bc58b44c1d50',
  'd87726fa-3bf6-4904-9470-63e4b61e3753',
  '0afbb3ee-27e4-4cd4-b664-cad997d567b8',
  'cf29ef5a-c2ff-479c-8907-a953cecf79c2',
  '368959b9-991f-4dbf-aa9d-8fc708dc0f8f',
  'b71028ca-b2c0-4dc6-8dc4-4fa37a872242',
  'e91ba956-b6a1-408a-ad03-053fe5159bd1',
  '080109a1-1d66-4da4-9c36-8572f2590f5a',
  'c5d89cae-b12e-41fd-a0fb-23b222725405',
  '2bac197a-8193-4b19-85ef-2574a089bc3f',
  '9bdbe31a-7401-4b9b-9bef-ba4af966efd3',
  '6183b9b0-f7d4-4fb3-a20e-7740696e59af',
  'aa0b0be9-9f68-404b-90e5-80dd2a07d017'
]

However, on Onesignal's dashboard, only 3 notifications are delivered.

What is even weirder, is that I removed all but the last subscription Id (which is my phone, on which I didn't receive any notification). Then I successfully received the notification. But then I put back the original notification array and I still received notifications !!

To sum up : OneSignal seems to "select" some subscriptionIds in this array among others.

What might help : for test purposes, we were numerous to connect to the same account. Every time someone connects, I push a new subscription/player Id associated to that account in my db. However, on logout, it often happens that the deletion of the subscriptionId is unsuccessful. Is it required to properly manage the non-duplicated subscription Ids for a same device ?

0

There are 0 best solutions below