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.25k stars 620 forks source link

pub.dev: ERROR: Missing concrete implementation of 'getter WebSocketChannel.ready'. #1282

Closed larry-cariq closed 1 year ago

larry-cariq commented 1 year ago

Describe the issue The static analysis on pub.dev is reporting this error: ERROR: Missing concrete implementation of 'getter WebSocketChannel.ready'.

To Reproduce (MUST BE PROVIDED) browse to: https://pub.dev/packages/graphql/score

Expected behavior No static analysis errors.

Other useful/optional fields

Screen Shot 2023-01-11 at 3 45 12 PM
fennelhans commented 1 year ago

I have proposed a PR to fix this issue: https://github.com/zino-hofmann/graphql-flutter/pull/1281

fennelhans commented 1 year ago

This is preventing my team from merging ANY code to our repo. I hope the PR is merged quickly.

larry-cariq commented 1 year ago

Same for my team.

How did something break this?

fennelhans commented 1 year ago

Same for my team.

How did something break this?

The Dart team is at fault here -> https://pub.dev/packages/web_socket_channel/changelog#230

mlars84 commented 1 year ago

Same issue here. My CI/CD is crashing due to this on flutter stable.

vincenzopalazzo commented 1 year ago

why not override the web_socket_channel version? the fix looks trivial there

fennelhans commented 1 year ago

why not override the web_socket_channel version? the fix looks trivial there

Because the proper fix is a one-liner?

nicholasspencer commented 1 year ago

Seeing the same error.

ricardoamador commented 1 year ago

Hitting this issue as well. Can we have someone review the proposed change by @fennelhans please? This is a blocker now for my team.

../../.pub-cache/hosted/pub.dev/graphql-5.1.2/lib/src/links/websocket_link/websocket_client.dart:577: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.
devapalanisamy commented 1 year ago

It is fine on my machine. But it breaks on CI/CD.

fennelhans commented 1 year ago

It is fine on my machine. But it breaks on CI/CD.

It'll break if you do a flutter pub upgrade

wesbillman commented 1 year ago

Following up on @vincenzopalazzo 's comment. You can add this to your pubspec to fix your codebase until the team here has time to update

web_socket_channel: 2.2.0
vincenzopalazzo commented 1 year ago

Thanks for testing my idea @wesbillman I will release a hotfix of the graphql client that uses a fixed version of web_socket_channel and we introduce the new one in 5.2.0

aman246149 commented 1 year ago

The thing that works for me is

graphql_flutter: ^5.1.1 graphql_codegen: any web_socket_channel: 2.2.0

KOTLIN VERSION ext.kotlin_version = '1.7.0'

Flutter 3.3.9 • channel unknown • unknown source
Framework • revision b8f7f1f986 (8 months ago) • 2022-11-23 06:43:51 +0900 Engine • revision 8f2221fbef
Tools • Dart 2.18.5 • DevTools 2.15.0