firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.71k stars 3.97k forks source link

🐛 [firebase_storage] Version solving failed for most recent http version (v1.0.0) #11073

Closed FXschwartz closed 1 year ago

FXschwartz commented 1 year ago

Bug report

Describe the bug Firebase storage requires an older version of the http package that was recently released. Causing a version-solving failed error when trying to upgrade.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create a new Flutter app
  2. Add the most recent versions of Firebase Storage (v11.2.2) and http (v1.0.0) packages
  3. Run flutter pub get
  4. See error for dependency version conflict

Expected behavior

Should be able to use the latest versions of both packages

Sample project

N/A


Additional context

N/A


Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand ``` [✓] Flutter (Channel stable, 3.10.0, on Microsoft Windows [Version 10.0.22621.1778], locale en-US) • Flutter version 3.10.0 on channel stable at C:\dev\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 84a1e904f4 (3 weeks ago), 2023-05-09 07:41:44 -0700 • Engine revision d44b5a94c9 • Dart version 3.0.0 • DevTools version 2.23.1 [✓] Windows Version (Installed version of Windows is version 10 or higher) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at C:\Users\Preston\AppData\Local\Android\sdk • Platform android-33-ext5, build-tools 33.0.2 • Java binary at: C:\Users\Preston\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\222.4459.24.2221.9971841\jbr\bin\java • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694) • All Android licenses accepted. [✗] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✓] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.26) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools • Visual Studio Build Tools 2019 version 16.11.33529.622 • Windows 10 SDK version 10.0.19041.0 [✓] Android Studio (version 2022.2) • Android Studio at C:\Users\Preston\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\222.4459.24.2221.9971841 • Flutter plugin version 73.0.1 • Dart plugin version 221.6103.1 • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694) [✓] VS Code (version 1.78.2) • VS Code at C:\Users\Preston\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.64.0 [✓] Connected device (3 available) • Pixel 4 XL (mobile) • 9B071FFBA003B1 • android-arm64 • Android 13 (API 33) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.1778] • Edge (web) • edge • web-javascript • Microsoft Edge 113.0.1774.57 [✓] Network resources • All expected network resources are available. ! Doctor found issues in 1 category. ```

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand ``` - adaptive_dialog 1.9.0-no-macos.2 [animations collection dynamic_color flutter intersperse meta] - cached_network_image 3.2.3 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web] - cloud_firestore 4.8.0 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta] - cloud_firestore_odm 1.0.0-dev.60 [cloud_firestore flutter json_annotation meta] - collection 1.17.1 - connectivity_plus 4.0.1 [flutter flutter_web_plugins connectivity_plus_platform_interface js meta nm] - cupertino_icons 1.0.5 - easy_localization 3.0.2 [flutter shared_preferences intl args path easy_logger flutter_localizations] - firebase_analytics 10.4.2 [firebase_analytics_platform_interface firebase_analytics_web firebase_core firebase_core_platform_interface flutter] - firebase_app_check 0.1.4+2 [firebase_app_check_platform_interface firebase_app_check_web firebase_core firebase_core_platform_interface flutter] - firebase_auth 4.6.2 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta] - firebase_core 2.13.1 [firebase_core_platform_interface firebase_core_web flutter meta] - firebase_crashlytics 3.3.2 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace] - firebase_dynamic_links 5.3.2 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface] - firebase_messaging 14.6.2 [firebase_core firebase_core_platform_interface firebase_messaging_platform_interface firebase_messaging_web flutter meta] - firebase_storage 11.2.2 [firebase_core firebase_core_platform_interface firebase_storage_platform_interface firebase_storage_web flutter] - flutter 0.0.0 [characters collection js material_color_utilities meta vector_math sky_engine] - flutter_easyloading 3.0.5 [flutter flutter_spinkit] - flutter_form_builder 9.0.0 [flutter intl collection] - flutter_local_notifications 14.1.1 [clock flutter flutter_local_notifications_linux flutter_local_notifications_platform_interface timezone] - flutter_native_splash 2.3.0 [args flutter flutter_web_plugins js html image meta path universal_io xml yaml] - flutter_picker 2.1.0 [flutter] - flutter_riverpod 2.3.6 [collection flutter meta riverpod state_notifier] - flutter_secure_storage 8.0.0 [flutter flutter_secure_storage_linux flutter_secure_storage_macos flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows meta] - flutter_svg 2.0.6 [flutter vector_graphics vector_graphics_codec vector_graphics_compiler] - form_builder_cupertino_fields 0.2.0 [flutter flutter_form_builder intl] - form_builder_phone_field 1.4.0 [flutter flutter_form_builder phone_number country_pickers] - form_builder_validators 9.0.0 [flutter flutter_localizations intl] - freezed_annotation 2.2.0 [collection json_annotation meta] - geocoding 2.1.0 [flutter geocoding_platform_interface geocoding_android geocoding_ios] - geolocator 9.0.2 [flutter geolocator_platform_interface geolocator_android geolocator_apple geolocator_web geolocator_windows] - go_router 7.1.1 [collection flutter flutter_web_plugins logging meta] - goda_device_protocol 0.31.0 [flutter convert fl_chart synchronized logger retry mutex flutter_blue_plus flutter_lints] - http 0.13.6 [async http_parser meta] - image_cropper 4.0.1 [flutter image_cropper_platform_interface image_cropper_for_web] - image_gallery_saver 2.0.1 [flutter] - image_picker 0.8.7+5 [flutter image_picker_android image_picker_for_web image_picker_ios image_picker_platform_interface] - internet_connection_checker 1.0.0+1 - json_annotation 4.8.1 [meta] - local_auth 2.1.6 [flutter local_auth_android local_auth_ios local_auth_platform_interface local_auth_windows] - logger 1.3.0 - overlay_support 2.1.0 [flutter async] - package_info_plus 4.0.2 [ffi flutter flutter_web_plugins http meta path package_info_plus_platform_interface win32] - path_provider 2.0.15 [flutter path_provider_android path_provider_foundation path_provider_linux path_provider_platform_interface path_provider_windows] - permission_handler 10.2.0 [flutter meta permission_handler_android permission_handler_apple permission_handler_windows permission_handler_platform_interface] - riverpod_annotation 2.1.1 [meta riverpod] - screenshot 2.1.0 [flutter] - sentry_flutter 7.6.3 [flutter flutter_web_plugins sentry package_info_plus meta] - sentry_logging 7.6.3 [logging sentry] - shared_preferences 2.1.1 [flutter shared_preferences_android shared_preferences_foundation shared_preferences_linux shared_preferences_platform_interface shared_preferences_web shared_preferences_windows```

