-
Notifications
You must be signed in to change notification settings - Fork 364
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
[cupertino_http] CupertinoClient requests hang and fail to complete #1702
Comments
@martyfuhry What version of |
Ah, that would be great! I am only running |
OK, let me know how it goes. |
Unfortunately, the behavior persists in version |
@martyfuhry Did you ever use |
@brianquinlan downgrading to 1.5.1 solves the issue. |
It does indeed work with |
That's not good. I don't have an explanation for this regression in 2.0.2. |
Do we know what sort of callback this code path is using? The only thing I know of that could deadlock is a blocking callback. jnigen has a similar issue. If there's a reliable repro here I can investigate it and see if it'll be fixed by the fix we're working on for that. In the meantime it might be a good idea to remove blocking callbacks from cupertino_http. EDIT: Actually I guess this isn't deadlocking, but just not receiving a listener callback. |
The listener is installed here:
Presumably the request is waiting here:
I don't see a path through here that doesn't complete the future:
|
@chenfisher @martyfuhry (and possibly others): Could you tell me a bit more about the environments where you can reproduce this issue? I take it that you can only produce the issue on a physical device? Do you see this issue with |
I tried running the demo application on a real device using both
@chenfisher and @martyfuhry - could you include the output of |
I've been using
IOClient
in my Flutter application. When I switched to usingCupertinoClient
, my requests fail to complete. I have inspected the network traffic from my iOS app through a proxy. The requests are being properly sent by the application and the web server is responding with the correct data. But the future fromclient.get
is never resolved in the Flutter application. No errors show up, the request simply hangs.Here is my code for initializing the
CupertinoClient
Here is an example of our code sending a request:
I've also tried using
UrlSessionConfiguration.ephemeralSessionConfiguration()
and it does not change the result. If I change the above code to returnIOClient
instead of theCupertinoClient
, the application works.Finally, it would seem that every network request hangs, not just those to my own webserver. In particular, this
get
request hangs:I do not see any errors in my console. The responses simply fail to resolve the future and the code hangs forever.
This was all tested on a physical iOS 17.6.1 device (iPhone 11 Pro Max).
The text was updated successfully, but these errors were encountered: