fikretsengul/fab

'GraphQLWebSocketChannel' is missing implementations

Closed this issue · 3 comments

Hi,

I have the following issue when I run 'flutter test --update-goldens', same happens when I do "flutter run"

00:07 +0: loading ...\flutter_project\test\features\auth\login\bloc\login_screen_bloc_test.dart
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/graphql-5.1.1/lib/src/links/websocket_link/websocket_client.dart:470:7: Error: The non-abstract class 'GraphQLWebSocketChannel' is missing implementations for these       
members:
 - WebSocketChannel.ready
Try to either
 - provide an implementation,
 - inherit an implementation from a superclass or mixin,
 - mark the class as abstract, or
 - provide a 'noSuchMethod' implementation.

class GraphQLWebSocketChannel extends StreamChannelMixin<dynamic>
      ^^^^^^^^^^^^^^^^^^^^^^^
../../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/web_socket_channel-2.3.0/lib/src/channel.dart:56:22: Context: 'WebSocketChannel.ready' is defined here.
  final Future<void> ready = Future.value();

Flutter doctor result :
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.10, on Microsoft Windows [version 10.0.22000.1455], locale fr-FR)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.11)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.74.3)
[√] Connected device (3 available)
[√] HTTP Host Availability

This is caused by changes made to the web_socket_channel library. Specifically this commit. While flutter_graphql still has a dependency on web_socket_channel: ^2.2.0, something else in the dependency graph on this project is utilizing the 'latest and greatest' creating a direct dependency on the 2.3.0 version.

I think it's the graphql lib which is in turn using a beta version of artemis that can't be upgraded b/c of flutter_test. I think it's just a dependency graph mess. Maybe the owner knows how to unravel it.

I kept trying to move it all forward. Instead, just add the following to your pubspec.yaml

dependency_overrides:
  web_socket_channel: '2.2.0'

New version which is 1.0.0+6 is on the way. You can check and use stage branch until completing all other updates, bug fixes and merging to main. Here is the change log (other updates on the way stay tuned) @SimoGh @firephreek