Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Python Firebase Admin SDK Listener sometimes throws Bad Gateway errors after DB is updated

Aperta
#664 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend, databases

Direzione di ricerca

Inizia con il percorso del listener Python Realtime Database utilizzato da db.reference(...).listen(exampleFunc) e con la risposta 502 requests.exceptions.HTTPError segnalata dopo gli aggiornamenti del database. Esamina la configurazione del listener e tutti gli ID progetto e i timestamp disponibili confrontandoli con i log lato server. Il lavoro è completato quando viene identificata una causa riproducibile oppure viene documentato come gestire il fallimento intermittente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

needs-triage
[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 '' to [user.uid]: to represent credits in my system. I have a google cloud VM that has an admin sdk database listener setup. Every month or so, after a new customer signs up, all of my listeners will randomly throw an error. The error I am seeing is:
requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: https://-default-rtdb.firebaseio.com/.json

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)
Lingua principale
Python
Stelle
1.2k
Fork
359
Merge medio
3g 9h
PR unite (30g)
3

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/firebase-admin-python

Tutte le issue di firebase/firebase-admin-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.