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

219
Vistas
Firebase Functions Finished with status: error

I am writing my first Firebase Function that is supposed to make a collection with a document inside (in Firestore) when a new user registers. The only logs I am getting are the following:

Function execution started

and

Function execution took 194 ms. Finished with status: error.

The versions of the dependencies:

"firebase-admin": "^10.0.2",
"firebase-functions": "^3.20.0"

This is my code:

const functions = require("firebase-functions");

const admin = require("firebase-admin");
admin.initializeApp();

const db = admin.firestore();

exports.newUser = functions.auth.user().onCreate((user) => {
    return db
        .collection("users")
        .doc(user.uid)
        .create(JSON.parse(JSON.stringify(user)));
});

When I tried outputting the user.uid in the logs with

return functions.logger.log(user.uid);

I got the expected results as it output the uid as requested, meaning that the problem isn't with getting the user.

I have read this question, but it didn't solve my problem. Any ideas?

about 4 years ago · Santiago Gelvez
2 Respuestas
Responde la pregunta

0

I am writing this for anyone that comes across the same problem in the future! I wrote an email to the firebase support, they gave me the following answer:

Regarding this same error, we have received a couple of similar reports these past few days.

and

There is already an escalation placed for this.

Update: They have already fixed the issue.

about 4 years ago · Santiago Gelvez Denunciar

0

I have faced the same error because I was using the command : "firebase deploy " to deploy the function but when I used the command : "firebase deploy --only functions " the function gets deployed successfully.

about 4 years ago · Santiago Gelvez Denunciar
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