我在代码中初始化了SDK,但是当我调用管理函数时,它会抱怨凭证和令牌。知道这是什么导致的吗?
var serviceAccount = require('../../../path to the actual json file);
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: 'https://<name of my database>.firebaseio.com'
});
输出
Error fetching user d
我的代码: import admin from "firebase-admin";
const path = `./service-account-key.json`;
admin.initializeApp({
credential: path,
});
// Get uid from user email
var uid = "";
const email = "bearcodes@outlook.com";
admin.auth().getUserByEmail(email)
.then(function (u
我在尝试发送FCM通知时遇到问题。我认为这是由于服务器限制了对外部的访问。我需要知道的是firebase-admin为认证或发送fcm而点击的URL或IP是什么?因为错误消息中的IP似乎总是更改的。
Credential implementation provided to initializeApp() via the \"credential\" property failed to fetch a valid Google OAuth2 access token with the following error: \"Error fetching access t
我正在构建NodeJs服务器,并尝试利用FCM进行推送通知。在本地,一切都按预期工作,但在K8S集群中,我收到以下错误 FirebaseAppError: Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Error fetching access token: Missing error payl
我正在努力通过Firebase Admin连接模拟Firebase Auth服务。我减少了代码,以使问题真正突出,并希望有人能帮助。
这是我运行的test.js的代码(在NodeJS中):
// Someone said these two lines should allow the firebase-admin
// SDK to connect to the emulators, but... no.
process.env['GCLOUD_PROJECT'] = 'my-firebase-project-id'
process.env['FIRE
我正在尝试设置admin,并创建了一个新的私钥。我甚至回到了一个只有admin的旧版本,它不能工作。有什么东西可以缓存在我的设备上吗?
Nest application successfully started NestApplication true
Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "
昨天晚上,我部署了我的函数,部署成功,没有任何错误。
但当我试图执行/调用该函数时,它抛出了以下错误,并登录到firebase控制台:
{ Error: Failed to import the Cloud Storage client library for Node.js. Make sure to install the "@google-cloud/storage" npm package. Original error: SyntaxError: Unexpected token {
at new FirebaseError (/srv/node_module
首先,这是一个错误。
Promise { <pending> }
nodejsproject\node_modules\firebase-admin\lib\utils\error.js:44
var _this = _super.call(this, errorInfo.message) || this;
^
FirebaseAppError: Credential implementation provided to initializeApp() via the "credential" p
我正在为我的web项目使用firebase。尤其是在服务器端。我跟踪了官方的医生。
和它说过,
// Firebase App (the core Firebase SDK) is always required and
// must be listed before other Firebase SDKs
import * as firebase from "firebase/app";
// Add the Firebase services that you want to use
import "firebase/auth";
import "
好的,我想我知道为什么会发生这个错误,因为firebase还没有初始化,但是我正在尝试访问它,但是我不明白为什么,因为我相信我在我的index.html中初始化了它。认为这是一种操作顺序/async的事情?
无论如何,我正在部署到Firebase主机上,所以根据
Initialize Firebase in your app (no need to include your Firebase config object when using reserved Hosting URLs):
我应该能够将<script src="/__/firebase/init.js"&
它到底是什么意思,我该如何解决它?
Failed to load resource: the server responded with a status of 404 ()
firebaseNamespaceCore.ts:106 Uncaught FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase
App.initializeApp() (app/no-app).
at f (https://www.gstatic.com/firebasejs/
虽然Firebase.initializeApp()只需要调用一次,但是调用它一次会带来负面后果吗?
背景:我正在对一个[core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()错误进行故障排除,并通过在void ()异步中添加await Firebase.initializeApp();来临时修复它,并添加了我先前存在的final Future<FirebaseApp> _fbApp = Firebase.initializeApp();。
现
我正在尝试部署下一个JS应用程序,它使用Vercel上的firebase-admin。
import * as firebaseAdmin from 'firebase-admin';
import firebase from 'firebase/app';
if (!firebaseAdmin.apps.length) {
firebaseAdmin.initializeApp({
credential: firebaseAdmin.credential.cert({
privateKey: process.env.NEXT_PUBL