Firebase Cloud Functions全量抛出INTERNAL: Received RST_STREAM错误求助
Firebase Cloud Functions 全量抛出RST_STREAM协议错误排查求助
我有一个包含上百个Google Cloud Functions的Firebase应用,此前运行无异常。在使用Firebase模拟器完成开发测试并部署至生产环境后,所有函数均抛出如下错误:
handleUserSignInzn8bkxir2zxo Unhandled error Error: 13 INTERNAL: Received RST_STREAM with code 2 triggered by internal client error: Protocol error at callErrorFromStatus (/workspace/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/call.js:31:19) at Object.onReceiveStatus (/workspace/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/client.js:357:73) at Object.onReceiveStatus (/workspace/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181) at /workspace/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/resolving-call.js:94:78 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) for call at at ServiceClientImpl.makeServerStreamRequest (/workspace/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/client.js:340:32) at ServiceClientImpl.<anonymous> (/workspace/node_modules/google-gax/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19) at /workspace/node_modules/@google-cloud/firestore/build/src/v1/firestore_client.js:227:29 at /workspace/node_modules/google-gax/build/src/streamingCalls/streamingApiCaller.js:38:28 at /workspace/node_modules/google-gax/build/src/normalCalls/timeout.js:44:16 at Object.request (/workspace/node_modules/google-gax/build/src/streamingCalls/streaming.js:130:40) at Timeout.makeRequest [as _onTimeout] (/workspace/node_modules/retry-request/index.js:141:28) at listOnTimeout (node:internal/timers:569:17) at process.processTimers (node:internal/timers:512:7) Caused by: Error at Firestore.getAll (/workspace/node_modules/@google-cloud/firestore/build/src/index.js:1028:23) at DocumentReference.get (/workspace/node_modules/@google-cloud/firestore/build/src/reference.js:232:32) at /workspace/lib/Users/handleUserSignIn.js:52:40 at fixedLen (/workspace/node_modules/firebase-functions/lib/v1/providers/https.js:74:41) at /workspace/node_modules/firebase-functions/lib/common/providers/https.js:458:32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { code: 13, details: 'Received RST_STREAM with code 2 triggered by internal client error: Protocol error', metadata: Metadata { internalRepr: Map(0) {}, options: {} } }
已完成以下排查步骤:
- 回滚至模拟器开发前确认可用的生产环境旧提交并重新部署,问题仍存在;
- 检查环境配置,确保模拟器设置未被误应用到生产环境;
- 将所有相关依赖(firebase-admin、google-gax、@grpc/grpc-js等)更新至最新版本;
- 确认Firestore查询及函数未违反已知限制或最佳实践。
恳请协助排查该错误的触发原因。
内容的提问来源于stack exchange,提问作者Devon Allary
相关产品推荐
相关产品推荐

