Still suffering with push notifications

Hi,

First of all: I’m a big fan of React Native and Expo and I really like Expo direct approach to things like push notifications and over-the-air updates.

But I’ve been noticing a lot of instability in Expo’s notification service API. Aside from a fairly large number of APN errors (OK, maybe we can blame Apple on this), the API itself seems unreliable lately.

For example: the API is supposed to return the request status and a receipt ID, if successful, or an error description, if unsuccessful.

But a lot of my notification attempts return only the status, with no receipt at all:

{ data: [ { status: ‘ok’ } ] }

Sometimes, when I try sending a notification to the same device, the API returns an error:

{ data:
[ { status: ‘error’,
message: ‘The recipient “ExponentPushToken[LTCE_GLcRh2qjj_H0nt8OI]” is associated with a different experience than “@adrianosbr/helloworld”’ } ] }

But there is no @adrianosbr/helloworld “experience”:

What is happening? What I have to do? What we can do to help Expo team?

Thanks in advance,
Adriano.

PS: does the Expo team read this forum? Is there another way to contact them?

I get the same error (associated with a different experience), except that it isn’t just when sending to the same device. A recomendation from this forum was to send notifications singularly, not in batches. In my limited testing so far since making this update I haven’t seen the error, but ideally at some stage soon I move back to batch sending.

1 Like

I’ll try the single notification approach. In some early tests I’ve made, the API behavior was erratic - sometimes just “ok”, no receipt, sometimes the “wrong experience” error :pensive:

Just curious, as I am designing an app that will be sending hundreds, if not thousands of notifications; did you use the REST API v2, the older API, or the SDK backend which has some throttling features?

2 Likes

The Expo team does read, and sometimes answer, these forums. I’d also be very interested to hear their response to this, as I’m in the same boat as @jamesattard .

You might also try your luck in the Slack channel as an alternative to the forums :slight_smile:

1 Like

I’m using the v2 API directly, no SDK.

My app was published before the changes in push notifications (around June), so it’s not using FCM credentials yet. I’ll publish an update this week and see if something changes.

1 Like

If the issue persists, perhaps open a bug report on Github with the relevant code snippets. The team would want to know if something was wrong with push notifications :slight_smile:

I will!

I have also been having problems with the expo push notifications recently. After some digging into apple and expo, I think my issues are stemming from the expo push service.

When I hit the /api/v2/push/send endpoint, I get a response:

{
    "data": [
        {
            "status": "ok",
            "id": "fa0e5188-8d87-4100-a405-a52e4cc8a057"
        }
    ]
}

It seems like it went through but upon reading the receipt with the /api/v2/push/getReceipts endpoint I get an odd error:

{
    ...
    "message": "The Apple Push Notification service unexpectedly dropped the connection. Retry sending the notification later.",
    ...
}

In order to test everything out directly with apple, I created a new push notification cert and rebuilt my app with expo. I then got the device push token with the Expo.Notifications.getDevicePushTokenAsync(config) function.

I am able to use the Easy APNs Provider to test out push notifications directly with apple but only by using the APNS token. When using the APNS token, I get notifications. When using the ExponentPushToken with the same exact build I get the errors above with the exponent push notification service.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.