0
几个小时前,我们的应用程序启动失败谷歌云功能的数据存储连接问题
Error: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
at (/user_code/node_modules/@google-cloud/datastore/node_modules/grpc/src/node/src/client.js:442)
据我所知客户端库使用应用程序默认凭据的方法的情况下,如果没有权限,文件传递到数据库连接实例,或者没有env。指定的变量。我们没有在远程Google Cloud Functions执行环境中使用这些文件中的任何文件。
const db = new require("@google-cloud/datastore")();
而且我知道我没有看到任何其他方式并生成凭证文件并在db初始化期间显式传递它。
const db = new require("@google-cloud/datastore")({
keyFilename: "./configs/db_key.json"
});
如果有人知道这种行为的原因 - 请分享。
谷歌云功能仍处于测试阶段,所以这可能是一个服务中断问题。如果您的问题在24小时后仍然存在,请考虑通过Google问题跟踪器报告问题。 –