Open alixMougenot opened 6 years ago
@alixMougenot Thanks for logging this. Is there any chance you can give me more info about your certificate and what is invalid about it? ie, has it expired or are you trying to send using a production cert in development mode etc. Just want to make we can replicate. Thanks
Sure. You can reproduce this case by using a development certificate instead of a production certificate. Sorry for not mentioning this.
On Sat, Sep 23, 2017, 00:58 Adam Jones notifications@github.com wrote:
@alixMougenot https://github.com/alixmougenot Thanks for logging this. Is there any chance you can give me more info about your certificate and what is invalid abount it. ie, has it expired or are you trying to sed using a production cert in development mode etc. Just want to make we can replicate. Thanks
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sideshow/apns2/issues/93#issuecomment-331579156, or mute the thread https://github.com/notifications/unsubscribe-auth/AGH9isy8NpVOVgVKaz4vQ3J7eA_WK3rTks5slDuVgaJpZM4PawE5 .
When you try to send data with an invalid certificate, you get this error:
This makes it look like a connection or implementation issue, while it is not.
When looking at the http2 logs, you can see that the gateway is explicitly telling you why they are cutting connection, the certificate is wrong: APNsConnectionCut.txt. The interesting part is: _http2: Transport received GOAWAY len=46 LastStreamID=0 ErrCode=NOERROR Debug="{\"reason\":\"BadCertificateEnvironment\"}" While it would have been nice from the Gateway to use the usual status error code to tell that the certificate is wrong, it does not. If there is an easy way to read GOAWAY frames to return an error that includes the eventual Debug field from Transport, it would be great to use it. If not, you may archive this report.