danagbemava-nc commented 1 year ago

Attempting to add firebase_storage to a project that has http:1.0.0 leads to a long chain of errors similar to the one shared below, truncated for brevity

Because firebase_storage >=8.0.0-1.0.nullsafety.0 <8.0.0-1.0.nullsafety.1 depends on firebase_storage_web
  >=0.2.0-1.0.nullsafety.0 <0.2.0-2.0.nullsafety.0 and firebase_storage <8.0.0-1.0.nullsafety.0 doesn't
  support null safety, firebase_storage <8.0.0-1.0.nullsafety.1 requires firebase_storage_web
  >=0.2.0-1.0.nullsafety.0 <0.2.0-2.0.nullsafety.0.
And because firebase_storage >=11.2.1 <11.2.2 depends on firebase_storage_web ^3.6.1, firebase_storage
  <8.0.0-1.0.nullsafety.1 or >=11.2.1 <11.2.2-∞ requires firebase_storage_web >=0.2.0-1.0.nullsafety.0
  <0.2.0-2.0.nullsafety.0 or ^3.6.1.
And because firebase_storage >=11.2.0 <11.2.1 depends on firebase_storage_web ^3.6.0 and firebase_storage
  >=11.1.2 <11.2.0 depends on firebase_storage_web ^3.5.0, firebase_storage <8.0.0-1.0.nullsafety.1 or
  >=11.1.2 <11.2.2-∞ requires firebase_storage_web >=0.2.0-1.0.nullsafety.0 <0.2.0-2.0.nullsafety.0 or
  >=3.5.0 <4.0.0.
And because firebase_storage >=11.1.1 <11.1.2 depends on firebase_storage_web ^3.4.1 and firebase_storage
  >=11.1.0 <11.1.1 depends on firebase_storage_web ^3.4.0, firebase_storage <8.0.0-1.0.nullsafety.1 or
  >=11.1.0 <11.2.2-∞ requires firebase_storage_web >=0.2.0-1.0.nullsafety.0 <0.2.0-2.0.nullsafety.0 or
  >=3.4.0 <4.0.0.
varun-2001 commented 1 year ago

I have the same issue and downgrading http version causes more problems

davor-layer-four commented 1 year ago

I have the same problem since I use "google_fonts: ^5.0.0" and it depends on http: 1.0, so the project is not able to update dependencies.

sparrow001 commented 1 year ago

I am also having this same issue

YourAverageTechBro commented 1 year ago

Has anyone found a fix for this issue? I can't find a way to get cloud firestore to work on my Flutter app because of it.

davor-layer-four commented 1 year ago

I managed to temporary solve it by checking which of my packages are using http: ^1.0.0, and downgrading. In my case google_fonts was using http 1.0 and had to downgrade to 4.0.4

YourAverageTechBro commented 1 year ago

I managed to temporary solve it by checking which of my packages are using http: ^1.0.0, and downgrading. In my case google_fonts was using http 1.0 and had to downgrade to 4.0.4

google_fonts was also my issue and downgrading to 4.0.4 fixed it. Thank you!

sparrow001 commented 1 year ago

Even still, http should still be updated so you can use new fonts/ new features in other packages.

jbaptisteroesch commented 1 year ago

The HTTP dependency has not been updated to its latest version (v1.0.0). As a result, we are unable to update any package that requires this new version of HTTP. It's essential to address this issue and update it as soon as possible.

AkshayND commented 1 year ago

I'm also facing the above issue while inserting image_cropper package. I have firebase_storage ^11.2.3 which depends on http ^0.13.5. Can we get the ETA for the above issue.

lukepighetti commented 1 year ago

Looks like you can do a wide constraint (?) dependency override like this:

pubspec.yaml

dependency_overrides:
  http: ">=0.13.5 <2.0.0"
sparrow001 commented 1 year ago

Theres a pr open right now where someone did that: #11158

russellwheatley commented 1 year ago

Thanks for the report, we will get this out: #11158 in the next release. Hopefully at some point today, if not tomorrow 👍