node.js - 尝试部署 Firebase 功能,未找到默认服务帐户
问题描述
我正在尝试将以下简单功能上传到我的 firebase 控制台
const functions = require('firebase-functions');
exports.helloWorld = functions.https.onRequest((request, response) => {
response.send("Hello from Firebase!");
});
但是,它失败并出现以下错误:
HTTP Error: 400, Default service account 'myfirebase-projecte@appspot.gserviceaccount.com' doesn't exist. Please recreate this account (for example by disabling and enabling the Cloud Functions API), or specify a different account.
在这一点上,我对 Firebase 和 Google Cloud Platforms 以及可以修复此错误的地方感到困惑。
解决方案
你好,来自兔子洞!我想到了。好像我不小心删除了我的默认服务帐户(谢天谢地在 30 天内),我能够按照这些非常具体和非常有用的说明来恢复它https://cloud.google.com/iam/docs/creating-managing-service -accounts#undeleting因为无法使用控制台界面重新激活。
基本上,您必须找到删除发生的时间,从此事件中获取帐户的 ID,然后使用 Google Cloud 终端使用gcloud beta iam service-accounts undelete [ACCOUNT_ID]
命令恢复它。呸!
推荐阅读
- javascript - 在椭圆中画一个矩形
- php - Asterisk PAMI 发起出站呼叫问题 (PHP)
- javascript - 如何在 ES5 文件中模拟 axios 请求?
- c++ - 如果还使用了 EVP_PKEY_free,C++ OpenSSL RSA_free 会给出分段错误
- java - 在生成的 jOOQ 记录中包含 rowid
- c# - 如何压缩base64字符串
- android - windowLightNavigationBar 在 Android 10 (Q) 上不起作用
- symfony - Mink / behat javascript错误未找到简单场景的元素
- javascript - 如何在反应打字稿中将输入值从孩子传递给父母
- spring - Spring Boot 开发人员应该知道什么?