-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pinpoint deletes user endpoints when React-Native app is closed #12568
Comments
To add more context to this ticket, here is to operations we do that lead to the bug. We want to push a notification to a user based on a lambda trigger. But, we can still send and receive notification through the pinpoint test messaging console. |
Hello @MensurRasic, and thank you for providing detailed context and reproduction steps. Just to get further details on reproducing the issue, are you closing down the app before any events are flushed from the buffer? |
@MensurRasic, can you clarify if you're using authenticated or unauthenticated users? In the event of unauthenticated users, it's possible that Push Notifications still work because of an endpoint being tied to the device token... but the killing of the app then causes the user to be incorrect once it's rebooted. |
@cwomack In my scenario I was using an authenticated user.. And the user session was still there even after closing/re-opening the app. I was not able to retrieve user endpoints after the second time I kill the app. But here are my findings and alternative I took. Observation So I decided to retrieve endpoints before sending the notification using the pinpoint function GetUserEndpoints, in order to get all the user endpoints and send the user a notification on all his devices... But unfortunately, there seem to be a problem with those pinpoint functions to retrieve endpoints by passing the userID. As mentioned, after the second time I was killing the mobile app, the function So I took the endpointID that was working initially on the first run (before killing the app twice) and I was able to push notification to endpoints using the AWS Pinpoint console. So I was wondering how it was possible for the device to receive those notifications from the pinpoint console but the function So I wrote another function, but this time I was using SendMessages function.. and it was working 100% of the time even when Alternative The alternative is working great on iOS and Android... but the pinpoint functions mentioned above are clearly buggy and not working properly as suggested by the documentation. Hopefully this can give you a more insight on the bug. |
@MensurRasic, we are looking into this again after thinking it may be related to what's reported on the v6 side within #13174. Not sure if you've had the chance to upgrade to v6, but curious if you're seeing the same behavior still in v6 that is reported in that issue. Would love to get any additional context or confirmation from you if so! |
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Analytics
Amplify Categories
analytics, notifications
Environment information
Describe the bug
I have a react native app using amplify analytics/notifications to push notifications to users. But there seems to be a bug where pinpoint delete constantly user endpoints without any specific logic when I open the app and kill it instantly.
This is impacting our user experience since we cannot be consistent with our logic regarding push notifications.
I reproduced this bug and everytime I kill the app, reopen it, the user endpoints are deleted for further new notifications.
Expected behavior
Pinpoint shouldn't be deleting user endpoints when the user close the react-native app.
Reproduction steps
Code Snippet
// Put your code below this line.
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
iPhone 8, iPhone XR, iPhone 14 pro
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: