flutterfire
flutterfire copied to clipboard
🐛 [ [firebase_auth] Because every version of flutter from sdk depends on collection 1.15.0
Bug report
Describe the bug
after updating to the last version of firebase auth i get this error
Because every version of flutter from sdk depends on collection 1.15.0 and firebase_auth_platform_interface >=6.4.0 depends on collection ^1.16.0, flutter from sdk is incompatible with firebase_auth_platform_interface >=6.4.0. And because firebase_auth >=3.5.0 depends on firebase_auth_platform_interface ^6.4.0, flutter from sdk is incompatible with firebase_auth >=3.5.0. So, because myapp depends on both flutter from sdk and firebase_auth ^3.5.1, version solving failed. pub get failed (1; So, because myapp depends on both flutter from sdk and firebase_auth ^3.5.1, version solving failed.)
Flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.10.4, on macOS 12.5 21G72 darwin-x64, locale en-FR) [✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.2) [✓] VS Code (version 1.69.2) [✓] VS Code (version 1.59.1) [✓] Connected device (2 available) ! Error: iPhone is not connected. Xcode will continue when iPhone is connected. (code -13) [✓] HTTP Host Availability
@zitob9
You are on older version of framework. Current is 3.0.5. I suggest you to upgrade your stable version first and try again.
Also, upgrade your collection
package to latest version 1.16.0
and see if it resolves the issue.
@darshankawar Thank you very much for your help, is there any solution other than upgrading the flutter because this will cost me a lot of work.
You may directly try to use latest collection
package version and see if it helps, and keep firebase_auth
version to 3.5.0
Hey @zitob9. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
This issue occurs with Flutter 3.0.5 as well pubspec:
cupertino_icons: ^1.0.2
firebase_core: ^1.20.0
cloud_functions: ^3.3.3
firebase_auth: ^3.6.3
Because firebase_auth_platform_interface 6.5.3 depends on collection ^1.16.0 and no versions of firebase_auth_platform_interface match >6.5.3 <7.0.0, firebase_auth_platform_interface ^6.5.3 requires collection ^1.16.0.
And because every version of flutter from sdk depends on collection 1.15.0, flutter from sdk is incompatible with firebase_auth_platform_interface ^6.5.3.
And because firebase_auth 3.6.3 depends on firebase_auth_platform_interface ^6.5.3 and no versions of firebase_auth match >3.6.3 <4.0.0, flutter from sdk is incompatible with firebase_auth ^3.6.3.
So, because myapp depends on both flutter from sdk and firebase_auth ^3.6.3, version solving failed.
pub get failed (1; So, because myapp depends on both flutter from sdk and firebase_auth ^3.6.3, version solving failed.)
Explicitly adding collection
package with the latest version 1.16.0
produces this failure
Because every version of flutter_test from sdk depends on collection 1.15.0 and myapp depends on collection ^1.16.0, flutter_test from sdk is forbidden.
So, because myapp depends on flutter_test from sdk, version solving failed.
pub get failed (1; So, because myapp depends on flutter_test from sdk, version solving failed.)
@stevebread
Do you have firebase_auth_platform_interface: ^6.5.3
added in your pubspec ?
Also, what's the flutter sdk constraint version are you on ? (ex: sdk: ">=2.16.0 <3.0.0")
No, the pubspec does not have firebase_auth_platform_interface explicitly added. This is the constraint version
environment:
sdk: ">=2.16.1 <3.0.0"
I experienced this issue on a new Flutter project created through Android Studio. After creating the default counter app, I followed the instructions on https://firebase.google.com/docs/flutter/setup?platform=web to add firebase and the firebase_auth plugin and then running the app gives the error
Thanks for the details @stevebread. I created a new Flutter project from AS and followed all steps mentioned in the instructions link you shared above, but still didn't get the error you are facing. I was able to compile and built web app properly. See below for more details.
Running dart pub global activate flutterfire_cli
installs latest version of collection
plugin as below:
![Screenshot 2022-08-16 at 12 52 12 PM](https://user-images.githubusercontent.com/67046386/184821811-c9e2dae3-595e-41a8-b647-4ba7ca9dc53f.png)
Then, running flutter pub add firebase_auth
installs latest version of firebase_auth_platform_interface
:
![Screenshot 2022-08-16 at 12 52 48 PM](https://user-images.githubusercontent.com/67046386/184821931-c3ffe7ad-5769-480f-b8a1-7bc19f2355de.png)
![Screenshot 2022-08-16 at 12 50 12 PM](https://user-images.githubusercontent.com/67046386/184821984-27599ba4-931b-4149-8324-90bc348f3a88.png)
I would say, try upgrading your sdk constraint as shown above, as currently you have sdk: ">=2.16.1 <3.0.0"
, as the error probably indicates the same.
Because firebase_auth_platform_interface 6.5.3 depends on collection ^1.16.0 and no versions of firebase_auth_platform_interface match >6.5.3 <7.0.0, firebase_auth_platform_interface ^6.5.3 requires collection ^1.16.0. And because every version of flutter from sdk depends on collection 1.15.0, flutter from sdk is incompatible with firebase_auth_platform_interface ^6.5.3. And because firebase_auth 3.6.3 depends on firebase_auth_platform_interface ^6.5.3 and no versions of firebase_auth match >3.6.3 <4.0.0, flutter from sdk is incompatible with firebase_auth ^3.6.3. So, because myapp depends on both flutter from sdk and firebase_auth ^3.6.3, version solving failed.
Thanks, that helped me solve the issue. I had installed Flutter 3.0.5 into a new folder (not overwriting the 2.x SDK) and updated the Windows system path accordingly. On creating a new Flutter project, Android Studio shows a Flutter SDK path which I updated but I didn't realize that there was also a Dart SDK path in AS that needs to be updated
Good to know your issue is resolved. I am going ahead and closing as resolved.