RobotsAndPencils / buford

A push notification delivery engine for the new HTTP/2 APNS service.
MIT License
475 stars 52 forks source link

unexpected EOF while trying to push #76

Closed azr closed 8 years ago

azr commented 8 years ago

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)

What did you expect to see?

What did you see instead?

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

Thanks !

nathany commented 8 years ago

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 8 years ago

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\"}"
nathany commented 8 years ago

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 8 years ago

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

nathany commented 8 years ago

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