aws-amplify / amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
https://docs.amplify.aws
Apache License 2.0
1.31k stars 242 forks source link

Incompatible with amplify_secure_storage_dart #2018

Closed Sunsiha closed 2 years ago

Sunsiha commented 2 years ago

Description

Hello, I was using amplify 0.6.1 version.

amplify_flutter: ^0.6.1
amplify_auth_cognito: ^0.6.1

Now I wanted to switch my application to web. So I was trying this pre released version;

amplify_flutter: ^1.0.0-next.0+1
amplify_auth_cognito: ^1.0.0-next.0+2

But am not able to get pub. It's throwing an error with other plugins;

Because file_picker ^4.0.0 depends on ffi ^1.1.2 and every version of amplify_secure_storage_dart depends on ffi ^2.0.0, file_picker ^4.0.0 is incompatible with amplify_secure_storage_dart.
And because amplify_flutter >=1.0.0-next.0 depends on amplify_secure_storage 0.1.0 which depends on amplify_secure_storage_dart ^0.1.0, file_picker ^4.0.0 is incompatible with amplify_flutter >=1.0.0-next.0.
So, because dsaas depends on both amplify_flutter ^1.0.0-next.0+1 and file_picker ^4.3.0, version solving failed.
pub get failed (1; So, because *** depends on both amplify_flutter ^1.0.0-next.0+1 and file_picker ^4.3.0, version solving failed.)

I tried the following steps to solve;

  1. Deleted pubspec.lock
  2. Deleted .packages
  3. Flutter clean and restarted the IDE
  4. Upgraded file picker plugin still getting error. Nothing works.

When am switching to 0.6.1 version it's not throwing any error.

Categories

Steps to Reproduce

No response

Screenshots

No response

Platforms

Android Device/Emulator API Level

No response

Environment

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.4, on macOS 12.3.1 21E258 darwin-x64, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    ✗ 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 13.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.62.2)
[✓] Connected device (4 available)
    ! Error: Manikandan’s iPhone is not connected. Xcode will continue when Manikandan’s iPhone is connected. (code -13)
[✓] HTTP Host Availability

! Doctor found issues in 1 category.

Dependencies

Dart SDK 2.17.5
Flutter SDK 3.0.4
**** 1.0.0+1

dependencies:
- amplify_auth_cognito 0.6.5 [amplify_auth_cognito_android amplify_auth_cognito_ios amplify_core aws_common collection flutter meta plugin_platform_interface]
- amplify_flutter 0.6.5 [amplify_core amplify_datastore_plugin_interface amplify_flutter_android amplify_flutter_ios aws_common collection flutter meta plugin_platform_interface]
- bloc 7.2.1 [meta]
- chewie 1.3.4 [cupertino_icons flutter provider video_player wakelock]
- connectivity_plus 2.3.6 [flutter connectivity_plus_platform_interface connectivity_plus_linux connectivity_plus_macos connectivity_plus_web connectivity_plus_windows]
- device_info 2.0.3 [flutter device_info_platform_interface]
- dio 4.0.6 [http_parser path]
- dotted_border 2.0.0+2 [flutter path_drawing]
- dropdown_button2 1.7.1 [flutter]
- equatable 2.0.3 [collection meta]
- file_picker 4.6.1 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32]
- firebase_core 1.20.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_messaging 11.4.4 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_bloc 7.3.3 [flutter bloc provider]
- flutter_email_sender 5.1.0 [flutter]
- flutter_html 3.0.0-alpha.5 [html csslib collection numerus flutter]
- flutter_inappwebview 5.4.3+7 [flutter]
- flutter_local_notifications 9.7.0 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone]
- flutter_phone_direct_caller 2.1.1 [flutter]
- flutter_rating_bar 4.0.1 [flutter]
- flutter_screenutil 5.5.3+2 [flutter]
- flutter_styled_toast 2.1.3 [flutter flutter_localizations]
- flutter_svg 1.1.3 [flutter meta path_drawing vector_math xml]
- flutter_typeahead 3.2.7 [flutter flutter_keyboard_visibility]
- google_place 0.4.7 [http]
- html_editor_enhanced 2.5.0 [flutter flutter_inappwebview visibility_detector flutter_keyboard_visibility flex_color_picker file_picker numberpicker pointer_interceptor pedantic meta]
- http 0.13.5 [async http_parser meta path]
- intl 0.17.0 [clock path]
- jaguar_jwt 3.0.0 [auth_header crypto]
- lottie 1.4.1 [archive flutter path vector_math]
- mime 1.0.2
- open_file 3.2.1 [flutter ffi]
- path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- permission_handler 8.3.0 [flutter meta permission_handler_platform_interface]
- shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- shimmer 2.0.0 [flutter]
- url_launcher 6.1.5 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- video_player 2.4.6 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web]

