-
Notifications
You must be signed in to change notification settings - Fork 59
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
chore: Update dependencies and fix tests #131
base: main
Are you sure you want to change the base?
Conversation
Can someone please review the PR? |
I'm not an admin here, but the changes look mostly mechanical and look good to me. Getting all the plugins fully up to latest dependencies would make a PR hard to review I'm guessing, because of the amount of required changes, so I appreciate that this just brings them the most up to date with minimal changes. |
Cannot use this plugin anymore with latest Firebase_core. I guess this PR would fix that? |
That's correct. You will need to use dependency overrides for each of the firebase_desktop and _dart dependencies and keep the constraints described above. For instance maximum allowed version for auth is 4.6.3 |
firebase_core: 2.14.0 With the above set I'm gettin this error on Windows: |
@johannesvuorinen It's possible that the official Windows CPP implementation is being picked over the one from You can try the following and call the function in your import 'dart:io';
import 'package:firebase_core_desktop/firebase_core_desktop.dart';
import 'package:firebase_core_platform_interface/firebase_core_platform_interface.dart';
void forceUseFirebaseDesktopDartOnWindows() {
if (Platform.isWindows) {
FirebasePlatform.instance = FirebaseCore();
}
} The tests I did while developing were on Linux, but integration tests worked fine on Windows as well, so I'm not sure what could be the problem. |
Got it working now. Thanks! We were using .apps directly from Firebase class and not from instance. So now only firebase_auth lagging behind which would be separate PR. |
@johannesvuorinen Yes, firebase_auth 4.7.0 and greater migrated into using pigeon, so there are some incompatibilities with current Dart implementation in this repo. |
@davidmartos96 thanks for doing this work. Do you know if there's a good way to depend on your work instead of directly to the pub package? I've tried the following, but the naming is off and not as expected. Please advise.
|
@JaredEzz Given that there are multiple packages involved transitively, it's a bit convoluted, but it can be done: dependency_overrides:
firebase_auth_desktop:
git:
url: https://github.com/davidmartos96/flutterfire_desktop
path: packages/firebase_auth/firebase_auth_desktop
ref: fixes
firebase_auth_dart:
git:
url: https://github.com/davidmartos96/flutterfire_desktop
path: packages/firebase_auth/firebase_auth_dart
ref: fixes
firebase_core_desktop:
git:
url: https://github.com/davidmartos96/flutterfire_desktop
path: packages/firebase_core/firebase_core_desktop
ref: fixes
firebase_core_dart:
git:
url: https://github.com/davidmartos96/flutterfire_desktop
path: packages/firebase_core/firebase_core_dart
ref: fixes
|
Perfect! I will try this out today - thanks so much for the reply |
Unfortunately, I was not able to use this for my project because we use TOTP Multi-factor authentication firebase/flutterfire#11420 which requires firebase_auth 4.9.0 and I was greeted with this error message when adding the dependency overrides on your
@davidmartos96 is there anything technical blocking supporting newer versions of firebase_auth? |
@JaredEzz I didn't update the code to firebase_auth >= 4.7.0 as it requires additional changes because it now uses Pigeon classes for the platform communication. Additionally it would make this PR much harder to review. But ideally if this gets merged, the same e2e tests from the main flutterfire repo can be run against this desktop implementation and it would be easier to add the newest changes with higher confidence in other PRs. |
Got it! Thanks for the explanation |
Any news on when this might be merged? Thanks for the PR! |
Any update on this? |
Thanks for the excellent PR @davidmartos96. I had to add it as an override as pointed out above, but it resolved a nagging issue I've had with desktop builds causing "PlatformException(channel-error, Unable to establish connection on channel., null, null)" in Linux and Windows. The official packages have transitive dependencies that lock in most of the firebase libs a full one or two major version #s lower, and I suspected this was causing the platform specific issues. Pointing this out in case anyone else is deep in the 2nd google results page trying to fix this. |
This PR changes multiple things. Unfortunately it was hard to separate them if I wanted the CI to pass.
All unit tests and e2e tests are passing on the GH Actions from my fork.
This is the summary of the changes:
1. Update the firebase dependencies
firebase_auth max version 4.6.3
Newer versions use
pigeon
https://pub.dev/packages/pigeon to communicate with the platforms so there is more pending work to make it work with the latest.Because of this transitively
firebase_auth_platform_interface
is compatible up to version 6.15.3.firebase_core ^2.0.0 Latest version 2.15.0 is resolved fine
cloud_functions max version 4.0.13
Newer versions add support for 2nd generation functions. Same as auth, there is more pending work here.
Because of this transitively
cloud_functions_platform_interface
is compatible up to 5.1.32.2. Update the cloud functions typescript project
The tests from firebase_functions_dart expected some functions to exist, which apparently were removed in fe794c8 but not the tests. Maybe tests from firebase_functions_dart can be removed and just keep the e2e tests.
3. Update to melos 3
This changes the syntax in the melos.yaml, adds the pubspec_overrides.yaml files and includes a top level pubspec.yaml file
4. Make the linter happy
This includes bumping the Dart SDK on some subprojects, as some were using functions that were not available in the declared version.
Hopefully this helps with the review.
I have further changes to reuse the e2e tests from https://github.com/firebase/flutterfire but I think it would be better to go step by step 😄
It's sad to see this project with not much maintenance, I believe it is a great solution to have some basic support for Linux and Windows while it is not official.