ECONNRESET connecting to Firebase auth emulator from functions emulator with grpc imported
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 43/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- grpc, python
- Domain
- authentication
Research direction
Start with the minimal reproduction repository linked in the issue and run its Python cloud function with grpc or firebase_admin.firestore imported. Reproduce the call to the Auth emulator or the GET request to http://127.0.0.1:9099/ and trace where ECONNRESET occurs; done means the request completes without the socket hang-up in that setup.
Written by the indexing model from the issue text.
Description
[READ] Step 1: Are you in the right place?
I’m not sure that the root cause of this issue is, but this repo seems like the most likely culprit. Other possibilities: gRPC, firebase-tools, firebase-functions.
[REQUIRED] Step 2: Describe your environment
- Operating System version: macOS 15.7.4 (24G517)
- Firebase SDK version: 7.4.0
- Firebase Product: auth
- Python version: 3.11.15
- Pip version: uv 0.11.6
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
danielparks/firebase-emulator-auth-hang-up is minimal test repo with more exhaustive details including a workaround.
Within a Python cloud function that has grpc or firebase_admin.firestore imported, call an auth method, e.g. auth.create_user(...), or make a GET request to the auth endpoint, e.g. requests.get("http://127.0.0.1:9099/", timeout=1).
The function will fail with ECONNRESET (“Error: socket hang up”).
Relevant Code:
Simplified example (see the repo above for a functional example):
from firebase_admin import initialize_app
from firebase_functions import https_fn
import requests
import grpc
# or, import firebase_admin.firestore
initialize_app()
@https_fn.on_call()
def connect(req):
# Make a simple GET request to the auth emulator endpoint:
return repr(requests.get("http://127.0.0.1:9099/", timeout=1))
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 359
- Avg merge
- 5d 6m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/firebase-admin-python
-
api: remoteconfig
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
firebase/firebase-admin-python#957 · 1 comment ·
-
api: database type: feature request
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
firebase/firebase-admin-python#978 · 1 comment ·
-
[FR] Support VERIFY_AND_CHANGE_EMAIL in generate_email_action_link (parity with firebase-admin-node) Openapi: auth
firebase/firebase-admin-python#949 · 2 comments · 1 reaction · 1 assignee ·
-
type: feature request
firebase/firebase-admin-python#915 · 5 comments · 3 reactions · 3 assignees ·
All issues in firebase/firebase-admin-python
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·