HttpAgent can not work when serviceAccountPathOrObject parameter is a object in admin.credential.cert()
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
Problem
When calling admin.credential.cert(), and the serviceAccountPathOrObject parameter is a object, not a file path, the http proxy agent can not work.
Environment
- Operating System version: Red Hat Enterprice Linux 8.10
- Firebase SDK version: 13.4.0
- Firebase Product: message
- Node.js version: 22.11.0
- NPM version: 10.9.0
Steps to reproduce:
#### Relevant Code:
import * as admin from "firebase-admin";
import {readFilesync }from "fs";
import * as https from "https",
const serviceAccount = JSON.parse(readFilesync("./serviceAccount.json", "utf8"))
const proxyAgent = new https.Agent({
host:"xxx",
port: 8080,
keepAlive: true,
rejectUnauthorized: false,
});
const client= admin.initializeApp({
credential:admin.credential.cert(
{
clientEmail: serviceAccount.client_email,
privatekey: serviceAccount.private_key,
projectId: serviceAccount.project_id,
},// when serviceAccount is a object, it will raise the "app/invalid-credential" error
// "./serviceAccount.json", when serviceAccount is a file path, can work
proxyAgent
),
httpAgent: proxyAgent,
});
- 主要语言
- TypeScript
- 星标
- 1.8k
- 派生
- 422
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 18
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-admin-node 的其他 Issue
-
Password policy violation is reported as `auth/internal-error` instead of a specific error code可能已有人在做 @lahirumaramba 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
firebase/firebase-admin-node#3265 · 已指派 1 人 ·
维护者通常 1 天内回复
-
getToken() replays a failed token refresh to later callers while a valid token is cached可能已有人在做 @GUMBOKIM 于 59 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
firebase/firebase-admin-node#3234 ·
维护者通常 1 天内回复
-
[email protected] stable dependency tree fails npm audit via Storage uuid and Firestore google-gax可能重新可做 @lahirumaramba 于 34 天前认领,目前没有进行中的 PR。 未关闭
firebase/firebase-admin-node#3221 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Misleading error message for THIRD_PARTY_AUTH_ERROR: raw "OAuth 2 access token" text surfaced instead of the APNs-specific message可能已有人在做 @milcho0604 于 61 天前认领。 未关闭api: messaging
难度 3/5 1-2 天 新手友好度 70/100
firebase/firebase-admin-node#3215 ·
维护者通常 1 天内回复
-
api: messaging
难度 5/5 一周以上 新手友好度 28/100
firebase/firebase-admin-node#3214 ·
维护者通常 1 天内回复
查看 firebase/firebase-admin-node 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
NaturalIntelligence/fast-xml-parser#890 · 1 条评论 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
zsviczian/obsidian-excalidraw-plugin#3000 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
pnpm/get.pnpm.io#68 ·
-
[BUG] Cloudflare KV binding 模式下 kvDriver.list() 沿用 EdgeOne 语义,字段名不匹配导致 key 格式下初始化 500 并耗尽 list 配额可能已有人在做 @wumingzhinu 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 64/100
OpenListTeam/OpenList-Worker#125 ·
维护者通常 2 天内回复
-
Android (vision-camera-location): HybridLocationManager never quits its HandlerThread on dispose未关闭
难度 2/5 1-3 小时 新手友好度 74/100
margelo/react-native-vision-camera#4217 ·
维护者通常 4 天内回复