zino-hofmann / graphql-flutter

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
https://zino-hofmann.github.io/graphql-flutter
MIT License
3.24k stars 612 forks source link

OperationException(linkException: ServerException(originalException: HandshakeException: Connection terminated during handshake, originalStackTrace: , parsedResponse: null), graphqlErrors: []) #1329

Closed fnoceda closed 1 year ago

fnoceda commented 1 year ago

HI.

On simulators work fine, but I have this issue on physical Android 12, lower physical versions of android work fine too

OperationException(linkException: ServerException(originalException: HandshakeException: Connection terminated during handshake, originalStackTrace: , parsedResponse: null), graphqlErrors: [])

I checked my AndroidManifest and is fine, Also I test with http package and work fine.

android:name=".MainActivity" android:exported="true"

I'll appreciate your help.

vincenzopalazzo commented 1 year ago

This need a way that I can reproduce it sorry.

Could you try to make a reproducer repo?

fnoceda commented 1 year ago

Hi, Shure.

You can see there: https://github.com/fnoceda/flutter_test_rick_and_morty

With Android 12 always have a broken in the line throw createError(response, "Failed host lookup: '$host'"); in socket_patch.dart file in line 501

with lower version I have the same error and throw ServerException( originalException: e, originalStackTrace: stackTrace, parsedResponse: null, ); in link.dart at line 134 also on final httpResponse = await _executeRequest(request); at line 76, before that, the result is null In android 12 the result its fine

Issues don't ocurre with simulators

I cant see the problem.

thanks a lot for your help

fnoceda commented 1 year ago

Hello, I solve my problem upgrading Flutter version at

Flutter 3.10.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision d3d8effc68 (9 days ago) • 2023-05-16 17:59:05 -0700 Engine • revision b4fb11214d Tools • Dart 3.0.1 • DevTools 2.23.1

Thanks a lot for your help.

JoshanTandukar commented 1 year ago

Issue still persisting. At certain point any request going to anywhere result in lookup failed whatever the domain is. Very arbitrary issue hard to replicate and still happens .

4 major ones:

Out of all digging found the issue in the package itself. Need input on replication.

Flutter Version:

Flutter version 3.10.5 on channel stable • Upstream repository https://github.com/flutter/flutter.git • Framework revision 796c8ef792 (5 weeks ago), 2023-06-13 15:51:02 -0700 • Engine revision 45f6e00911 • Dart version 3.0.5 • DevTools version 2.23.1