-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
okhttp3.internal.http2.StreamResetException: stream was reset: PROTOCOL_ERROR/ CANCEL #3955
Comments
yes, I am facing same issues, is there any solution yet? |
i am also facing this issue |
This isn’t actionable as-is. Could you provide the server URL that triggers this? Or a test case that reproduces? |
We are seeing the same issue with (openjdk version "11" 2018-09-25) and it is related to #3146, i.e. something with http/2. We tried versions from 3.11.0 down to 3.3.0 and only 3.2.0 works for us. The strange thing is that sometimes we get this PROTOCOL_ERROR, but sometimes also http2.ConnectionShutdownException: null:
And sometimes stream cancel:
Also this is a rather rare issue but for certain requests reproducable. We'll try to produce a failing test for the latest 3.11.0 |
Work around for square/okhttp#3955
Work around for square/okhttp#3955
Work around for square/okhttp#3955
I have the same problem with okhttp3.12 retrofit 2
|
Can you enable HTTP/2 frame logging and try again?
|
tks for your very quick answer My query is a POST always on the same URL I also tryied to remove the header (the autorisation bearer), it doesn't work also. |
Yep, that'd be handy. As small as you can make it please. |
I set up for you a server with the golang server
and AuthService.java
|
Having the same issue; it happens always when there is bad connection (e.g. using 2G with bad signal). Trying to retrieve a JSON of ~80kB on 2G. I am using retrofit:2.5.0.
Issue is resolved by using HTTP 1.1 (not a good solution though):
|
Facing the same issue Logs 2019-08-24 16:51:38.217 30729-30729/com.minimicro.sevenup W/System.err: okhttp3.internal.http2.StreamResetException: stream was reset: CANCEL Lib's BuilderClass static Gson gson = new GsonBuilder()
|
Any update on this? Fatal Exception: okhttp3.internal.http2.StreamResetException: stream was reset: PROTOCOL_ERROR |
we are having the same issue. |
I'm also having the same issue and it is crashing the app. |
faced this issue on Samsung SM-N960F (and 3 other models of Samsung, Android 8). on Xiaomi/Lenovo everything is ok. probably triggered by unstable connection |
Have we got any update on this? I get this when i trigger a specific api in quick succession for example: but if i call the API wait for some time i get the response |
Our users are mostly using networks with poor quality, both in bandwidth and stability. We're using Google's External HTTPS Load Balancer, so I doubt that it was an overloaded server in our case. (I've been following this issue for the past few months, we have dropped clients to HTTP/1.1 for now). |
@mlazowik Yep - I'm assuming your case may possibly be the one I mentioned above "Or head of line blocking causing a bunch of later requests to be delayed while HTTP/1.1 may allow small requests to succeed." |
I'm guessing you mean something that's described here: https://www.twilio.com/blog/2017/10/http2-issues.html? |
Nice link. Thanks. |
try checking if you have used less time, Increasing time duration solved the problem
|
I'm getting Have anyone checked whether it can be related to query length? I can reproduce it stably in our use case: we have to use a GET with a very long query. The exception is thrown if the query is longer than 5653 characters, but ok if it is 5863 (I didn't test values in-between).
(first noticed in July 2020 with older versions) The server is nginx (1.14.2). Stacktrace
|
we are having the same issue.
|
We have same issue ! |
|
repeat url cancel, cancel not error. |
你好,你的邮件已经收到。我会尽快给你回复。
|
这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。
|
If you want to keep the advantages of http2, like header compression, instead of dropping to http1.1 – http3 gets rid of the head of line blocking issues. On android you can replace okhttp with cronet to get http3 support, you obviously need to support it on your server(s) too. |
It's Kotlin version. |
What okhttp and Nginx version and Android version did you use? @songmik |
Nobody was able to reproduce the problem, I think it is warmly recommended
Le dim. 5 mars 2023, 21:04, Dmitriy ***@***.***> a écrit :
… I'm facing the same problem using following url:
https://api.alquran.cloud/v1/quran/en.husary
The workarounds suggested do not help me. I see that the issue is old,
would it be useful to create a minimal reproducible example?
—
Reply to this email directly, view it on GitHub
<#3955 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABM5FPFP4NH5ALRQTVTHN6DW2TWVVANCNFSM4EY2VZ3Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm sorry, but this particular url seems to be broken. If you open it in the browser there is no end of the json |
My problem was related to CompositeDisposable. I am using RxJava3 as callAdapter. If you add the call disposable to a CompositeDisposable that is disposed the error occurs. I don't think this is the solution for all of us who have this problem but it might be a good clue to find out what is happening. |
Oh I'm sorry, I can't figured out What Nginx version is .. But Okhttp version is 4.9.3. Good luck : ) |
I suspect might be related to #7801, would suggest retesting on OkHttp 5.0.0-alpha12 (not available yet). |
I have same issue
|
Example for reproduce: every 60 seconds request will be repeat if set breakpoint on request in Charles
Dependencies
|
Any progress? becuase my some user face this type of error while downloading large json data from stream api. It happens sometime and in some users' device. i have no idea to reproduce it by my own and in my android device. |
any progress on this?
|
I am connecting to web service with last version
retrofit
but get me bellow error :okhttp3.internal.http2.StreamResetException: stream was reset: PROTOCOL_ERROR
My code is like bellow :
And
And
The text was updated successfully, but these errors were encountered: