Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

217
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda