Clients getting a "push notification failed"

I am currently using the expo server SDK to throttle my notifications, but am sending a large number of notifications at once (~3000-5000 currently). Reciepts seem to show as mostly ok, but deliverability seems to be only at about 20-30% of registered tokens.

I asked some of my users if the received, and a huge number said that when they opened the app, the got a “push notification failed” message.

Am I doing something wrong? Can I do something to improve deliverability for notification blasts?

Is this an error you have built into your own push notification sending code? Or is there a response from Expo’s servers that you’re receiving?

The FAQ covers how to get informative errors from push notifications: Push notifications troubleshooting and FAQ - Expo Documentation

This is what a lot of client devices are seeing when launching the app after the notification was sent. They did not get the push, but they get that error on app launch.

two days ago exp.host sometimes returned 504 bad gateway, but not really long times. i think u need check u code. sdk42, eas, no problem with push.
p.s. problem only with android, or and ios too?

1 Like

Right, but expo-notifications doesn’t have code to show an error message like that when a push notification fails, so I think you need to take a look at your code, and try and see what the error message you’re getting from the APIs you’re using is

1 Like

Nothing on my sever side showed any errors, in fact it showed that everything was sent OK in the receipts. I’ve looked at my client side code and there is nothing in there to show an alert when a notification fails either, so it has to be coming from somewhere else…just don’t know where.

I’m checking on iOS vs Android…it’s possible that it was affecting Android users primarily.

I’m also on SDK 42 and EAS. It works in smaller batches, but this is the first time that I sent out a push to a large group of users and it didn’t work as intended. If I send to 200-300 at a time, no issues.

Seems the issue is affecting both iOS and android users.

I also just tested sending the notification to a handful of users who didn’t receive it previously and it went through the second time, so something weird happened between the node server and the expo service.

Expo keeps your push receipts around for 24 hours, so if you still have your ticket IDs, you can query for those to make sure there were no errors that Expo ran into, and rule that out: Sending Notifications with Expo's Push API - Expo Documentation

Unfortunately I didn’t hold the ticket id’s, but I’ll definitely keep them next time. Is there anything else that I can do to ensure that my server is properly configured for that scale notifications?

We don’t impose any limit on the number of push notifications you can send. We recommend you add throttling (handled automatically in the expo-server-sdk-node ) and retry logic to your server though to automatically handle any failed notifications that should be retried (depending on the error message).

For more details, refer to the docs I linked above and here: Sending Notifications with Expo's Push API - Expo Documentation

I do have both of those in my code as well. I’ll definitely to a ticket trace next time.

u say: “when they opened the app, the got a “push notification failed” message.”
can u print your code, where u get token? its near with getDevicePushTokenAsync() call. o use try/catch with sentry?

Sentry didn’t pick any errors up. Here is a sandbox with my notification handling: