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

332
Visualizações
Function forgets the trigger? (Google Cloud)

I created a Google Cloud Function which works like a charm in the Cloud Console. But it wasn't triggered when it should be.

It is a RealTimeDatabase (RTDB) triggered Cloud Function. Then I opened the function again to look for the error, and I saw the path I specified wasn't saved. So I tried again, but it failed again.


This is what I'm doing:

enter image description here

As you see, I have entered the Database name and the Path that is supposed to be the trigger. What I've entered, matches what is shown as an example when I hover over the question mark with my mouse.

Then I click Save

enter image description here

Then I click Next and then Deploy. Then it takes a few minutes for the function to deploy.

After it was deployed, I open the function again and I see this:

enter image description here


It always completely "forgets" the database I've entered, and it always only saves a part of the path I've specified. I guess this is why the function isn't getting triggered.

But why doesn't the function save what I put in there?


So I tried deploying it with gcloud CLI as suggested by Kolban, but I get this error:

ERROR: (gcloud.functions.deploy) OperationError: code=5, message=Failed to configure trigger for event-type:providers/google.firebase.database/eventTypes/ref.create resource:projects/_/instances/xxx-default-rtdb.firebaseio.com/refs/user/lukas service:firebaseio.com.

The code I ran:

gcloud functions deploy myfunction --entry-point helloRTDB --trigger-event providers/google.firebase.database/eventTypes/ref.create --trigger-resource projects/_/instances/xxx-default-rtdb.firebaseio.com/refs/user/lukas --runtime nodejs16

EDIT: Okay, so I got it working with gcloud CLI, but the same happened. It's not triggered and when I open the function in the console, it also forgot the database and partly the path

I don't understand what is wrong.

about 4 years ago · Juan Pablo Isaza
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