部署云功能后错误:无法刷新访问令牌. [英] After deploy Cloud Functions error: Could not refresh access token.
问题描述
我已经尝试使用Firebase Cloud Functions了一段时间,今天,在Firebase控制台>功能>日志上进行部署后,今天我对index.json文件进行了较小的更改(在要设置的文档中添加了一个字段)我有这个奇怪的错误:
I've been experimenting for a while with Firebase Cloud Functions, today I made a minor change to my index.json file (added a field to a document to be set), after deploying on the Firebase Console > Functions > Logs I've got this weird errors:
Auth error:Error: Could not refresh access token.
和:
Error: 16 UNAUTHENTICATED: Getting metadata from plugin failed with error: Could not refresh access token.
at new createStatusError (/user_code/node_modules/firebase-admin/node_modules/grpc/src/client.js:65:15)
at /user_code/node_modules/firebase-admin/node_modules/grpc/src/client.js:568:15
以下是我尝试过但无法正常工作的列表:
Here's a list of things I tried but did not work:
- 还原index.json中的更改
- 部署每个功能(使问题变得更糟,现在我的所有云功能都无法正常工作)
- 为@ google-cloud/storage生成新的密钥文件名
- npm更新firebase-admin
- (正在重新启动)
我上次成功完成firebase deploy
的时间是昨晚.
我在linux上.
The last time I did a firebase deploy
successfully was last night.
I'm on linux.
谢谢.
推荐答案
在此,尤其是通过我们的技术支持渠道,感谢所有人提供的报告-确实有帮助.
Thanks everyone for the reports, both here and especially also via our tech support channels - these really help.
我们认为该问题是由Node.js依赖链中的一个问题引起的,尤其是对于Firestore用户而言.我们刚刚发布了 https://www.npmjs.com/package/google-gax 0.14.5以解决该问题.请:
We believe the issue to have been caused by a problem deep in our Node.js dependency chain, in particular for users of Firestore. We've just released https://www.npmjs.com/package/google-gax 0.14.5 to address the issue. Please:
- 要么等待npm缓存获取新版本,要么在package.json中明确请求google-gax 0.14.5.
- 重新部署您的功能.
那应该解决问题.如果您仍然遇到问题,请告诉我们!
That should resolve things. If you're still having trouble, please let us know!
这篇关于部署云功能后错误:无法刷新访问令牌.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!