Skip to content
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

Error: The method 'disconnect' isn't defined for the class 'StreamChatClient'. #812

Closed
1 task done
rohan20 opened this issue Dec 8, 2021 · 10 comments
Closed
1 task done
Labels

Comments

@rohan20
Copy link

rohan20 commented Dec 8, 2021

Which packages are you using?

stream_chat_flutter

On what platforms did you experience the issue?

iOS

What version are you using?

stream_chat_flutter: ^2.0.0-nullsafety.4

What happened?

Actual behaviour:

I'm trying to migrate to null-safety which requires me to update a bunch of dependencies all at once. One of them being stream_chat_flutter. Upgrading from stream_chat_flutter: ^1.5.6 to stream_chat_flutter: ^2.0.0-nullsafety.4.

I get this error on running a test: See "Relevant log output".

Which at the end says:

Failed to load "/Users/r.taneja/Flutter Projects/dh-rsc-flutter/test/config/feature_config_test.dart":
Compilation failed
Test: /Users/r.taneja/Flutter Projects/dh-rsc-flutter/test/config/feature_config_test.dart
Shell: /Users/r.taneja/Documents/flutter/bin/cache/artifacts/engine/darwin-x64/flutter_tester

Expected behaviour:
I should be able to run the test.

Steps to reproduce

$ /Users/r.taneja/Documents/flutter/bin/flutter --no-color test --machine --start-paused test/config/feature_config_test.dart

Supporting info to reproduce

I've already tried deleting the .pub-cache folder from the Flutter SDK too.

Relevant log output

Error log
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/channel_list_header.dart:257:26: Error: The method 'disconnect' isn't defined for the class 'StreamChatClient'.
- 'StreamChatClient' is from 'package:stream_chat/src/client/client.dart' ('../../.pub-cache/hosted/pub.dartlang.org/stream_chat-2.2.1/lib/src/client/client.dart').
Try correcting the name to the name of an existing method, or defining a method named 'disconnect'.
          await client.disconnect();
                       ^^^^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/channel_list_header.dart:258:26: Error: The method 'connect' isn't defined for the class 'StreamChatClient'.
- 'StreamChatClient' is from 'package:stream_chat/src/client/client.dart' ('../../.pub-cache/hosted/pub.dartlang.org/stream_chat-2.2.1/lib/src/client/client.dart').
Try correcting the name to the name of an existing method, or defining a method named 'connect'.
          await client.connect();
                       ^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/channel_list_view.dart:177:7: Error: No named parameter with the name 'options'.
    options: widget.options,
    ^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter_core-2.2.1/lib/src/channel_list_core.dart:59:9: Context: Found this candidate, but the arguments don't match.
