-
Notifications
You must be signed in to change notification settings - Fork 348
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
Duplicate notifications when APNS receives invalid token #331
Comments
Alternatively, since the errors are all because the token is invalid, is there a way to get updates on when tokens are invalidated fast enough so that we don't have to find out when we send those notifications? |
I'm seeing the same issue with the latest published 2.7.0 gem. Users are occasionally receiving duplicate notifications even though we only create a single entry in the rpush_notifications table. |
I'm also frequently seeing duplicates notifications sent, not sure how to go about that. |
Same problem. From logs: |
Hi, is this still an issue? |
haven't looked at my logs in ages, happy to close and reopen if it comes up again for my part. |
Have the same issue with FCM. |
Hi there,
We're seeing people receive duplicate notifications with rpush 2.7.0. For example, here are some incomplete logs with the notification ID 8398879:
It looks like the APNS sender is sending a whole batch of notifications, but one notification in the batch is failing because its token is invalid. My understanding is that this causes APNS to shut off the connection, so rpush assumes that all notifications sent after the failing notification have not been sent and queues them for retry (hence the "will be retried due to the failure of notification" message).
For some reason, that assumption doesn't seem to be holding up, since we have multiple reports of users receiving the same notification 4-5 times, and as far as I can tell it's because they're in a batch of notifications sent that had a failure earlier in the batch.
Are duplicate notifications expected behavior? If yes, are there configuration settings that can reduce the incidence of these issues? Would decreasing the batch_size help? Is there a way to send notifications and sleep after each one to check for errors before moving on to the next one?
The text was updated successfully, but these errors were encountered: