kalisio / kNotify

Basic utils to support notifications (push, emails, etc.) for KDK-based applications and services
MIT License
4 stars 0 forks source link

Registration ID not correctly updated #11

Closed claustres closed 6 years ago

claustres commented 6 years ago

After mobile app reinstallation old registration IDs have been removed from SNS but no new ID is coming.

claustres commented 6 years ago

If the registration event is raised when the app is in background or closed what's happen ?

We should probably try to update the user device on each app launch to handle all use cases.

claustres commented 6 years ago

Already implemented: https://github.com/kalisio/kNotify/blob/master/src/client/index.js#L99.

claustres commented 6 years ago

Seems to have been related to an old version of the app being installed.

claustres commented 6 years ago

Found error in log: error: api/pusher - Method: create: Missing required key 'Token' in params MissingRequiredParameter: Missing required key 'Token' in params

claustres commented 6 years ago

Seems that the update device operation is sometimes called with a null ID: kalisio:kNotify:devices:service Devices service call for update null. This causes the old device to be removed from SNS without no new being registered.

Due to async operations the root cause might be that this code is executed before the device has been populated https://github.com/kalisio/kNotify/blob/master/src/client/index.js#L99 ?