[🐛] Firestore pipelines: Timestamp (and Date) constants are sent as plain maps
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- firebase, javascript, typescript
Línea de trabajo
Start with packages/firestore/lib/pipelines/expressions.ts and packages/firestore/lib/pipelines/pipeline_runtime.ts, then trace the pipeline value parsing and node building paths for iOS, Android, and web. Compare the GeoPoint handling added for #9403 and inspect the existing pipeline end-to-end tests. Done means Timestamp and Date constants are reconstructed as SDK values across the listed platforms, comparisons work, and constant(timestamp) returns a Timestamp.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Issue
A Timestamp passed to a pipeline as a constant is sent to native and to the web SDK as a plain { seconds, nanoseconds } map, not as a timestamp. This is the same class of bug as #9403 fixes for GeoPoint.
const { execute, field, constant } = firestorePipelinesModular;
const { Timestamp } = firestoreModular;
execute(
db
.pipeline()
.collection('events')
.where(field('startTime').greaterThan(constant(new Timestamp(1700000000, 0)))),
);
On main (c65e1ee3b):
- JS:
constant()keeps class instances as they are (expressions.ts#L698). ThenserializeValueturns aTimestampinto{ seconds, nanoseconds }with no marker (pipeline_runtime.ts#L265-L266). - iOS, Android and web: nothing in the pipeline parsers or node builders reads
secondsandnanosecondsback into the SDK'sTimestamp. Those fields only appear in the result serializers, for output. So the backend gets a map constant. - Tests: the existing pipeline e2e tests that use Timestamps store them with
setDocand read them back as fields. None passes a Timestamp as a pipeline constant.
Expected: comparisons against a Timestamp constant match stored timestamps, and constant(timestamp) reads back as a Timestamp. Today a comparison against a map likely never matches, as with GeoPoint before #9403.
The constant() docs also list Date. A Date looks affected too: it isn't a plain object, so constant() keeps it, and serializeValue then copies its own enumerable fields, of which a Date has none. That leaves an empty map. serializeValue doesn't special-case Bytes or VectorValue either.
Possible fix: tag them the way #9403 tags GeoPoint (__kind: 'timestamp'), and rebuild the SDK value in the iOS, Android and web pipeline value paths.
Project Files
Javascript
Click To Expand
package.json:
# N/A
firebase.json for react-native-firebase v6:
# N/A
iOS
Click To Expand
ios/Podfile:
- I'm not using Pods
- I'm using Pods and my Podfile looks like:
# N/A
AppDelegate.m:
// N/A
Android
Click To Expand
Have you converted to AndroidX?
- my application is an AndroidX application?
- I am using
android/gradle.settingsjetifier=truefor Android compatibility? - I am using the NPM package
jetifierfor react-native compatibility?
android/build.gradle:
// N/A
android/app/build.gradle:
// N/A
android/settings.gradle:
// N/A
MainApplication.java:
// N/A
AndroidManifest.xml:
<!-- N/A -->
Environment
Click To Expand
react-native info output:
N/A
- Platform that you're experiencing the issue on:
- iOS
- Android
- iOS but have not tested behavior on Android
- Android but have not tested behavior on iOS
- Both
react-native-firebaseversion you're using that has this issue:27.1.0(mainatc65e1ee3b)
Firebasemodule(s) you're using that has the issue:Firestore(pipelines)
- Are you using
TypeScript?N/A
- Lenguaje dominante
- TypeScript
- Estrellas
- 12.3k
- Forks
- 2.3k
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 21
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de invertase/react-native-firebase
-
[📚] migrating-to-v27: Android fails on Expo SDK 58 (Kotlin 2.2) — document the BoM 34.19.0 overrideAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
invertase/react-native-firebase#9418 ·
Los mantenedores suelen responder en 1 día
-
Needs Attention type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
invertase/react-native-firebase#9414 ·
Los mantenedores suelen responder en 1 día
-
platform: android type: enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
invertase/react-native-firebase#9399 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
invertase/react-native-firebase#9419 ·
Los mantenedores suelen responder en 1 día
-
[🐛] Firestore pipelines: Bytes and VectorValue constants are sent as their private fieldsPosiblemente ocupada @Mastersam07 la tomó hace 1 día. Abiertoimpact: web-implementation platform: all plugin: firestore type: bug
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
invertase/react-native-firebase#9413 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de invertase/react-native-firebase
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
code-yeongyu/senpi#5262 ·
Los mantenedores suelen responder en 1 día
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
lingdojo/kana-dojo#33420 · 1 comentario · 5 reacciones ·
Los mantenedores suelen responder en 1 día
-
[BUG] inspect_schema matches named container case-insensitively without preferring exact matchPosiblemente ocupada @Maaz2212 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
libredb/libredb-studio#2128 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Yeachan-Heo/gajae-code#7474 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
mastra-ai/mastra#29108 · 1 comentario ·
Los mantenedores suelen responder en 1 día