node-apn icon indicating copy to clipboard operation
node-apn copied to clipboard

GOAWAY errors

Open maxmijn opened this issue 11 months ago • 7 comments

We have consistently been getting this error on about 1 out of 100 notifications we sent. Any idea how we can fix this?

apn write failed: New streams cannot be created after receiving a GOAWAY

maxmijn avatar Mar 14 '24 19:03 maxmijn

Thanks for opening this issue!

Looks like a rate limit, or maybe the stream is just closed.

mtrezza avatar Mar 14 '24 22:03 mtrezza

Thanks for looking into this!

If I look at the error codes that APNS should be returning I would expect some more information if running into a rate limit. I can't really find anything else about this error apart from some fix in an unmaintained version of this project. Do you know any other way I can debug why this is happening and perhaps prevent this in the future?

maxmijn avatar Mar 15 '24 08:03 maxmijn

image I send notifications every day and consistently encounter this error. To prevent redundancy, I refrain from retrying. Could you please help me understand why this is happening and suggest ways to reduce the error rate?

v-xuesjiang avatar Mar 21 '24 06:03 v-xuesjiang

If anyone wants to open a PR here with the fixes, then we can merge.

mtrezza avatar Mar 21 '24 14:03 mtrezza

I believe those fixes are already implemented in this library.

maxmijn avatar Mar 21 '24 14:03 maxmijn

Got it, in that case it would be great if someone who is experiencing this issue could investigate some more, possibly manually add a log line to where this issue occurs so we can get more info in case the apn library swallows some of the error information.

mtrezza avatar Mar 21 '24 15:03 mtrezza