Error with push notifications { "status":"error }


#1

Hi expo team, can you help us with an issue we are having with push notifications? Not sure what to debug because the receipt is just an object with status: error. Please see log below:

Error sending message {"sound":"default","title":"REDACTED:","body":"REDACTED ","to":"ExponentPushToken[REDACTED]"} with receipt {"status":"error"}

This is with our standalone app which is released on iOS and Android.

thanks!


#2

We often include some more debug info in the error payload – what does the bare HTTP response say?


#3

We aren’t currently logging that, will add that right now and get back to you.


#4

Hey @ide, I work with Mike :slight_smile:
Any tips for how to get the bare HTTP response using expo-server-sdk? Its API only exposes ExpoPushReceipts as far as I can tell.
(Default option is we’ll write our own code to hit the endpoint, but of course we’d prefer to stick with the Expo SDK.)

Thanks!


#5

The easiest way would be to console.log or set a breakpoint in the npm package where the response arrives.


#6

I’m getting this, too, when I run a push request through Postman or CURL:

<html>
    <head>
        <title>502 Bad Gateway</title>
    </head>
    <body bgcolor="white">
        <center>
            <h1>502 Bad Gateway</h1>
        </center>
        <hr>
        <center>nginx/1.11.3</center>
    </body>
</html>

#7

@llamaluvr Are you seeing {"status":"error"} and a 200? It seems like you’re getting back a 502 error instead, which might have a different cause.


#8

Getting 200’s/ status = OK now.

There was a moment where if I added --max-time 900 to the curl request it would go through right away, but if I didn’t, it would hang for a while (the long hang would end in a 502).