-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Null check operator used on a null value in SocketClient.onConnectionLost #1379
Comments
can i work on this |
aarsham
added a commit
to aarsham/graphql-flutter
that referenced
this issue
Feb 20, 2024
**Fixes** - Removed unnecessary null checks(!) on SocketChannel instance in SocketClient onConnectionLost() method which cause an error when client cannot connect (zino-hofmann#1379). this prevents reconnecting when there is a working connection later.
aarsham
added a commit
to aarsham/graphql-flutter
that referenced
this issue
Feb 20, 2024
**Fixes** - Removed unnecessary null checks(!) on SocketChannel instance in SocketClient onConnectionLost() method which cause an error when client cannot connect (zino-hofmann#1379). this prevents reconnecting when there is a working connection later.
aarsham
added a commit
to aarsham/graphql-flutter
that referenced
this issue
Apr 8, 2024
**Fixes** - Removed unnecessary null checks(!) on SocketChannel instance in SocketClient onConnectionLost() method which cause an error when client cannot connect (zino-hofmann#1379). this prevents reconnecting when there is a working connection later.
I have the same problem on Android (API 34). It crashes even the whole emulator at app start.
My client initialisation code looks like this: final errorLink = ErrorLink(
onException: (request, forward, exception) {
logger.e(exception);
return null;
},
);
final WebSocketLink websocketLink = WebSocketLink(
websocketBackendUrl,
config: SocketClientConfig(
autoReconnect: true,
inactivityTimeout: const Duration(seconds: 30),
initialPayload: () async {
// ... some authentication logic
}),
subProtocol: GraphQLProtocol.graphqlTransportWs,
);
Link link = errorLink.concat(websocketLink);
return GraphQLClient(
link: link,
cache: GraphQLCache(store: InMemoryStore()),
defaultPolicies: DefaultPolicies(
query: Policies(fetch: FetchPolicy.noCache),
mutate: Policies(fetch: FetchPolicy.noCache),
),
); The error occurres even when using version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
my error logger reports follwoing error:
The text was updated successfully, but these errors were encountered: