ECONNRESET connecting to Firebase auth emulator from functions emulator with grpc imported
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 43/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- grpc, python
研究方向
從 issue 中連結的最小重現 repository 開始,並在已匯入 grpc 或 firebase_admin.firestore 的情況下執行其中的 Python cloud function。重現對 Auth emulator 的呼叫或對 http://127.0.0.1:9099/ 的 GET 請求,並追蹤 ECONNRESET 發生的位置;在該設定下請求完成且沒有 socket hang-up 即表示完成。
由索引模型根據 Issue 內容生成。
描述
[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))
- 主要語言
- Python
- 星號
- 1.2k
- 分支
- 359
- 平均合併
- 5 天 6 分鐘
- 30 天內合併 PR
- 2
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
firebase/firebase-admin-python 的其他 Issue
-
api: remoteconfig
難度 2/5 1-3 小時 新手友好度 75/100
firebase/firebase-admin-python#957 · 1 則留言 ·
-
api: database type: feature request
難度 2/5 1-3 小時 新手友好度 62/100
-
難度 4/5 3-5 天 新手友好度 45/100
firebase/firebase-admin-python#978 · 1 則留言 ·
-
[FR] Support VERIFY_AND_CHANGE_EMAIL in generate_email_action_link (parity with firebase-admin-node) 未關閉api: auth
firebase/firebase-admin-python#949 · 2 則留言 · 1 個 reaction · 已指派 1 人 ·
-
type: feature request
firebase/firebase-admin-python#915 · 5 則留言 · 3 個 reaction · 已指派 3 人 ·
查看 firebase/firebase-admin-python 的全部 Issue
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
-
難度 2/5 1-3 小時 新手友好度 88/100
use-agent-os/agent-os#3314 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
BasedHardware/omi#15662 · 1 則留言 ·
-
documentation help wanted
難度 2/5 1-3 小時 新手友好度 90/100
-
難度 2/5 1-3 小時 新手友好度 62/100
AiursoftWeb/AnduinOS-2#19 ·