Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase 错误:16未经身份验证:检索身份验证元数据失败,错误:无法刷新访问令牌_Firebase_Google Cloud Functions - Fatal编程技术网

Firebase 错误:16未经身份验证:检索身份验证元数据失败,错误:无法刷新访问令牌

Firebase 错误:16未经身份验证:检索身份验证元数据失败,错误:无法刷新访问令牌,firebase,google-cloud-functions,Firebase,Google Cloud Functions,完全错误如下所示: Unhandled error Error: 16 UNAUTHENTICATED: Failed to retrieve auth metadata with error: Could not refresh access token: Unsuccessful response status code. Request failed with status code 500 at Object.callErrorFromStatus (/workspace/node_mo

完全错误如下所示:

Unhandled error Error: 16 UNAUTHENTICATED: Failed to retrieve auth metadata with error: Could not refresh access token: Unsuccessful response status code. Request failed with status code 500
at Object.callErrorFromStatus (/workspace/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client.js:327:49)
at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
at /workspace/node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78
at processTicksAndRejections (internal/process/task_queues.js:79:11)
Caused by: Error
at Query._get (/workspace/node_modules/@google-cloud/firestore/build/src/reference.js:1449:23)
at Query.get (/workspace/node_modules/@google-cloud/firestore/build/src/reference.js:1438:21)
at Object.getTeacherDataWithFilters (/workspace/lib/teachers/methods.js:168:81)
at /workspace/lib/teachers/callable.js:22:36
at func (/workspace/node_modules/firebase-functions/lib/providers/https.js:273:32)
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
code: 16,
details: 'Failed to retrieve auth metadata with error: Could not refresh access token: Unsuccessful response status code. Request failed with status code 500',
metadata: Metadata { internalRepr: Map {}, options: {} }

我最近部署到firebase函数,现在我遇到了这个错误。我不知道发生了什么,也找不到与此相关的任何具体内容。我已经找到了真正的原因,这就是为什么我要回答我自己的问题。我出现此错误的原因是,附加到此项目的默认服务帐户(类似于
@appspot.gserviceaccount.com
)已禁用。启用后,一切正常。

您能分享导致此错误的代码吗?我已解决此问题,原因是默认服务帐户被禁用:皮特为我工作。您可以为我的问题添加您的答案:请提供有关如何进入服务帐户的图片或说明。