http icon indicating copy to clipboard operation
http copied to clipboard

GraphQLWebSocketChannel Missing Implementations

Open PvtPuddles opened this issue 2 years ago • 0 comments

When building a flutter application using web_socket_channel version 2.3.0 or 2.4.0 I get the following error:

Launching lib/main.dart on Stephen’s iPhone in debug mode...
Automatically signing iOS for device deployment using specified development team in Xcode project: BRLDS4F7K4
Running pod install...
Running Xcode build...
Xcode build done.                                           12.7s
Failed to build iOS app
Could not build the precompiled application for the device.
Error (Xcode): ../../.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:


Error launching application on Stephen’s iPhone.

This occurs on both my iPhone and on my Android Emulator. The problem goes away if I override the web_socket_channel dependency to use version 2.2.0.

Here is the output for flutter doctor -v:

 flutter doctor -v
[!] Flutter (Channel stable, 3.7.11, on macOS 13.0 22A380 darwin-arm64, locale en-US)
    • Flutter version 3.7.11 on channel stable at /Users/stephen/Development/flutter
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.18.7/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
      /Users/stephen/Development/flutter. Consider adding /Users/stephen/Development/flutter/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f72efea43c (3 days ago), 2023-04-11 11:57:21 -0700
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/stephen/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] IntelliJ IDEA Community Edition (version 2022.3.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.74.2)
    • VS Code at /Users/stephen/Downloads/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (4 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554             • android-arm64  • Android 13 (API 33) (emulator)
    • Stephen’s iPhone (mobile)   • 00008110-001908A63AE8401E • ios            • iOS 16.3.1 20D67
    • macOS (desktop)             • macos                     • darwin-arm64   • macOS 13.0 22A380 darwin-arm64
    • Chrome (web)                • chrome                    • web-javascript • Google Chrome 112.0.5615.49

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.

PvtPuddles avatar Apr 14 '23 15:04 PvtPuddles