Repository navigation
Firebase packages: move to firebase_core 5, firebase_auth 7, firebase_messaging 17 and firebase_storage 14 - #13
Merged
Merged
Conversation
…jors firebase_core 5.0.0, firebase_auth 7.0.0, firebase_messaging 17.0.0 and firebase_storage 14.0.0 came out on 2026-10-15, and their platform interfaces moved to firebase_core ^5.0.0 together. The weekly upstream job of 2026-10-19 failed on all four Firebase rows. - firebase_auth_watchos, firebase_messaging_watchos and firebase_storage_watchos 0.2.0 depend on firebase_core ^5.0.0 and on the first platform interface for it: firebase_auth_platform_interface ^9.1.1, firebase_messaging_platform_interface ^4.11.0 and firebase_storage_platform_interface ^6.0.8. Only the new majors are supported, because the interface versions that work with firebase_core 5 require it; apps that stay on the old majors keep 0.1.1. - firebase_core_watchos 0.1.2: firebase_core 4.12.1 and later and 5.x all use firebase_core_platform_interface 8.x, which it implements, so its dependencies stay and it works with both. - The READMEs, the examples and tool/upstream_versions.yaml move to firebase_core 5.1.0, firebase_auth 7.0.1, firebase_messaging 17.0.1 and firebase_storage 14.0.1 in one commit, because every one of the four READMEs names firebase_core. - The watch keeps the Firebase Apple SDK 11.x; the move to SDK 13 upstream is for iOS and macOS. No native code changes, and the examples were not rebuilt on the Simulator; the CHANGELOGs, READMEs and porting reports say so.
…ed yet firebase_messaging_platform_interface 4.11.0 adds register, unregister, onRegistered and onUnregistered, the Firebase Installation ID registration of firebase_messaging 17. They keep the interface's UnimplementedError on the watch: they need FIRMessaging's registerWithCompletion: and unregisterWithCompletion:, which the Firebase Apple SDK has from 12.16.0, and the watch links 11.x. A test pins that, and the README, the CHANGELOG and the porting report say so. getToken, onTokenRefresh and deleteToken, which 17.x deprecates, keep working.
firebase_storage 14.0.1 keeps the custom metadata of a data URL upload, and passes the payload to the platform as base64. A new test checks that putString hands that metadata, custom metadata included, to the native upload task.
firebase_auth 7.0.1 passes User.updateProfile only the fields it is given, so an omitted field keeps its value on the watch, and a field given as null reaches the platform as a key with a null value. A new test checks that the null is forwarded to the native profile change request. The CHANGELOG says what the Firebase Apple SDK does with it: it clears the field on the local user and sends nothing to the server, as on iOS.
… value The SDK calls each auth listener once when the plugin installs it, on the first native call for an app, and that call bumps the native counter the streams watch. A stream subscribed before any other auth call therefore emitted its first value twice, a user or null. firebase_auth drops a first callback that carries a user, and 7.0.1 (platform interface 9.1.2) also skips a null that follows a null. authStateChanges, idTokenChanges and userChanges now leave out the bump of a counter that was still 0 at their first snapshot, and skip a null when the last value they emitted was null. Tests take each stream through a signed-in start and a signed-out start, with the install call, a sign-in, a sign-out and a repeated signed-out call. The existing stream test now starts after the install call, as the native counters do, and the stream tests cancel their subscriptions in a tear-down.
sendPasswordResetEmail, sendEmailVerification and verifyBeforeUpdateEmail send their email without the ActionCodeSettings they are given. The README now lists that under "Not implemented yet".
…ll carries The SDK's install call reports the user it has when the call runs, not when the listener was installed, and the auth-state listener reports a uid only once. A sign-out after a stream's first snapshot and before that call runs therefore bumps the auth counter once, and the previous commit left that bump out, so authStateChanges kept the signed-in user. A move of a stream's generation that is only the install calls is now left out when it reports the value the stream last emitted, and emitted when the user changed before the call ran. Other moves are emitted as before, except a null after a null. New tests take each stream through a signed-in start and a sign-out that the install call carries, then the sign-out's own report.
…part FlutterFire's new majors move Swift Package Manager builds to Firebase Apple SDK 13 but keep CocoaPods builds on 12.19.x, so the CHANGELOGs and porting reports now say that the newer SDK upstream uses on iOS and macOS does not apply to the watch, without naming 13. The auth README listed the ActionCodeSettings that three calls do not pass on under "Not implemented yet (they throw UnimplementedError)", but those calls do not throw; that is now a paragraph of its own.
…gn-out post The CHANGELOG said the streams no longer repeat their first value. That holds for the listener install call. idTokenChanges and userChanges can still emit a signed-in user twice when the SDK restores or signs in that user while the plugin installs its listeners, because the SDK's own change notification then bumps the ID-token counter too. The CHANGELOG now says so, and the porting report lists it as a known difference with the native change that would remove it. In the test of a sign-out carried by the install call, the sign-out's own report now bumps only the ID-token counter, as the uid-filtered auth-state listener does not fire again; it also checks that such a move does not re-emit on authStateChanges.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The weekly Upstream compatibility run of 2026-10-19 (39239870688) failed on the four Firebase rows. FlutterFire released firebase_core 5.0.0, firebase_auth 7.0.0, firebase_messaging 17.0.0 and firebase_storage 14.0.0 on 2026-10-15, followed by 5.1.0, 7.0.1, 17.0.1 and 14.0.1 on 2026-10-23. Their platform interfaces now require
firebase_core ^5.0.0.firebase_core ^4.0.0, so the new majors did not resolve with them.firebase_core_watchosfailed only the new-major check againsttool/upstream_versions.yaml.What changed upstream (Dart surface)
initializeApp(demoProjectId:)now builds placeholder options in a valid format.firebase_core_platform_interfaceis unchanged at 8.1.1.User.updateProfilepasses only the fields it is given.register,unregister,onRegisteredandonUnregistered(Firebase Installation ID registration).getToken,onTokenRefreshanddeleteTokenare deprecated.putStringkeeps the custom metadata of a data URL.What changed here
firebase_core_platform_interface: ^8.0.0)firebase_core: ^5.0.0,firebase_auth_platform_interface: ^9.1.1firebase_core: ^5.0.0,firebase_messaging_platform_interface: ^4.11.0UnimplementedError)firebase_core: ^5.0.0,firebase_storage_platform_interface: ^6.0.8tool/upstream_versions.yamlmoves the Firebase rows to 5.1.0, 7.0.1, 17.0.1 and 14.0.1, in the same commit as every README snippet. The examples move to the new majors. Each package has a CHANGELOG entry, and the README andPORTING_REPORT.mdare updated.Decisions
listenthat navigates on each event could navigate twice on the watch.authStateChangesit can be the only report of a sign-out.FIRMessaging'sregisterWithCompletion:andunregisterWithCompletion:, which arrived in Firebase Apple SDK 12.16.0. The watch links 11.x (Package.resolvedpins 11.15.0). Moving the native SDK needs its own Simulator and device check.Tests
authStateChanges,idTokenChangesanduserChangesthrough a signed-in start, a signed-out start, and a sign-out that the install call carries;updateProfileforwarding an explicit null.UnimplementedErrorand make no native call.putString(base64, as 14.0.1 sends a data URL) hands the custom metadata to the native upload.Verification
Run locally with Flutter 3.47.5 and Dart 3.13.4, the CI pin:
pub getfor the four packages, and dry-run resolution of the four examples against the new majors. CI'sflutter pub getalso resolves each./example.dart formaton the four packages.check_versions,check_readme_snippets,check_example_constraints,symcheck,check_test_names,check_words.shandcheck_generated_ignored.sh.dart pub publish --dry-run: 0 warnings for each of the four packages.Not run locally:
flutter analyze,flutter testand pana. The Mac had under 15 GiB of space left on its data volume, and this lane's rule is to run no heavy job then. This PR's CI runs analyze and test, and the upstream workflow's pana job scores the packages.Two independent review passes read the diff against the upstream sources. Their findings are fixed in this branch:
updateProfileclaim about the server;Three native findings are left for a follow-up, because they need a Simulator build:
FirebaseApp.delete()and a re-created app of the same name, the listeners are not installed again;idTokenChangesanduserChangescan still emit a signed-in user twice when the SDK restores or signs in that user while the listeners are installed. The CHANGELOG and the porting report list this as a known difference. Installing the listeners from a later main-queue block would remove it.After merge
tool/published.yaml.