firebase-admin-python
firebase-admin-python copied to clipboard
Python Firebase Admin SDK Listener sometimes throws Bad Gateway errors after DB is updated
[READ] Step 1: Are you in the right place?
Yes
[REQUIRED] Step 2: Describe your environment
- Operating System version: cos-stable-101-17162-40-5
- Firebase SDK version: latest?
- Firebase Product: realtime database, admin SDK
- Python version: 3.8
- Pip version: latest?
[REQUIRED] Step 3: Describe the problem
I have a database with customers data in it. When a new customer is added, a Firebase function triggers and updates '
I am using the realtime listener described in this stack overflow post top answer: https://stackoverflow.com/questions/49863708/python-firebase-realtime-listener
Steps to reproduce:
Hard to reproduce, but I can also provide my project ID and exact times for the issue so that the Firebase team can look into server-side logs to see what the issue might be.
Relevant Code:
from firebase_admin import db
def exampleFunc(event):
try:
print(event)
except Exception as e:
return
#in startup function
listener1=db.reference('<listening location 1>').listen(exampleFunc)
listener2=db.reference('<listening location 2>').listen(exampleFunc)
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.