You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having an issue and can't seem to find a fix or a way around this.
I'm trying to setup the Github webhook, but I keep getting the error: ERRO[0005] unexpected end of JSON input
It fails in json.Unmarshal, but when I refactor to use something like here I get an error 'EOF' (really, thats the complete error 😕)
I read somewhere that the Body will be unavailable when the Request has been closed already, which happens when something gets returned. But I can't seem to find what actually goes wrong.
// For server requests the Request Body is always non-nil
// but will return EOF immediately when no body is present.
So that could explain the EOF but not why there is no body present. It also doesn't explain why it would work as expected when --github-secret is not provided, as the body would still get read once by vauth. As far as I can tell, if this were due to the body being closed we would see this error, which we are not.
I'll look in to this, and any other information you run across would (or a pull request if you find a fix) would be extremely helpful.
Activity
wjzijderveld commentedon Oct 6, 2014
Just tested this without
--github-secret, and then it actually does work as expected...rafecolton commentedon Oct 6, 2014
Hm, this is a strange one. From the
net/httpdocumentation,So that could explain the
EOFbut not why there is no body present. It also doesn't explain why it would work as expected when--github-secretis not provided, as the body would still get read once byvauth. As far as I can tell, if this were due to the body being closed we would see this error, which we are not.I'll look in to this, and any other information you run across would (or a pull request if you find a fix) would be extremely helpful.
rafecolton commentedon Oct 30, 2014
@wjzijderveld I have a fix for this, will submit a pull request shortly. Thanks for your patience!