Open Masadow opened 1 month ago
"Software caused connection abort" on mobile devices happens typically when a request is in flight, the app is backgrouded and the OS kills any open sockets to save resources.
Nothing that gql could help with, that's just how mobile OS work.
But in my experience, the issue is less problematic when using native http implementations. See https://pub.dev/packages/http#2-configure-the-http-client https://pub.dev/packages/native_dio_adapter depending on which http implementation you use
I'll look into both provided links for android, thanks. However the application run in kiosk mode, so it's never put in background, the issue is raised while user is interacting with the app so I'm very certain that the app is in foreground.
Would you suggest that I should have a retry strategy for every request made ?
What about the error occuring on web ?
likely nothing related to gql, but underlying network, proxy, firewall ... issues.
though you could try ErrorLink as workaround
While on production, I receive random errors both in android and web (I haven't tested other platforms)
On web, it resembles to :
On android :
I've seen another issue (#358) but I doubt it's linked to CORS since my error is random and not systematic + it also occurs on android.
Relevant code :
gql being of class
Custom httplink to log link errors globally
The graphql object is not being rebuilt when the error occured so it can't be the cause of the issue too
At this point, I have no idea where to look at to understand and fix the issue.
Since it's very random (happen maybe 1/50), it's impossible for me to build a small repro as well