OneSignal1. Get UserID giving randomly -1

There is issue with the Onesignal block when calling Onesignal_push1 .GetUserID upon registering new user. Randomly, random user gets a value -1
I’ve tested myself, and around of 10 registrations, 2,3 times the notification ID will be -1. It’s block issue. Can Niotron look at it ?

Try this :point_down:

This doesnt look like a solution. Registration can take long time or get stuck in a loop.

Anything else or any extensions available for OneSignal ?

Another question is, according to OneSignal Support

Currently, our system assigns player id automatically to devices. If an app is uninstalled, then the token associated to that device gets invalidated hence the device can't be targeted with notifications. Once the device is reinstalled with the OneSignal SDK, a new device gets created with a newly generated player id and valid token.

How can we make this logic to be handled from the GetUserID is used just for registering

Onesignal take some time to create User id (When app open first time). You can’t get it instantly.

Sometimes gets it instantly

OneSignal has the consent granted method which until you call provideUserConsent(true) , the SDK will not fully initialize, and will not send any data to OneSignal.