{"action":"created","issue":{"url":"https://api.github.com/repos/square/okhttp/issues/2204","labels_url":"https://api.github.com/repos/square/okhttp/issues/2204/labels{/name}","comments_url":"https://api.github.com/repos/square/okhttp/issues/2204/comments","events_url":"https://api.github.com/repos/square/okhttp/issues/2204/events","html_url":"https://github.com/square/okhttp/issues/2204","id":125147567,"number":2204,"title":"java.io.IOException: stream was reset: CANCEL and PROTOCOL_ERROR","user":{"login":"sreekumarr84","id":2329536,"avatar_url":"https://avatars.githubusercontent.com/u/2329536?v=3","gravatar_id":"","url":"https://api.github.com/users/sreekumarr84","html_url":"https://github.com/sreekumarr84","followers_url":"https://api.github.com/users/sreekumarr84/followers","following_url":"https://api.github.com/users/sreekumarr84/following{/other_user}","gists_url":"https://api.github.com/users/sreekumarr84/gists{/gist_id}","starred_url":"https://api.github.com/users/sreekumarr84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sreekumarr84/subscriptions","organizations_url":"https://api.github.com/users/sreekumarr84/orgs","repos_url":"https://api.github.com/users/sreekumarr84/repos","events_url":"https://api.github.com/users/sreekumarr84/events{/privacy}","received_events_url":"https://api.github.com/users/sreekumarr84/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/square/okhttp/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/square/okhttp/milestones/16","html_url":"https://github.com/square/okhttp/milestones/3.1","labels_url":"https://api.github.com/repos/square/okhttp/milestones/16/labels","id":1460477,"number":16,"title":"3.1","description":"Goal: update the response cache.","creator":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"open_issues":35,"closed_issues":4,"state":"open","created_at":"2015-12-15T00:29:28Z","updated_at":"2016-01-17T07:35:04Z","due_on":"2016-03-27T04:00:00Z","closed_at":null},"comments":8,"created_at":"2016-01-06T10:15:59Z","updated_at":"2016-01-18T15:21:48Z","closed_at":null,"body":"I am using okhttp to connect to google OAuth server (https://accounts.google.com/o/oauth2/token). I am occasionally getting \"stream was reset\" error. I was using org.apache library earlier and never faced this issue before. First I am getting \"stream was reset: CANCEL\" and on retry \"stream was reset: PROTOCOL_ERROR\". On retrying after some time the connection works fine.\r\n\r\njava.io.IOException: stream was reset: CANCEL\r\n\tat com.squareup.okhttp.internal.framed.FramedStream.getResponseHeaders(FramedStream.java:146)\r\n\tat com.squareup.okhttp.internal.http.FramedTransport.readResponseHeaders(FramedTransport.java:141)\r\n\tat com.squareup.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:909)\r\n\tat com.squareup.okhttp.internal.http.HttpEngine.access$300(HttpEngine.java:93)\r\n\tat com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:894)\r\n\tat com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:748)\r\n\tat com.squareup.okhttp.Call.getResponse(Call.java:277)\r\n\tat com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:234)\r\n\tat com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:196)\r\n\tat com.squareup.okhttp.Call.execute(Call.java:79)\r\n\r\nand later-on on retry\r\n\r\njava.io.IOException: stream was reset: PROTOCOL_ERROR\r\n\tat com.squareup.okhttp.internal.framed.FramedStream.getResponseHeaders(FramedStream.java:146)\r\n\tat com.squareup.okhttp.internal.http.FramedTransport.readResponseHeaders(FramedTransport.java:141)\r\n\tat com.squareup.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:909)\r\n\tat com.squareup.okhttp.internal.http.HttpEngine.access$300(HttpEngine.java:93)\r\n\tat com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:894)\r\n\tat com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:748)\r\n\tat com.squareup.okhttp.Call.getResponse(Call.java:277)\r\n\tat com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:234)\r\n\tat com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:196)\r\n\tat com.squareup.okhttp.Call.execute(Call.java:79)"},"comment":{"url":"https://api.github.com/repos/square/okhttp/issues/comments/172557914","html_url":"https://github.com/square/okhttp/issues/2204#issuecomment-172557914","issue_url":"https://api.github.com/repos/square/okhttp/issues/2204","id":172557914,"user":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T15:21:48Z","updated_at":"2016-01-18T15:21:48Z","body":"@vaurdan what’s your webserver running? Do you see the same problem on OkHttp 2.7.2 or 3.0.1 ?"}}