const ChannelListCore({
      ^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/channel_preview.dart:141:65: Warning: Operand of null-aware operation '?.' has type 'List<Read>' which excludes null.
- 'List' is from 'dart:core'.
- 'Read' is from 'package:stream_chat/src/core/models/read.dart' ('../../.pub-cache/hosted/pub.dartlang.org/stream_chat-2.2.1/lib/src/core/models/read.dart').
                                isMessageRead: channel.state!.read
                                                              ^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/message_list_view.dart:339:7: Error: No named parameter with the name 'showScrollToBottom'.
    showScrollToBottom: widget.showScrollToBottom,
    ^^^^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter_core-2.2.1/lib/src/message_list_core.dart:65:9: Context: Found this candidate, but the arguments don't match.
const MessageListCore({
      ^^^^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/message_list_view.dart:786:30: Warning: Operand of null-aware operation '!' has type 'int' which excludes null.
            channel.state!.unreadCount! > 0) {
                           ^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/message_list_view.dart:1164:23: Warning: Operand of null-aware operation '!' has type 'List<Message>' which excludes null.
- 'List' is from 'dart:core'.
- 'Message' is from 'package:stream_chat/src/core/models/message.dart' ('../../.pub-cache/hosted/pub.dartlang.org/stream_chat-2.2.1/lib/src/core/models/message.dart').
                    messages!.firstWhere((m) => m.id == message.id)),
                    ^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/typing_indicator.dart:37:33: Error: The argument type 'Map<User, Event>' can't be assigned to the parameter type 'List<User>?'.
- 'Map' is from 'dart:core'.
- 'User' is from 'package:stream_chat/src/core/models/user.dart' ('../../.pub-cache/hosted/pub.dartlang.org/stream_chat-2.2.1/lib/src/core/models/user.dart').
- 'Event' is from 'package:stream_chat/src/core/models/event.dart' ('../../.pub-cache/hosted/pub.dartlang.org/stream_chat-2.2.1/lib/src/core/models/event.dart').
- 'List' is from 'dart:core'.
    initialData: channelState.typingEvents,
                              ^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/typing_indicator.dart:38:28: Error: The argument type 'Stream<Map<User, Event>>' can't be assigned to the parameter type 'Stream<List<User>>?'.
- 'Stream' is from 'dart:async'.
- 'Map' is from 'dart:core'.
- 'User' is from 'package:stream_chat/src/core/models/user.dart' ('../../.pub-cache/hosted/pub.dartlang.org/stream_chat-2.2.1/lib/src/core/models/user.dart').
- 'Event' is from 'package:stream_chat/src/core/models/event.dart' ('../../.pub-cache/hosted/pub.dartlang.org/stream_chat-2.2.1/lib/src/core/models/event.dart').
- 'List' is from 'dart:core'.
    stream: channelState.typingEventsStream,
                         ^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/user_list_view.dart:180:7: Error: No named parameter with the name 'options'.
    options: widget.options,
    ^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter_core-2.2.1/lib/src/user_list_core.dart:60:9: Context: Found this candidate, but the arguments don't match.
const UserListCore({
      ^^^^^^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/channel_info.dart:136:28: Error: The method 'disconnect' isn't defined for the class 'StreamChatClient'.
- 'StreamChatClient' is from 'package:stream_chat/src/client/client.dart' ('../../.pub-cache/hosted/pub.dartlang.org/stream_chat-2.2.1/lib/src/client/client.dart').
Try correcting the name to the name of an existing method, or defining a method named 'disconnect'.
            await client.disconnect();
                         ^^^^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/channel_info.dart:137:28: Error: The method 'connect' isn't defined for the class 'StreamChatClient'.
- 'StreamChatClient' is from 'package:stream_chat/src/client/client.dart' ('../../.pub-cache/hosted/pub.dartlang.org/stream_chat-2.2.1/lib/src/client/client.dart').
Try correcting the name to the name of an existing method, or defining a method named 'connect'.
            await client.connect();
                         ^^^^^^^
../../.pub-cache/hosted/pub.dartlang.org/stream_chat_flutter-2.0.0-nullsafety.4/lib/src/message_actions_modal.dart:344:20: Error: 'ApiError' isn't a type.
      if (err is ApiError && json.decode(err.body ?? '{}')['code'] == 4) {

                 ^^^^^^^^
dart:async/stream_controller.dart 561:44                       _StreamController.addError
dart:async/stream_controller.dart 830:13                       _StreamSinkWrapper.addError
package:stream_channel/src/guarantee_channel.dart 145:14       _GuaranteeSink._addError
package:stream_channel/src/guarantee_channel.dart 136:5        _GuaranteeSink.addError
package:flutter_tools/src/test/flutter_platform.dart 439:27    FlutterPlatform._startTest
===== asynchronous gap ===========================
dart:async/zone.dart 1286:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 40:23                        _asyncThenWrapperHelper
package:flutter_tools/src/test/flutter_platform.dart 341:36    FlutterPlatform.loadChannel
package:flutter_tools/src/test/flutter_platform.dart 306:44    FlutterPlatform.load
package:test_core/src/runner/loader.dart 225:38                Loader.loadFile.<fn>
===== asynchronous gap ===========================
dart:async/zone.dart 1286:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 40:23                        _asyncThenWrapperHelper
package:test_core/src/runner/loader.dart                       Loader.loadFile.<fn>
package:test_core/src/runner/load_suite.dart 97:31             new LoadSuite.<fn>.<fn>
package:test_core/src/runner/load_suite.dart 96:17             new LoadSuite.<fn>.<fn>
package:test_core/src/runner/load_suite.dart 107:8             new LoadSuite.<fn>
package:test_api/src/backend/invoker.dart 231:15               Invoker.waitForOutstandingCallbacks.<fn>
package:test_api/src/backend/invoker.dart 228:14               Invoker.waitForOutstandingCallbacks.<fn>
dart:async/zone.dart 1354:13                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1788:10                                   _runZoned
dart:async/zone.dart 1710:10                                   runZoned
package:test_api/src/backend/invoker.dart 228:5                Invoker.waitForOutstandingCallbacks
package:test_api/src/backend/invoker.dart 383:17               Invoker._onRun.<fn>.<fn>.<fn>
===== asynchronous gap ===========================
dart:async/zone.dart 1286:19                                   _CustomZone.registerUnaryCallback
dart:async-patch/async_patch.dart 40:23                        _asyncThenWrapperHelper
package:test_api/src/backend/invoker.dart                      Invoker._onRun.<fn>.<fn>.<fn>
dart:async/zone.dart 1354:13                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1788:10                                   _runZoned
dart:async/zone.dart 1710:10                                   runZoned
package:test_api/src/backend/invoker.dart 370:9                Invoker._onRun.<fn>.<fn>
dart:async/zone.dart 1354:13                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1788:10                                   _runZoned
dart:async/zone.dart 1710:10                                   runZoned
package:test_api/src/backend/invoker.dart 150:7                Invoker.guard
package:test_api/src/backend/invoker.dart 413:15               Invoker._guardIfGuarded
package:test_api/src/backend/invoker.dart 369:7                Invoker._onRun.<fn>
package:stack_trace/src/chain.dart 94:24                       Chain.capture.<fn>
dart:async/zone.dart 1354:13                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1788:10                                   _runZoned
dart:async/zone.dart 1710:10                                   runZoned
package:stack_trace/src/chain.dart 92:12                       Chain.capture
package:test_api/src/backend/invoker.dart 368:11               Invoker._onRun
package:test_api/src/backend/live_test_controller.dart 153:11  LiveTestController.run
dart:async/future.dart 198:37                                  new Future.microtask.<fn>
dart:async/zone.dart 1346:47                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1162:7                                    _CustomZone.runGuarded
dart:async/zone.dart 1202:23                                   _CustomZone.bindCallbackGuarded.<fn>
dart:async/zone.dart 1354:13                                   _rootRun
dart:async/zone.dart 1258:19                                   _CustomZone.run
dart:async/zone.dart 1162:7                                    _CustomZone.runGuarded
dart:async/zone.dart 1202:23                                   _CustomZone.bindCallbackGuarded.<fn>
dart:async/schedule_microtask.dart 40:21                       _microtaskLoop
dart:async/schedule_microtask.dart 49:5                        _startMicrotaskLoop
dart:isolate-patch/isolate_patch.dart 120:13                   _runPendingImmediateCallback
dart:isolate-patch/isolate_patch.dart 185:5                    _RawReceivePortImpl._handleMessage

Failed to load "/Users/r.taneja/Flutter Projects/dh-rsc-flutter/test/config/feature_config_test.dart":
Compilation failed
Test: /Users/r.taneja/Flutter Projects/dh-rsc-flutter/test/config/feature_config_test.dart
Shell: /Users/r.taneja/Documents/flutter/bin/cache/artifacts/engine/darwin-x64/flutter_tester

Flutter analyze output

To reiterate, I'm in the middle of migrating dependencies to their null-safe versions using dart pub upgrade --null-safety and fixing breaking changes:

Warning: You are using these overridden dependencies:                   
! intl 0.17.0                                                           
Running "flutter pub get" in dh-rsc-flutter...                   1,930ms
Analyzing dh-rsc-flutter...                                             

   info • 'requestLock' is deprecated and shouldn't be used. Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see https://github.com/flutterchina/dio/issues/1308 • lib/core/network/dio_client.dart:131:22 • deprecated_member_use
   info • 'responseLock' is deprecated and shouldn't be used. Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see https://github.com/flutterchina/dio/issues/1308 • lib/core/network/dio_client.dart:132:22 • deprecated_member_use
   info • 'errorLock' is deprecated and shouldn't be used. Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see https://github.com/flutterchina/dio/issues/1308 • lib/core/network/dio_client.dart:133:22 • deprecated_member_use
   info • 'requestLock' is deprecated and shouldn't be used. Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see https://github.com/flutterchina/dio/issues/1308 • lib/core/network/dio_client.dart:166:24 • deprecated_member_use
   info • 'responseLock' is deprecated and shouldn't be used. Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see https://github.com/flutterchina/dio/issues/1308 • lib/core/network/dio_client.dart:167:24 • deprecated_member_use
   info • 'errorLock' is deprecated and shouldn't be used. Will delete in v5.0. Use `QueuedInterceptor` instead, more detail see https://github.com/flutterchina/dio/issues/1308 • lib/core/network/dio_client.dart:168:24 • deprecated_member_use
   info • The method doesn't override an inherited method • lib/features/cart/presentation/bloc/cart_bloc.dart:48:21 • override_on_non_overriding_member
   info • The method doesn't override an inherited method • lib/features/catalogue/presentation/catalogue_page/bloc/catalogue_bloc.dart:51:26 • override_on_non_overriding_member
   info • The method doesn't override an inherited method • lib/features/chat/presentation/channel/bloc/channel_bloc.dart:41:50 • override_on_non_overriding_member
   info • The method doesn't override an inherited method • lib/features/chat/presentation/channel/bloc/channel_bloc.dart:46:24 • override_on_non_overriding_member
   info • The method doesn't override an inherited method • lib/features/force_update/bloc/force_update_bloc.dart:41:28 • override_on_non_overriding_member

11 issues found. (ran in 8.2s)

Flutter doctor output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.1, on macOS 11.6 20G165 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc5)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.2.3)
[✓] Connected device (2 available)

• No issues found!

Code of Conduct

  • I agree to follow this project's Code of Conduct
@rohan20 rohan20 added the bug Something isn't working label Dec 8, 2021
@deven98
Copy link
Contributor

deven98 commented Dec 9, 2021

Hey @rohan20,

We'd recommend moving to a more recent version (stream_chat_flutter: ^3.3.1 or similar).
Is there any specific reason you're choosing to upgrade to 2.0.0-nullsafety.4?

@rohan20
Copy link
Author

rohan20 commented Dec 9, 2021

Hi @deven98, I would've definitely moved to a newer version if it were possible. But based on other dependencies, this is the most latest version that my project is eligible to upgrade to.

There are conflicts with versions of photo_view and chewie if I try to use a more recent version.

To confirm, does that mean that there's a bug somewhere on thev2.0.0-nullsafety.4 release or is it something else on my end?

Thanks.

@deven98
Copy link
Contributor

deven98 commented Dec 9, 2021

Hey @rohan20,

There likely shouldn't be a bug (I can take a better look at this if you like).
However, I think a better resolution to this is fixing the conflicts that are arising.

I'm currently taking a look at the chewie conflict (I'm assuming you're facing the same: #805)

Can you let me know the error with photo_view as well?

Thanks.

@rohan20
Copy link
Author

rohan20 commented Dec 9, 2021

Okay, so the chewie error on trying to upgrade to ^2.0.0-nullsafety.5 is because we're not on a newer Dart version (2.13.0). We cannot afford to do that at the moment since it'll be a huge change for the codebase.
image

So can we please figure out how to get ^2.0.0-nullsafety.4 to work?

From what I understand:

  • stream_chat_flutter v2.0.0-nullsafety.4 uses stream_chat v2.2.1 internally.
  • ChannelInfo class from stream_chat_flutter calls await client.disconnect(); on line 136.
  • But StreamChatClient class from client.dart doesn't have a disconnect() method.

I cannot comprehend this if this is not a bug. Is there a patch version that can be released on top of v2.0.0-nullsafety.4 that fixes this?

Thank you.

@rohan20
Copy link
Author

rohan20 commented Dec 15, 2021

cc: @imtoori

Hey Salvatore, pinging again just in case this got missed after our Slack conversation. 😬 Thanks!

@imtoori
Copy link
Contributor

imtoori commented Dec 15, 2021

hey @rohan20 check your dms

@rohan20
Copy link
Author

rohan20 commented Dec 16, 2021

Hi @imtoori,

can you try adding this to your pubspec?

dependency_overrides:
  stream_chat_flutter_core: 2.0.0-nullsafety.3
  stream_chat: 2.0.0-nullsafety.2

The suggested changes cause pod install to fail during the iOS build process and also causes an error on Android:

iOS Logs
  Launching lib/main.dart on iPhone 8 Plus in debug mode...
  Running pod install...
  CocoaPods' output:
  
        Preparing
  
      Analyzing dependencies
  
      Inspecting targets to integrate
        Using `ARCHS` setting to build architectures of target `Pods-Runner`: 
      Finding Podfile changes
        A connectivity_plus
        A package_info_plus
        R connectivity
        R flutter_user_agent
        - Flutter
        - adjust_sdk
        - contacts_service
        - file_picker
        - firebase_analytics
        - firebase_core
        - firebase_crashlytics
        - firebase_messaging
        - firebase_remote_config
        - flutter_keyboard_visibility
        - flutter_local_notifications
        - flutter_sms
        - image_gallery_saver
        - image_picker
        - package_info
        - path_provider
        - permission_handler
        - photo_manager
        - sentry_flutter
        - share_plus
        - shared_preferences
        - sqflite
        - sqlite3_flutter_libs
        - url_launcher
        - video_compress
        - video_player
        - video_thumbnail
        - wakelock
        - webview_flutter
  
      Fetching external sources
      -> Fetching podspec for `Flutter` from `Flutter`
      -> Fetching podspec for `adjust_sdk` from `.symlinks/plugins/adjust_sdk/ios`
      -> Fetching podspec for `connectivity_plus` from `.symlinks/plugins/connectivity_plus/ios`
      -> Fetching podspec for `contacts_service` from `.symlinks/plugins/contacts_service/ios`
      -> Fetching podspec for `file_picker` from `.symlinks/plugins/file_picker/ios`
      -> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`
      firebase_analytics: Using Firebase SDK version '8.9.0' defined in 'firebase_core'
      -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
      firebase_core: Using Firebase SDK version '8.9.0' defined in 'firebase_core'
      -> Fetching podspec for `firebase_crashlytics` from `.symlinks/plugins/firebase_crashlytics/ios`
      firebase_crashlytics: Using Firebase SDK version '8.9.0' defined in 'firebase_core'
      -> Fetching podspec for `firebase_messaging` from `.symlinks/plugins/firebase_messaging/ios`
      firebase_messaging: Using Firebase SDK version '8.9.0' defined in 'firebase_core'
      -> Fetching podspec for `firebase_remote_config` from `.symlinks/plugins/firebase_remote_config/ios`
      firebase_remote_config: Using Firebase SDK version '8.9.0' defined in 'firebase_core'
      -> Fetching podspec for `flutter_keyboard_visibility` from `.symlinks/plugins/flutter_keyboard_visibility/ios`
      -> Fetching podspec for `flutter_local_notifications` from `.symlinks/plugins/flutter_local_notifications/ios`
      -> Fetching podspec for `flutter_sms` from `.symlinks/plugins/flutter_sms/ios`
      -> Fetching podspec for `image_gallery_saver` from `.symlinks/plugins/image_gallery_saver/ios`
      -> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`
      -> Fetching podspec for `package_info` from `.symlinks/plugins/package_info/ios`
      -> Fetching podspec for `package_info_plus` from `.symlinks/plugins/package_info_plus/ios`
      -> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
      -> Fetching podspec for `permission_handler` from `.symlinks/plugins/permission_handler/ios`
      -> Fetching podspec for `photo_manager` from `.symlinks/plugins/photo_manager/ios`
      -> Fetching podspec for `sentry_flutter` from `.symlinks/plugins/sentry_flutter/ios`
      -> Fetching podspec for `share_plus` from `.symlinks/plugins/share_plus/ios`
      -> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
      -> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`
      -> Fetching podspec for `sqlite3_flutter_libs` from `.symlinks/plugins/sqlite3_flutter_libs/ios`
      -> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios`
      -> Fetching podspec for `video_compress` from `.symlinks/plugins/video_compress/ios`
      -> Fetching podspec for `video_player` from `.symlinks/plugins/video_player/ios`
      -> Fetching podspec for `video_thumbnail` from `.symlinks/plugins/video_thumbnail/ios`
      -> Fetching podspec for `wakelock` from `.symlinks/plugins/wakelock/ios`
      -> Fetching podspec for `webview_flutter` from `.symlinks/plugins/webview_flutter/ios`
  
      Resolving dependencies of `Podfile`
        CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: all_pods_versions_5_1_d.txt exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/5/1/d/Adjust/4.29.6/Adjust.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: all_pods_versions_c_7_9.txt exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/c/7/9/Reachability/3.2/Reachability.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: all_pods_versions_1_6_1.txt exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/1/6/1/DKImagePickerController/4.3.2/DKImagePickerController.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/1/6/1/DKImagePickerController/4.3.2/DKImagePickerController.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/0/3/5/Firebase/8.10.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: all_pods_versions_4_2_c.txt exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/4/2/c/FlutterMacOS/2.5/FlutterMacOS.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: all_pods_versions_a_b_d.txt exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/a/b/d/Sentry/7.7.0/Sentry.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: all_pods_versions_f_4_e.txt exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/f/4/e/FMDB/2.7.5/FMDB.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: all_pods_versions_1_9_2.txt exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/1/9/2/libwebp/1.2.1/libwebp.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: all_pods_versions_d_c_2.txt exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.37.0/sqlite3.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.35.5/sqlite3.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.35.5/sqlite3.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.35.5/sqlite3.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.35.5/sqlite3.podspec.json exists! Returning local because checking is only perfomed in repo update
        CDN: trunk Relative path: Specs/0/3/5/Firebase/8.9.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
      [!] CocoaPods could not find compatible versions for pod "Firebase/Crashlytics":
        In snapshot (Podfile.lock):
          Firebase/Crashlytics (= 7.3.0)
  
        In Podfile:
          firebase_crashlytics (from `.symlinks/plugins/firebase_crashlytics/ios`) was resolved to 2.4.0, which depends on
            Firebase/Crashlytics (= 8.9.0)
  
  
      You have either:
       * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
       * changed the constraints of dependency `Firebase/Crashlytics` inside your development pod `firebase_crashlytics`.
         You should run `pod update Firebase/Crashlytics` to apply changes you've made.
  
      /usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
      /usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
      <internal:kernel>:90:in `tap'
      /usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
      /usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:257:in `process_topmost_state'
      /usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
      /usr/local/lib/ruby/gems/3.0.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/resolver.rb:94:in `resolve'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
      /usr/local/lib/ruby/gems/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
      /usr/local/lib/ruby/gems/3.0.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
      /usr/local/lib/ruby/gems/3.0.0/bin/pod:23:in `load'
      /usr/local/lib/ruby/gems/3.0.0/bin/pod:23:in `<main>'
  
  Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
  To update the CocoaPods specs, run:
    pod repo update
  
  Error running pod install
  Error launching application on iPhone 8 Plus.

Android Logs
  Launching lib/main.dart on Android SDK built for x86 in debug mode...
  Running Gradle task 'assembleFoodpandaUATDebug'...
  e: /Users/r.taneja/.pub-cache/hosted/pub.dartlang.org/image_gallery_saver-1.6.9/android/src/main/kotlin/com/example/imagegallerysaver/ImageGallerySaverPlugin.kt: (19, 7): Redeclaration: ImageGallerySaverPlugin
  e: /Users/r.taneja/.pub-cache/hosted/pub.dartlang.org/image_gallery_saver-1.6.9/android/src/main/kotlin/com/example/imagegallerysaver/ImageGallerySaverPlugin.kt: (113, 7): Redeclaration: SaveResultModel
  e: /Users/r.taneja/.pub-cache/hosted/pub.dartlang.org/image_gallery_saver-1.7.1/android/src/main/kotlin/com/example/imagegallerysaver/ImageGallerySaverPlugin.kt: (26, 7): Redeclaration: ImageGallerySaverPlugin
  e: /Users/r.taneja/.pub-cache/hosted/pub.dartlang.org/image_gallery_saver-1.7.1/android/src/main/kotlin/com/example/imagegallerysaver/ImageGallerySaverPlugin.kt: (34, 52): No value passed for parameter 'registrar'
  e: /Users/r.taneja/.pub-cache/hosted/pub.dartlang.org/image_gallery_saver-1.7.1/android/src/main/kotlin/com/example/imagegallerysaver/ImageGallerySaverPlugin.kt: (35, 22): Unresolved reference: onAttachedToEngine
  e: /Users/r.taneja/.pub-cache/hosted/pub.dartlang.org/image_gallery_saver-1.7.1/android/src/main/kotlin/com/example/imagegallerysaver/ImageGallerySaverPlugin.kt: (159, 7): Redeclaration: SaveResultModel

 FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':image_gallery_saver:compileDebugKotlin'.
  >> Compilation error. See log for more details
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 1m 18s
  Exception: Gradle task assembleFoodpandaUATDebug failed with exit code 1

If I may ask, what is the source of the issue for which this solution was proposed?

@imtoori
Copy link
Contributor

imtoori commented Dec 16, 2021

hey @rohan20 I'm not sure, I think that's not due to the dependency_overrides

I'm trying building a very simple app with the version of the package you're using and I'm getting other errors related to other dependencies
I'll try solving those, but I'm afraid there isn't much we can do

@imtoori
Copy link
Contributor

imtoori commented Dec 17, 2021

@rohan20 I just compiled the app for both android and ios
I wasn't succeeding because I was on a more recent flutter version, but I tried using fvm and it's compiling
I think those error logs are due to some dependency caching or something like that

@no-response
Copy link

no-response bot commented Dec 24, 2021

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away! Thanks for your contribution.

@no-response no-response bot closed this as completed Dec 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants