{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/14627","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/14627/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/14627/comments","events_url":"https://api.github.com/repos/golang/go/issues/14627/events","html_url":"https://github.com/golang/go/issues/14627","id":138294718,"number":14627,"title":"x/net/http2: EOF when Transport received GOAWAY (http2 client)","user":{"login":"nathany","id":4566,"avatar_url":"https://avatars.githubusercontent.com/u/4566?v=3","gravatar_id":"","url":"https://api.github.com/users/nathany","html_url":"https://github.com/nathany","followers_url":"https://api.github.com/users/nathany/followers","following_url":"https://api.github.com/users/nathany/following{/other_user}","gists_url":"https://api.github.com/users/nathany/gists{/gist_id}","starred_url":"https://api.github.com/users/nathany/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathany/subscriptions","organizations_url":"https://api.github.com/users/nathany/orgs","repos_url":"https://api.github.com/users/nathany/repos","events_url":"https://api.github.com/users/nathany/events{/privacy}","received_events_url":"https://api.github.com/users/nathany/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/golang/go/labels/NeedsFix","name":"NeedsFix","color":"ededed"}],"state":"closed","locked":false,"assignee":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"assignees":[{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/40","html_url":"https://github.com/golang/go/milestones/Go1.7Maybe","labels_url":"https://api.github.com/repos/golang/go/milestones/40/labels","id":1714149,"number":40,"title":"Go1.7Maybe","description":"Things that might be okay for Go 1.7 if they get done in time.\r\n","creator":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":79,"state":"open","created_at":"2016-04-18T15:44:35Z","updated_at":"2016-06-29T17:33:11Z","due_on":"2016-07-31T07:00:00Z","closed_at":null},"comments":20,"created_at":"2016-03-03T20:55:54Z","updated_at":"2016-06-29T22:21:35Z","closed_at":"2016-06-29T00:41:43Z","body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n1. What version of Go are you using (`go version`)?\r\n\r\ngo version go1.6 darwin/amd64\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\n\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"darwin\"\r\n\r\n3. What did you do?\r\n\r\nRun Buford's push example with a development certificate against the production environment.\r\n\r\n```\r\nbuford/example/push\r\n❯ GODEBUG=http2debug=2 go run main.go -c cert.p12 -d device-token -e production\r\n```\r\n\r\nhttps://github.com/RobotsAndPencils/buford/issues/33\r\n\r\n4. What did you expect to see?\r\n\r\nExpected a status code and JSON response `{\"reason\":\"BadCertificateEnvironment\"}`\r\n\r\nThis is the debug output from a similar request:\r\n\r\n```\r\nhttp2: Transport failed to get client conn for api.development.push.apple.com:443: http2: no cached connection was available\r\nhttp2: Transport creating client conn to 17.172.238.203:443\r\nhttp2: Framer 0xc82049fbc0: wrote SETTINGS len=18, settings: ENABLE_PUSH=0, INITIAL_WINDOW_SIZE=4194304, MAX_HEADER_LIST_SIZE=10485760\r\nhttp2: Framer 0xc82049fbc0: wrote WINDOW_UPDATE len=4 (conn) incr=1073741824\r\nhttp2: Framer 0xc82049fbc0: read SETTINGS len=24, settings: HEADER_TABLE_SIZE=4096, MAX_CONCURRENT_STREAMS=500, MAX_FRAME_SIZE=16384, MAX_HEADER_LIST_SIZE=8000\r\nhttp2: Framer 0xc82049fbc0: wrote SETTINGS flags=ACK len=0\r\nUnhandled Setting: [HEADER_TABLE_SIZE = 4096]\r\nUnhandled Setting: [MAX_HEADER_LIST_SIZE = 8000]\r\nhttp2: Transport encoding header \":authority\" = \"api.development.push.apple.com\"\r\nhttp2: Transport encoding header \":method\" = \"POST\"\r\nhttp2: Transport encoding header \":path\" = \"/3/device/device-token\"\r\nhttp2: Transport encoding header \":scheme\" = \"https\"\r\nhttp2: Transport encoding header \"content-type\" = \"application/json\"\r\nhttp2: Transport encoding header \"content-length\" = \"43\"\r\nhttp2: Transport encoding header \"accept-encoding\" = \"gzip\"\r\nhttp2: Transport encoding header \"user-agent\" = \"Go-http-client/2.0\"\r\nhttp2: Framer 0xc82049fbc0: wrote HEADERS flags=END_HEADERS stream=1 len=81\r\nhttp2: Framer 0xc82049fbc0: wrote DATA stream=1 len=43 data=\"{\\\"aps\\\":{\\\"alert\\\":\\\"Hello HTTP/2\\\",\\\"badge\\\":42}}\"\r\nhttp2: Framer 0xc82049fbc0: wrote DATA flags=END_STREAM stream=1 len=0 data=\"\"\r\nhttp2: Framer 0xc82049fbc0: read SETTINGS flags=ACK len=0\r\nhttp2: Transport received SETTINGS flags=ACK len=0\r\nhttp2: Framer 0xc82049fbc0: read HEADERS flags=END_HEADERS stream=1 len=1\r\nhttp2: Transport received HEADERS flags=END_HEADERS stream=1 len=1\r\nhttp2: Framer 0xc82049fbc0: read DATA flags=END_STREAM stream=1 len=27 data=\"{\\\"reason\\\":\\\"BadDeviceToken\\\"}\"\r\nhttp2: Transport received DATA flags=END_STREAM stream=1 len=27 data=\"{\\\"reason\\\":\\\"BadDeviceToken\\\"}\"\r\nbad device token\r\nexit status 1\r\n```\r\n5. What did you see instead?\r\n\r\nClient.Do(req) returned an EOF error.\r\n\r\n```\r\nhttp2: Transport failed to get client conn for api.push.apple.com:443: http2: no cached connection was available\r\nhttp2: Transport creating client conn to 17.110.227.90:443\r\nhttp2: Framer 0xc8204a1080: wrote SETTINGS len=18, settings: ENABLE_PUSH=0, INITIAL_WINDOW_SIZE=4194304, MAX_HEADER_LIST_SIZE=10485760\r\nhttp2: Framer 0xc8204a1080: wrote WINDOW_UPDATE len=4 (conn) incr=1073741824\r\nhttp2: Framer 0xc8204a1080: read SETTINGS len=24, settings: HEADER_TABLE_SIZE=4096, MAX_CONCURRENT_STREAMS=500, MAX_FRAME_SIZE=16384, MAX_HEADER_LIST_SIZE=8000\r\nhttp2: Framer 0xc8204a1080: wrote SETTINGS flags=ACK len=0\r\nUnhandled Setting: [HEADER_TABLE_SIZE = 4096]\r\nUnhandled Setting: [MAX_HEADER_LIST_SIZE = 8000]\r\nhttp2: Transport encoding header \":authority\" = \"api.push.apple.com\"\r\nhttp2: Transport encoding header \":method\" = \"POST\"\r\nhttp2: Transport encoding header \":path\" = \"/3/device/device-token\"\r\nhttp2: Transport encoding header \":scheme\" = \"https\"\r\nhttp2: Transport encoding header \"content-type\" = \"application/json\"\r\nhttp2: Transport encoding header \"content-length\" = \"43\"\r\nhttp2: Transport encoding header \"accept-encoding\" = \"gzip\"\r\nhttp2: Transport encoding header \"user-agent\" = \"Go-http-client/2.0\"\r\nhttp2: Framer 0xc8204a1080: wrote HEADERS flags=END_HEADERS stream=1 len=72\r\nhttp2: Framer 0xc8204a1080: wrote DATA stream=1 len=43 data=\"{\\\"aps\\\":{\\\"alert\\\":\\\"Hello HTTP/2\\\",\\\"badge\\\":42}}\"\r\nhttp2: Framer 0xc8204a1080: wrote DATA flags=END_STREAM stream=1 len=0 data=\"\"\r\nhttp2: Framer 0xc8204a1080: read GOAWAY len=46 LastStreamID=0 ErrCode=NO_ERROR Debug=\"{\\\"reason\\\":\\\"BadCertificateEnvironment\\\"}\"\r\nhttp2: Transport received GOAWAY len=46 LastStreamID=0 ErrCode=NO_ERROR Debug=\"{\\\"reason\\\":\\\"BadCertificateEnvironment\\\"}\"\r\nhttp2: Framer 0xc8204a1080: read GOAWAY len=8 LastStreamID=0 ErrCode=NO_ERROR Debug=\"\"\r\nhttp2: Transport received GOAWAY len=8 LastStreamID=0 ErrCode=NO_ERROR Debug=\"\"\r\nTransport readFrame error: (*errors.errorString) EOF\r\nRoundTrip failure: unexpected EOF\r\nPost https://api.push.apple.com/3/device/device-token: unexpected EOF\r\nexit status 1\r\n```\r\n\r\nWe're not sure if this is an issue with how x/net/http2 is handling GOAWAY and/or a problem with how Apple is returning this particular error.\r\n\r\n/cc @groob \r\n "},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/229507048","html_url":"https://github.com/golang/go/issues/14627#issuecomment-229507048","issue_url":"https://api.github.com/repos/golang/go/issues/14627","id":229507048,"user":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T22:21:35Z","updated_at":"2016-06-29T22:21:35Z","body":"No clue. I don't control what Apple's server sends you. Maybe your request differed, or maybe you hit a different Apple backend. Or maybe it's a timing thing on their side.\r\n"}}
{"actor":{"display_login":"bradfitz"}}