mirage / ocaml-github

GitHub APIv3 OCaml bindings
ISC License
100 stars 61 forks source link

EPIPE when uploading asset #197

Open toolslive opened 7 years ago

toolslive commented 7 years ago

I tried

$ GH_COOKIE=alba git-upload-release openvstorage alba 1.3.15 ./xxx.deb 
uploading to release id 6335375
git-upload-release: internal error, uncaught exception:
                    Unix.Unix_error(Unix.EPIPE, "write", "")
                    Raised at file "src/core/lwt.ml", line 805, characters 16-23
                    Called from file "src/unix/lwt_main.ml", line 34, characters 8-18
                    Called from file "src/cmdliner_term.ml", line 27, characters 19-24
                    Called from file "src/cmdliner.ml", line 106, characters 32-39

(I had to look in the code to see how to force it not to use the infra cookie) The output of uploading to release id .... shows that it gets a token and can find the specific release of the project from the tag. The upload of the asset however, fails.

This was installed via opam (version:2.3.0)

dsheets commented 7 years ago

Thanks for your report! How big is xxx.deb?

dsheets commented 7 years ago

If you could also try with GITHUB_DEBUG=1 and COHTTP_DEBUG=1 that may be helpful. If you post the results back here, be sure to redact any github tokens or other sensitive info that the logs may contain.

toolslive commented 7 years ago

xxx.deb is 22MB (22424088 bytes) If I add both env vars, it will spit out 22MB of logs. the relevant piece seems to be this:

>>> POST /repos/openvstorage/alba/releases/6335375/assets?access_token=xxx&name=./xxx.deb HTTP/1.1
>>> accept: application/vnd.github.v3+json
content-length: 22424088
content-type: application/octet-stream
host: uploads.github.com
user-agent: ocaml-github ocaml-cohttp/0.21.1
>>> !<arch>...