Missing Device Registration

Hi,

Some users don’t have a DeviceRegistration associated with their user account.

Is this normal or expect and how can we find where this relationship is established?

Innocent.

Hi @Innocent_Nwaukwa

The relationship establishes when you run RegisterDevice API with logged in user (there should be the “user-token” header in the request)

Would that mean that the token is missing if the device registration relationship for that user is empty while they’re logged in?
I’ve tested myself that I have a relation to device registration associated with my User entry in the db when I’m logged in and the relation deletes from that entry when I log out.
Issue is some users don’t get any relation when they login and that’s caused issues because we can’t send notifications to them with no device registration object related to them.

Hi @Innocent_Nwaukwa,

The device is always connected to user during the device registration if the user was previously logged in. But the relation between the device and the user shouldn’t be deleted when user logs out.
Could you please clarify the steps to reproduce this issue?

Regards,
Olha

It’s difficult to specify how to recreate the issue.
I can give an object ID: A1061551-F7DA-4F92-B7A2-CD3F732C80C8.

That user has been deleted before and recreated his account and the issue persists.
You could try creating new user objects or signing up on our platform and testing.

It’s the fact that some don’t have registration relations even after deleting those user objects and having them signup all over again.

Innocent.

Hello @Innocent_Nwaukwa,

I see that there are values set in the expiration column of the DeviceRegistration table. It looks like when you register a device, you pass this value, and when the expiration time passes, the device is automatically deleted.
This expiration value is optional.

Regards,
Stanislaw

Oh, I’m assuming unsetting the value in the expiration column would resolve the issue then?
Including ain’t back in previously deleted services when the users re-register.

Yes, unsetting the value should prevent disappearing of records from DeviceRegistration in the future.
For the user that was recreated, it is not enough just to register him, you also need to register his device.

1 Like

Which API would explicitly perform the device registration?

https://backendless.com/docs/js/push_device_registration.html

1 Like

Perfect!!
Thank you so much.

Back again:
I’ve got a few uncertainties regarding this.

  1. Where does the Device Registration entry get created and how does it get automatically assigned because we’re not explicitly doing this. We’re calling the /users/register in our User/registerUser endpoint.
  2. A vast majority (over 99%) of Device registration objects expire in June this year and yet, some users are registering and signing in without any Device Registration being assigned.

Sorry to reopen this, I should’ve been more thorough but this inconsistency just isn’t making sense in my head.

Innocent.

Hello @Innocent_Nwaukwa

Are you using some of SDK, and if yes which?

We’re just calling our Users/registerUser endpoint.
This is our application ID: A1061551-F7DA-4F92-B7A2-CD3F732C80C8.
We don’t explicitly create the device registration entries.

I don’t know how these entries are created so that’s what I would like to know.
That and how they’re assigned.
We don’t do any of those explicitly.

Hello @Innocent_Nwaukwa

I’ve created an internal ticket BKNDLSS-32017 to investigate your problem.

Regards

Awesome!
Thanks, this has been a head scratcher.

Hi,

Just checking on progress regarding the ticket BKNDLSS-32017.

Innocent.

Hello @Innocent_Nwaukwa
Thanks for your patience. I checked the status of the ticket - it’s in active progress for a few days, so it will be resolved shortly
Regards

Awesome!
Thanks for the update.

2 Likes