Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

123
Vistas
Firestore recursiveDelete call stack exceeded

I am attempting to delete all subcollections of a firestore document in React Native, using the firebase cloud functions recursiveDelete() method. When the function is called, it fails with

[Unhandled promise rejection: RangeError: Maximum call stack size exceeded.]
at [native code]:null in map
at [native code]:null in map
.
.
.
at [native code]:null in map

There is very little documentation on this function, in fact, it is not even mentioned in the official firebase docs. It is only documented here https://googleapis.dev/nodejs/firestore/4.15.1/Firestore_.html#recursiveDelete. People from this discussion seemed to have success with this function.

I implemented my function following the documentation's instructions, so this error confuses me, especially since I was under the impression the entire point of this function was to avoid exceeding the maximum call stack size.

This is my cloud function that calls recursiveDelete():

exports.deleteSubs = functions.https.onCall(async(data, context)=>{
    await firestore.recursiveDelete(data.path)
})

and the front-end code which calls the cloud function

var functions = firebase.functions()
let deleteFn = functions.httpsCallable('deleteSubs');

let ref = db.collection("Posts").doc(post.key)
deleteFn({path: ref})

This error occurs with and without the optional bulkWriter included in the docs example.

It also fails on documents with no nested subcollections (which makes me confused on how the stack size is being exceeded).

I have verified that the path being passed in is correct.

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda