App Check modular initialization discards native configuration rejection in 26.4.0
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 34/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react-native, typescript
- Ambito
- backend-api-design
Direzione di ricerca
Read packages/app-check/lib/index.ts at v26.4.0 and trace how public initializeAppCheck handles the internal configuration promise and how public token acquisition reports errors. The report describes an offline Jest probe but names no test file or standalone reproduction, so first verify the behavior in the package’s existing tests. Done means setup rejection is handled and exposed through a supported public error boundary while preserving the stated initialization and provider behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Issue
The public modular initializeAppCheck in 26.4.0 discards the native configuration promise. An asynchronous configuration rejection is consequently reported as unhandled, even when the consumer observes and catches errors from public token acquisition.
We reproduced this in an offline Jest test with the iOS platform selected. The installed SDK public APIs, provider class, registries and native error wrapping were real code. React Native native hosts, app identity/configuration inputs and the downstream JS token consumer were synthetic. This is not an observed physical-device crash or a claim that Apple App Attest failed.
Reproduction outline
- Configure a
ReactNativeFirebaseAppCheckProviderforapple.provider: 'appAttest'and invoke publicinitializeAppCheckwithisTokenAutoRefreshEnabled: false. - Have the synthetic native
configureProvideroperation reject asynchronously after 100 ms. Let native token acquisition reject with provider-not-ready while no provider is configured. - Observe and catch the public token request's rejection. Do not add a process/global rejection handler or call an SDK-private method.
- The initializer already returned its handle. Its separate configuration rejection is reported by Jest as unhandled. Catching token acquisition does not contain it. A consumer that keeps the handle and retries only token acquisition does not retry configuration.
Redacted synthetic error signature (not a device log):
NativeFirebaseError: [appCheck/unknown] SYNTHETIC_INITIALIZER_REJECTION
The local matrix had 6 passing controls and 1 failing asynchronous-rejection safety case. Controls covered delayed success, concurrent callers, indefinitely pending setup, late setup completion, pending token work and synchronous setup throw. Those consumer-level controls do not establish native runtime behavior.
Source relationship and expected behavior
The public initializer drops the internal initialization promise. The internal configuration chain returns a promise; public token acquisition calls the native getter separately. The v26 migration guide documents the synchronous handle return. Tagged 27.0.0 source appears to retain this structure; 27 was not installed or tested.
Native setup rejection should be owned immediately, including before a token consumer attaches or after its timeout, and exposed through a supported public error boundary. We are seeking a supported correction or public API that:
- exposes settled setup failure through token acquisition or a documented readiness/error boundary while preserving synchronous modular initialization if intended;
- documents whether failed setup can be retried safely through public APIs and prevents duplicate setup while pending;
- preserves fail-closed pending providers, the selected App Attest provider and disabled native automatic refresh, including error handling in the configure-success continuation.
A supported correction compatible with the 26.x integration would be preferred if that line is maintained. We are not proposing error swallowing, internal method calls, a downgrade to preconfiguration debug-provider behavior, or a change to enforcement. If a newer integration line is required, please identify the exact release/API and migration requirements.
This report summarizes an existing offline probe; it does not include a standalone runnable reproduction repository. No credentials, token values, account metadata, app identifiers, private application source or raw logs are included.
References:
- v26 migration
- 26.4.0 App Check source
- 27.0.0 App Check source inspected only
- Pending-provider correction
Project Files
Only the relevant package versions are shared below. Native project files are not part of this offline reproduction.
Javascript
package.json
Relevant dependency excerpt only:
{
"@react-native-firebase/app": "26.4.0",
"@react-native-firebase/app-check": "26.4.0"
}
firebase.json for react-native-firebase v6
Not applicable: configuration input was synthetic; no account or production configuration is attached.
iOS
ios/Podfile
Not applicable to this offline probe. No Pods or native build was executed.
AppDelegate.m
Not applicable to this offline probe. The native host was synthetic.
Android
Have you converted to AndroidX?
Not assessed. Android behavior was not exercised.
android/build.gradle
Not applicable to this offline probe.
android/app/build.gradle
Not applicable to this offline probe.
android/settings.gradle
Not applicable to this offline probe.
MainApplication.java
Not applicable to this offline probe.
AndroidManifest.xml
Not applicable to this offline probe.
Environment
- Platform: offline Jest process with synthetic
Platform.OS = 'ios'; no simulator or physical device. - Affected installed packages:
@react-native-firebase/appand@react-native-firebase/app-check, both 26.4.0. - Module: App Check initialization/error propagation.
- TypeScript: yes, the local diagnostic was written in TypeScript.
react-native info: not run for this submission; no native environment output is claimed.- No actual attestation, provider token minting, network request to Firebase, native build or device execution was part of this probe.
- Lingua principale
- TypeScript
- Stelle
- 12.3k
- Fork
- 2.3k
- Merge medio
- 1g 19h
- PR unite (30g)
- 21
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di invertase/react-native-firebase
-
[📚] migrating-to-v27: Android fails on Expo SDK 58 (Kotlin 2.2) — document the BoM 34.19.0 overrideAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
invertase/react-native-firebase#9418 ·
I maintainer di solito rispondono entro 1 giorno
-
Needs Attention type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
invertase/react-native-firebase#9414 ·
I maintainer di solito rispondono entro 1 giorno
-
platform: android type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
invertase/react-native-firebase#9399 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
invertase/react-native-firebase#9419 ·
I maintainer di solito rispondono entro 1 giorno
-
[🐛] Firestore pipelines: Bytes and VectorValue constants are sent as their private fieldsForse già presa @Mastersam07 l’ha presa 1 giorno fa. Apertaimpact: web-implementation platform: all plugin: firestore type: bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
invertase/react-native-firebase#9413 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di invertase/react-native-firebase
Issue simili
-
enhancement tech debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
danielmiessler/LifeOS#2533 ·
I maintainer di solito rispondono entro 9 giorni
-
auto:producer auto:uiux
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
fritzprix/libr-agent#2447 ·
I maintainer di solito rispondono entro 1 giorno
-
bug low priority
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100