[FR] Allow @google-cloud/storage v9 — v8 emits MaxListenersExceededWarning on every download (teeny-request stream path)
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 62/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- google-cloud, node.js, typescript
调研方向
首先阅读将@google-cloud/storage声明为可选依赖项的包元数据,并检查现有的依赖项兼容性测试。扩大支持范围,将^9.0.0纳入其中,然后运行相关测试套件并确认 Storage 9 可以被接受。声明的范围和测试都支持新的主版本后,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Is your feature request related to a problem? Please describe.
[email protected] declares @google-cloud/storage as ^8.1.0 (optionalDependencies), so an Admin SDK app resolves Storage 8.4.0. On that version every File.createReadStream() / File.download() emits a MaxListenersExceededWarning:
(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [PassThrough]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [PassThrough]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
(These are copied verbatim from our production logs. The error and close warnings arrive as a pair, within a millisecond of each other.)
It is not a leak (heap stays flat over hundreds of downloads). But Node prints it to stderr, outside any structured logger, and to anyone reading the logs it looks like a leak.
The cause, as far as we traced it (Storage 8.4.0, teeny-request 11.1.1, Node 24):
- teeny-request's stream mode pipes the response into its
requestStreamPassThrough (teeny-request/build/src/index.js,pipeline(responseStream, requestStream, ...)); - Storage's
createReadStreampipes that same raw response stream again, into itsthroughStream(@google-cloud/storage/build/cjs/src/file.js,pipeline(rawResponseStream, ...transformStreams, throughStream, onComplete)); - together with node-fetch's own pipeline, three
stream.pipelinecalls attach theirerrorandcloselisteners to the one PassThrough, which crosses the default limit of 10.
@google-cloud/[email protected] (released 2026-11-12) no longer depends on teeny-request (it uses gaxios 8), which removes this code path. We have not yet confirmed that the warning is gone on Storage 9; we're inferring it from the dependency change. Admin SDK users can't take Storage 9 without an overrides entry outside the SDK's declared range.
Describe the solution you'd like
Widen the @google-cloud/storage range to allow ^9.0.0 (its engines is node >=22, the same as firebase-admin@14), once it passes your test suite.
Describe alternatives you've considered
npm overridesforcing Storage 9: it works around the warning, but it runs the app on a Storage major the SDK hasn't been tested against.emitter.setMaxListeners()/--no-warnings: these hide the symptom and also hide real listener leaks.
Additional context
- firebase-admin 14.5.0 / 14.5.1, @google-cloud/storage 8.4.0, teeny-request 11.1.1, Node.js 24.
- We've seen it both in production (Cloud Run, Node 24) and against the Firebase Storage emulator.
- 主要语言
- TypeScript
- 星标
- 1.8k
- 派生
- 429
- 平均合并
- 4 天 19 小时
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
firebase/firebase-admin-node 的其他 Issue
-
Server-side Remote Config: evaluate() throws SyntaxError when a custom signal regex condition uses RE2-only syntax such as (?i)可能已有人在做 @0z5a 于 2 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
firebase/firebase-admin-node#3320 ·
维护者通常 2 天内回复
-
getToken() replays a failed token refresh to later callers while a valid token is cached可能已有人在做 @lahirumaramba 于 11 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
firebase/firebase-admin-node#3234 · 2 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
Misleading error message for THIRD_PARTY_AUTH_ERROR: raw "OAuth 2 access token" text surfaced instead of the APNs-specific message可能已有人在做 @milcho0604 于 97 天前认领。 未关闭api: messaging
难度 3/5 1-2 天 新手友好度 70/100
firebase/firebase-admin-node#3215 ·
维护者通常 2 天内回复
-
api: messaging
难度 5/5 一周以上 新手友好度 28/100
firebase/firebase-admin-node#3214 ·
维护者通常 2 天内回复
-
[Firestore] Re-export functions from '@google-cloud/firestore/pipelines'可能重新可做 @jonathanedey 于 140 天前认领,目前没有进行中的 PR。 未关闭api: firestore type: feature request
firebase/firebase-admin-node#3183 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 2 天内回复
查看 firebase/firebase-admin-node 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
ai-driven-qa bug claude Cosmetic
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
Domain / chatbot New
难度 2/5 1-3 小时 新手友好度 65/100
Inist-CNRS/lodex#3861 ·
维护者通常 1 天内回复
-
area:agent-sdk area:docs documentation enhancement
难度 2/5 1-3 小时 新手友好度 66/100
anthropics/claude-code#110914 ·
-
area/cli platform/windows type/bug version/v2
难度 2/5 1-3 小时 新手友好度 70/100
anomalyco/opencode#64631 · 1 条评论 ·
维护者通常 1 天内回复