dependency overrides:
- cupertino_icons 1.0.5
- firebase_messaging_platform_interface 3.5.2 [firebase_core flutter meta plugin_platform_interface]

transitive dependencies:
- amplify_auth_cognito_android 0.6.5 [flutter]
- amplify_auth_cognito_ios 0.6.5 [amplify_core flutter]
- amplify_core 0.6.5 [aws_common collection flutter intl json_annotation meta plugin_platform_interface uuid]
- amplify_datastore_plugin_interface 0.6.5 [amplify_core collection flutter meta]
- amplify_flutter_android 0.6.5 [flutter]
- amplify_flutter_ios 0.6.5 [amplify_core flutter]
- archive 3.3.1 [crypto path]
- args 2.3.1
- async 2.8.2 [collection meta]
- auth_header 3.0.1
- aws_common 0.1.1 [async collection http meta stream_transform uuid]
- boolean_selector 2.1.0 [source_span string_scanner]
- characters 1.2.0
- charcode 1.3.1
- clock 1.1.0
- collection 1.16.0
- connectivity_plus_linux 1.3.1 [flutter connectivity_plus_platform_interface meta nm]
- connectivity_plus_macos 1.2.4 [connectivity_plus_platform_interface flutter]
- connectivity_plus_platform_interface 1.2.1 [flutter meta plugin_platform_interface]
- connectivity_plus_web 1.2.3 [connectivity_plus_platform_interface flutter_web_plugins flutter]
- connectivity_plus_windows 1.2.2 [connectivity_plus_platform_interface flutter]
- crypto 3.0.2 [typed_data]
- csslib 0.17.2 [source_span]
- dbus 0.7.4 [args ffi meta xml]
- device_info_platform_interface 2.0.1 [flutter meta plugin_platform_interface]
- fake_async 1.3.0 [clock collection]
- ffi 1.2.1
- file 6.1.2 [meta path]
- firebase_core_platform_interface 4.5.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 1.7.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_messaging_web 2.4.4 [firebase_core firebase_core_web firebase_messaging_platform_interface flutter flutter_web_plugins js meta]
- flex_color_picker 2.5.0 [flutter material_color_utilities]
- flutter_keyboard_visibility 5.3.0 [meta flutter_keyboard_visibility_platform_interface flutter_keyboard_visibility_web flutter]
- flutter_keyboard_visibility_platform_interface 2.0.0 [flutter meta plugin_platform_interface]
- flutter_keyboard_visibility_web 2.0.0 [flutter_keyboard_visibility_platform_interface flutter_web_plugins flutter]
- flutter_local_notifications_linux 0.5.1 [flutter flutter_local_notifications_platform_interface dbus path xdg_directories]
- flutter_local_notifications_platform_interface 5.0.0 [flutter plugin_platform_interface]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_plugin_android_lifecycle 2.0.7 [flutter]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- html 0.15.0 [csslib source_span]
- http_parser 4.0.1 [collection source_span string_scanner typed_data]
- infinite_listview 1.1.0 [flutter]
- js 0.6.4
- json_annotation 4.6.0 [meta]
- matcher 0.12.11 [stack_trace]
- material_color_utilities 0.1.4
- meta 1.7.0
- nested 1.0.0 [flutter]
- nm 0.5.0 [dbus]
- numberpicker 2.1.1 [flutter infinite_listview]
- numerus 1.1.1
- path 1.8.1
- path_drawing 1.0.1 [vector_math meta path_parsing flutter]
- path_parsing 1.0.1 [vector_math meta]
- path_provider_android 2.0.17 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.11 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.4 [flutter platform plugin_platform_interface]
- path_provider_windows 2.0.7 [ffi flutter path path_provider_platform_interface win32]
- pedantic 1.11.1
- permission_handler_platform_interface 3.7.0 [flutter meta plugin_platform_interface]
- petitparser 5.0.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.2 [meta]
- pointer_interceptor 0.9.3+2 [flutter]
- process 4.2.4 [file path platform]
- provider 6.0.3 [collection flutter nested]
- shared_preferences_android 2.0.12 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.0.0 [flutter]
- shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- sky_engine 0.0.99
- source_span 1.8.2 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.0
- string_scanner 1.1.0 [charcode source_span]
- term_glyph 1.2.0
- test_api 0.4.9 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timezone 0.8.0 [path]
- typed_data 1.3.1 [collection]
- url_launcher_android 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.1.0 [flutter plugin_platform_interface]
- url_launcher_web 2.0.13 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface]
- uuid 3.0.6 [crypto]
- vector_math 2.1.2
- video_player_android 2.3.8 [flutter video_player_platform_interface]
- video_player_avfoundation 2.3.5 [flutter video_player_platform_interface]
- video_player_platform_interface 5.1.4 [flutter plugin_platform_interface]
- video_player_web 2.0.12 [flutter flutter_web_plugins video_player_platform_interface]
- visibility_detector 0.3.3 [flutter]
- wakelock 0.6.2 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web wakelock_windows]
- wakelock_macos 0.4.0 [flutter flutter_web_plugins wakelock_platform_interface]
- wakelock_platform_interface 0.3.0 [flutter meta]
- wakelock_web 0.4.0 [flutter flutter_web_plugins js wakelock_platform_interface]
- wakelock_windows 0.2.0 [flutter wakelock_platform_interface win32]
- win32 2.6.1 [ffi]
- xdg_directories 0.2.0+1 [meta path process]
- xml 6.1.0 [collection meta petitparser]

