Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[🐛] Firestore pipelines: Timestamp (and Date) constants are sent as plain maps

Abierto
#9,412 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@Mastersam07 ya está trabajando en esto.

Desde el 30/10/2026.

  • #9416 de @Mastersam07 — abierto

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
Área
backend, database

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

impact: web-implementation platform: all plugin: firestore type: bug

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). Then serializeValue turns a Timestamp into { seconds, nanoseconds } with no marker (pipeline_runtime.ts#L265-L266).
  • iOS, Android and web: nothing in the pipeline parsers or node builders reads seconds and nanoseconds back into the SDK's Timestamp. 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 setDoc and 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.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for 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-firebase version you're using that has this issue:
    • 27.1.0 (main at c65e1ee3b)
  • Firebase module(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

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de invertase/react-native-firebase

Todos los issues de invertase/react-native-firebase

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.