fix(firebase_core_tvos): pin the platform interface to the 15-element Pigeon window - #22
Open
MAUstaoglu wants to merge 1 commit into
Open
fix(firebase_core_tvos): pin the platform interface to the 15-element Pigeon window#22MAUstaoglu wants to merge 1 commit into
MAUstaoglu wants to merge 1 commit into
Conversation
… Pigeon window firebase_core_platform_interface 8.1.0 removed recaptchaSiteKey from CoreFirebaseOptions, so _toList sends 14 elements where 7.1.0 and 8.0.0 send 15. The generated native side decodes index 14 via an unguarded NSArray subscript, so Firebase.initializeApp(options: ...) read past the end of the list. 7.0.x predates the field and is equally incompatible. Nothing constrained the interface before, so a fresh resolve from the README's own dependency block picked 8.1.0.
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.
Blocks the pub.dev release of the Firebase ports.
firebase_core_tvos 0.0.1is currently broken for anyone who resolves it fresh, and every package in the family sits on top of it.The problem
firebase_core_platform_interface8.1.0 removed therecaptchaSiteKeyfield fromCoreFirebaseOptions. That shortens the Pigeon payload:CoreFirebaseOptionspayloadOur generated native side decodes all fifteen:
fromList:is the Dart → native direction (codec type 129, reached from theFirebaseCoreHostApi.initializeApphandler), so the exposed call isFirebase.initializeApp(options: ...)— what every example in this repo uses, and what the READMEs show. The no-argumentFirebase.initializeApp()reads its options from the plist natively and travels the other way, where Dart simply ignores the extra element, so that form survives.Nothing constrained the interface, so this is what the README's own dependency block resolved to before this change:
Why the constraint is on the interface and not on
firebase_coreBounding
firebase_corecannot express the compatible window. I tried>=4.11.0 <4.13.0first and it does not work —firebase_core 4.12.1declaresfirebase_core_platform_interface: ^8.0.0, which still admits 8.1.0:The coupling is to the interface's generated protocol, not to
firebase_core's version, so that is where the constraint belongs.>=7.1.0 <8.1.0admits exactly 7.1.0 and 8.0.0 — the two releases on a 15-element payload — and letsfirebase_corefloat as far as it can underneath.Verified
Every Firebase example in the repo now resolves inside the window:
Not verified on hardware — this is measured at the protocol level (payload arity on both sides, and the actual resolutions above), not observed as a crash on an Apple TV.
Release order
This needs to publish as
0.0.2before the remaining Firebase ports go out. The dependents declarefirebase_core_tvos: ^0.0.1, which in Dart admits 0.0.2, so no constraint bumps are needed anywhere else — they pick the fix up transitively, and the interface bound propagates into their resolutions too.Follow-ups deliberately left out of this PR:
firebase_app_check_tvoshas its own version of this problem with its own interface — noted on feat(firebase): tvOS support for firebase_app_check #18.