我有一个 nodeJS 项目,我正在尝试从 v2(Cloud Run)Firebase 函数上传一个文件。
代码大部分时间都有效,但偶尔会出现以下错误:
错误:“请求https://storage.googleapis.com/storage/v1/b/my-project-id.appspot.com/o/images%2FXYZ_ImageFront.jpg?失败,原因:客户端网络套接字在建立安全 TLS 连接之前断开连接”
这里是堆栈跟踪:
at ClientRequest.<anonymous> (/workspace/node_modules/node-fetch/lib/index.js:1491:11)
at ClientRequest.emit (node:events:513:28)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketErrorListener (node:_http_client:494:9)
at TLSSocket.emit (node:events:513:28)
at TLSSocket.emit (node:domain:489:12)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
at entryFromArgs (/workspace/node_modules/firebase-functions/lib/logger/index.js:130:19)
at Object.error (/workspace/node_modules/firebase-functions/lib/logger/index.js:116:11)
我在用:
"firebase-admin": "^10.3.0",
"firebase-functions": "^4.2.0",