-
Notifications
You must be signed in to change notification settings - Fork 1.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
OkHttp inspector hangs on big uploads #329
Comments
This is due to a very unfortunate limitation in the inspector protocol which appears to require that we serialize request payloads as UTF-8 strings and upload them to the UI. I know of no way around this other than to perhaps upgrade to a newer version of the protocol (which I haven't evaluated in ~6 months) or to simply detect large payloads and omit them when reporting the request. I tried for a while to figure out what current Chrome upstream does when uploading large images but for reasons I forget now couldn't seem to repro this issue. If you're feeling motivated, you could raelly help speed this up by connecting Chrome for Android to Chrome on your PC/laptop (chrome://inspect just like with Stetho, find your Chrome for Android instance and click Inspect), then try to get Chrome for Android to upload a very large payload to a server and capture what the inspector does. In either case (it does what you want or not) could you take a screenshot for us and we'll see what we can do? |
I think the right thing to do then would be to detect large payloads and simply omit them from the payload string. If you're interested in taking a crack at this, it should be a simple matter of applying this heuristic in Also note that it's possible to do an even better job filtering this out for |
Closing due to inactivity, though I'm still very interested in having this issue solved. I just doubt I'll personally have time unless I hit this issue in one of my apps (which, I guess, is Facebook for Android hehe) |
How are you not hitting this issue? Anytime the POST request fails the inspector will try to load image in it and freeze. |
i believe i have fixed the bug here, #564 should fix it
|
I am still encountering this issue with image uploads using version 1.5.1. |
My app uploads photos taken from camera. If upload request appears on log, Chrome hangs completely. I think this happens because inspector tries to dump raw jpeg content to Headers tab.
The text was updated successfully, but these errors were encountered: