RobotsAndPencils/buford

unexpected EOF while trying to push

Closed this issue · 5 comments

azr commented

Hello there,

recently I get unexpected EOF errors when I try to send notifications, 0 notification will work now.

What did you do? (steps to reproduce or a code sample is helpful)

  • Try to send a notification

What did you expect to see?

  • A notification

What did you see instead?

  • Post https://api.push.apple.com/3/device/{token}: unexpected EOF in the logs.

Is there a way to know what happened ? Shouldn't buford tell a bit more on it ??

Thanks !

Please try running your Go program with GODEBUG which may show additional error information.

GODEBUG=http2debug=1 ./yourprogram

Possibly related #33.

Are you running the latest version of Buford and x/net/http2?

azr commented

Okay, that debug option is awesome !

This is the last versions of both pkgs yes.

I found a particularly interesting log line:

2016-07-29T16:34:33.399788+00:00 app[web.1]: transport.go:1694: http2: Transport received GOAWAY len=46 LastStreamID=0 ErrCode=NO_ERROR Debug="{\"reason\":\"BadCertificateEnvironment\"}"

Interesting, indeed. I've seen that error before -- in fact I thought it was getting parsed out correctly as of v0.10.0 of Buford. https://github.com/RobotsAndPencils/buford/releases/tag/v0.10.0

❯ ./push -c cert.p12 -d device-token -e production
certificate was for the wrong environment

(this is on Go 1.6.3 with El Capitan 10.11.6)

In any case, the error means you are hitting Apple's production environment with a certificate intended for development or visa versa.

azr commented

Ah ! Okay, I'm going to fix that on monday ! Thanks for you answers & time ! :)

No problem. Be sure to let me know if you run into any other difficulties with Buford.