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
Status: 500 Response Reason:InternalServerError #463
Comments
Given that the response indicates a server-side error, have you contacted Apple Developer Support about this? Maybe they can provide more details. |
We're seeing exactly this error as well. Some notifications get successfully pushed, but on most of them we get the "Error 500 - InternalServerError" response. Have they changed (made more strict?!) the notification payload format? I mean, there shouldn't be anything "illegal" in the payload, but just thought I would ask. Also other error we get, but not as often as the InternalServerError:
We're using node 4.5.0 LTS + node-apn 2.1.1 I wish I could help more debugging this.. :/ |
I am not an expert in APN and just making a wild guess. I don't see this domino effect happening for other errors (such as 410 - unregistered) therefore, could it be that for some reason, when this specific error is fired the connection is closed by Apple and not re-opened client-side? I am saying this under two assumptions:
Also, I personally don't think that Provider Authentication Tokens could be part of the issue as this is merely an authentication system. I am inclined to believe that this may be a client-side issue as a mere server restart solves the problem, which I think should rule out any penalty/ban from Apple at a provider level. 😢 |
This is clearly the same problem I've encountered... Opened issue #461 a weak ago and did not find any clue on what's happening. I've put more log to show how we've progressed before having a Internal server error : 500 |
@sambegin I've read through your issue and while I am not observing the other "weird" errors at the moment I concur on the 500 error.
If that's the case I first of all need to be entirely sure that the re-connection is being performed flawlessly client-side by node-apn. On a side note, as a work-around to this issue I am resetting my provider variable as soon as I spot the first error 500:
And that fixes it for all the forthcoming notifications until the next errored-one but isn't this quite hacky (aside from the fact that the errored-notification is skipped)? |
I'm in the same boat: a few errors of "write failed" type followed by a bunch of "InternalServerError"s. I guess that node-apn should probably re-open connection on "InternalServerError" because otherwise not only the current message gets lost, but also the next message (it is lost due to write errors while trying to utilize dead connection). |
Yes, we experience the same issues, 500s and timeouts like this:
Restarting the service (and thus the connection) fixed it for a while as reported above… Why keep the connection at all, I wonder, since it's http/2, isn't it? |
Facing same issue. APNS abruptly starts sending InternalServerError, after restarting the service, it starts working normally. |
Do we know more about potential fix (checking health connection with APNs) talked in #449 ? Seems like a good start to resolve our problems. |
Closing as duplicate of #449. |
First of all, well done to argon and the new administrators.
Secondly, I have been using this repo for a while without problems.
Recently, I switched to the new Provider Authentication Tokens and everything seemed to be working smoothly.
Until I realized that at some point all my notifications stop working and return a 'Status: 500', and response with 'Reason: InternalServerError'. I did a little search and came across this very recent question on StackOverflow which describes the same problem:
http://stackoverflow.com/questions/40429009/why-apple-push-notification-service-sometimes-gives-me-error-500?newreg=986d81b4ce884d1dbf375074413286ae
If I restart the server everything seems to go back to normal for an indefinite amount of time (usually a couple of hours). Very few diluted notifications are sent between each restart.
I am using version 2.1.1.
The text was updated successfully, but these errors were encountered: