You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{name: 'logEvent',reason: 'RN Firebase `logEvent` returns `Promise<void>` because Analytics calls cross the native bridge, and RN overloads omit the web `[key: string]: any` index signature on event params.'},
104
-
{name: 'setAnalyticsCollectionEnabled',reason: 'RN Firebase returns `Promise<void>` (or `Promise<null>`) because the operation crosses the native bridge, whereas the firebase-js-sdk web modular API is synchronous.'},
105
-
{name: 'setConsent',reason: 'RN Firebase returns `Promise<void>` (or `Promise<null>`) because the operation crosses the native bridge, whereas the firebase-js-sdk web modular API is synchronous.'},
106
-
{name: 'setDefaultEventParameters',reason: 'RN Firebase returns `Promise<void>` (or `Promise<null>`) because the operation crosses the native bridge, whereas the firebase-js-sdk web modular API is synchronous.'},
107
-
{name: 'setUserId',reason: 'RN Firebase returns `Promise<void>` (or `Promise<null>`) because the operation crosses the native bridge, whereas the firebase-js-sdk web modular API is synchronous.'},
108
-
{name: 'setUserProperties',reason: 'RN Firebase returns `Promise<void>` (or `Promise<null>`) because the operation crosses the native bridge, whereas the firebase-js-sdk web modular API is synchronous.'},
103
+
{
104
+
name: 'logEvent',
105
+
reason:
106
+
'RN Firebase `logEvent` returns `Promise<void>` and RN overloads omit the web `[key: string]: any` index signature on event params. '+
107
+
'Phase S hint: **Promise that could maybe sync-void+queue** (ordered native fire-and-forget; see PS-S2-gap).',
108
+
},
109
+
{
110
+
name: 'setAnalyticsCollectionEnabled',
111
+
reason:
112
+
'RN Firebase returns `Promise<void>` whereas the firebase-js-sdk web modular API is synchronous. '+
113
+
'Phase S hint: **Promise that could maybe sync-void+queue** (see PS-S2-gap).',
114
+
},
115
+
{
116
+
name: 'setConsent',
117
+
reason:
118
+
'RN Firebase returns `Promise<void>` whereas the firebase-js-sdk web modular API is synchronous. '+
119
+
'Phase S hint: **Promise that could maybe sync-void+queue** (see PS-S2-gap).',
120
+
},
121
+
{
122
+
name: 'setDefaultEventParameters',
123
+
reason:
124
+
'RN Firebase returns `Promise<void>` whereas the firebase-js-sdk web modular API is synchronous. '+
125
+
'Phase S hint: **Promise that could maybe sync-void+queue** (see PS-S2-gap).',
126
+
},
127
+
{
128
+
name: 'setUserId',
129
+
reason:
130
+
'RN Firebase returns `Promise<void>` whereas the firebase-js-sdk web modular API is synchronous. '+
131
+
'Phase S hint: **Promise that could maybe sync-void+queue** (see PS-S2-gap).',
132
+
},
133
+
{
134
+
name: 'setUserProperties',
135
+
reason:
136
+
'RN Firebase returns `Promise<void>` whereas the firebase-js-sdk web modular API is synchronous. '+
137
+
'Phase S hint: **Promise that could maybe sync-void+queue** (see PS-S2-gap).',
138
+
},
109
139
{name: 'Analytics',reason: 'RN Firebase extends the Analytics service interface with native bridge methods (collection toggles, predefined event helpers, and iOS on-device conversion measurement) that are not on the firebase-js-sdk web service type.'},
110
140
{name: 'ConsentSettings',reason: 'RN Firebase maps most consent flags to native boolean toggles, while the firebase-js-sdk uses `ConsentStatusString` for web gtag consent modes.'},
111
141
{name: 'Currency',reason: 'RN Firebase narrows Analytics currency values to `number` for native event payloads, while the firebase-js-sdk also allows string currency codes for web gtag events.'},
|**R**| Pre-merge full validation |**done**| Revert harness narrowing; remove `NativeModules` fallback + throw test ([§ Phase R additions](#phase-r-additions)); [full tier](../testing/running-e2e.md#e2e-validation-tiers-unit-focused-area-focused-full) 3-platform before coordinated major |
@@ -233,6 +233,41 @@ The "keep async if it does network/IO/disk" rule in the discriminator **assumes*
233
233
234
234
**Next slice:**`convert` inventory complete (2026-07-03). Remaining gap-analysis verdicts (`needs-native-change`, `keep-async`) are out of Phase S scope until native behavior is clarified or documented only.
Deep read-only analysis of **`needs-native-change`** and **`keep-async`** candidates after the `convert` inventory shipped. Canonical evidence table for discussion and future implementation slices. Compare-types `differentShape` entries for these methods carry **Phase S hint** phrases (short pointers only — this table holds the real state).
239
+
240
+
**Hint vocabulary (compare-types annotations):**
241
+
242
+
| Phrase | Meaning |
243
+
|--------|---------|
244
+
|*(none — entry removed)*| Phase S `convert` complete; no async-vs-sync delta |
245
+
|**Promise that could maybe sync-void+queue**| Web is sync/fire-and-forget; RN may return void after sync local state update + ordered background native dispatch |
246
+
|**Promise that could maybe sync-void+gate**| Web returns sync instance/state; RN must not return until in-memory settings visible to all later native entry points (or gate ops until background work completes) |
247
+
|**convert after native fix**| Native shell close to sync; fix semantics first (e.g. boolean return), then drop Promise |
248
+
|**keep-async: deferred persistent-cache IO**| Web `void` schedules real disk/index work; do not block JS; Promise may mean dispatch-only today |
249
+
250
+
**Executive summary:** Sync return while queueing background work is valid only when RNFB updates the same **synchronous observable state** web updates before return, or when the web API is truly fire-and-forget with no ordering dependency. Queue-only is insufficient when the next line of user code assumes the effect is visible (`initializeFirestore` settings, analytics ordering, upload retry times at task construction). Firestore persistent cache index manager methods are **`keep-async`**: web `void` schedules persistent-cache work; **`sync-void+gate`** would need a native completion signal RNFB does not expose today.
251
+
252
+
| Method | Package | compare:types| Web SDK (sync state before return?) | RNFB today | Verdict | Recommended path | Risks if forced sync void | Notes |
|`logEvent`| analytics |`differentShape`|`void`; async pipeline; init/measurement ordering internal | Android `Tasks.call`; iOS direct | needs-native-change → sync-void+queue | Ordered fire-and-forget queue or direct native if SDK proven cheap | Unordered queue races with setters | Web does not expose completion |
255
+
|`setAnalyticsCollectionEnabled`| analytics |`differentShape`|`void`; ga-disable after init | Android `Tasks.call`; iOS direct | needs-native-change → sync-void+queue | Same ordered path as events | Events logged with old collection flag ||
256
+
|`setConsent`| analytics |`differentShape`| Sync init stash or immediate gtag | Android `Tasks.call`; iOS direct | needs-native-change → sync-void+queue | Serial queue shared with analytics calls | Immediate logEvent uses old consent ||
257
+
|`setDefaultEventParameters`| analytics |`differentShape`| Sync init stash or immediate gtag | Android `Tasks.call`; iOS direct | needs-native-change → sync-void+queue |**Clearest ordering requirement**| Next event misses defaults ||
258
+
|`setUserId` / `setUserProperties`| analytics |`differentShape`| Init-ordered or immediate gtag | Android `Tasks.call`; iOS direct | needs-native-change → sync-void+queue | Same analytics queue | Stale id/properties on next event | Android SDK source dive for direct-call safety |
259
+
| RNFB-only analytics helpers | analytics |`extraInRN`| N/A | Same native path | Not Phase S parity | Align if core analytics goes fire-and-forget | Public API break without web signal | Out of compare-types completion criteria |
|`initializeFirestore`| firestore |`differentShape`| Returns instance; lazy config but ordered internally | JS awaits settings(); native prefs write async | needs-native-change → sync-void+gate | In-memory settings registry visible before return | Immediate writes/listeners with old settings | Queue-only insufficient |
262
+
|`UploadTask.pause/resume/cancel`| storage |`UploadTask``differentShape`| Sync state machine + boolean | Android bool via Promise; iOS bool path incomplete | convert after native fix | Sync boolean from native task state | Lying about pause/cancel state | iOS shell review needed |
263
+
|`setMaxOperationRetryTime` / `setMaxUploadRetryTime`| storage |`extraInRN` + `FirebaseStorage` shape | Sync in-memory field update | JS field then native resolve | sync-void+queue / convert | Sync void; native before return | Upload task captures stale retry at construction | Upload retry stronger ordering than operation retry |
264
+
|`setMaxDownloadRetryTime`| storage |`extraInRN`| N/A (RN-only) | Same pattern | Not parity | Consistency if siblings change | RN-only API ||
265
+
|`enablePersistentCacheIndexAutoCreation`| firestore |`differentShape`|`void`; schedules persistent-cache work | Native resolves immediately; no completion hook |**keep-async**| Keep Promise or document dispatch-only | Queries/listeners race index config ||
266
+
|`disablePersistentCacheIndexAutoCreation`| firestore |`differentShape`| same | same |**keep-async**| same | Stale auto-creation until SDK finishes ||
267
+
|`deleteAllPersistentCacheIndexes`| firestore |`differentShape`|`void` + deferred disk/index work | same |**keep-async**| Do not Phase S convert | Immediate queries use old indexes | sync-void+gate needs native completion signal |
0 commit comments