Device

N/A

OS

N/A

CLI Version

7.6.4

Additional Context

Already my application is live. So can't replace plugins. Should I go with this plugin or need to go with other amazon_cognito_identity_dart_2: ^3.0.0. Since it's very urgent requirement. Thanks.

Jordan-Nelson commented 2 years ago

Hi @Sunsiha - It looks like your app depends on file_picker v4.6.1, which depends on ffi v1.x.x. The latest version of amplify flutter depends on ffi v2.x.x. The issue you are seeing is that Pub cannot find a version of ffi that satisfies both version constraints.

You can resolve it by upgrading the version of file_picker to version 5.0.0 or higher, which depends on ffi v2.x.x.

Sunsiha commented 2 years ago

Hi @Jordan-Nelson I have upgraded file_picker: ^5.0.1 to this. But still getting

Because html_editor_enhanced >=2.5.0 depends on file_picker ^4.6.0 and **** depends on file_picker ^5.0.0, html_editor_enhanced >=2.5.0 is forbidden.
So, because **** depends on html_editor_enhanced ^2.5.0, version solving failed.
pub get failed (1; So, because **** depends on html_editor_enhanced ^2.5.0, version solving failed.)

html_editor_enhanced am using the latest version html_editor_enhanced: ^2.5.0. Still conflict is there with this amplify version. Many plugins are conflicted with this latest version of amplify.

Sunsiha commented 2 years ago

@Jordan-Nelson Am trying to replace the plugins affected. Will let you know after that.

Jordan-Nelson commented 2 years ago

There is an open issue in html_editor_enhanced asking for the version of file_picker to be bumped to the latest version. See https://github.com/tneotia/html-editor-enhanced/issues/295.

Jordan-Nelson commented 2 years ago

It looks like there is an open PR as well.

You can temporarily override the dependency from html_editor_enhanced. See https://dart.dev/tools/pub/dependencies#dependency-overrides

Sunsiha commented 2 years ago

@Jordan-Nelson Yeah I have upgraded those plugins which I got conflict.

open_filex:
    git:
      url: https://github.com/GoldenSoju/open_file.git

 html_editor_enhanced:
    git:
      url: https://github.com/ksilz/html-editor-enhanced

file_picker: ^5.0.0

All done. Working fine now. But will be raising new issues soon with token may be. Will let you know. We can close this ticket.

Thanks!