Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Issue with database.enableLogging #2808

Unanswered
GogoVega asked this question in Q&A
Discussion options

Hi all,
I use enableLogging to know if the URL has been rejected by the database. It works as expected with firebase-js-sdk but not here.

My basic code looks like:

import { cert, initializeApp } from "firebase-admin/app";
import { enableLogging, getDatabase } from "firebase-admin/database";
enableLogging(function (msg) {
 console.log("My logger:", msg);
});
const options = {
 databaseURL: 'https://random-project-name-default-rtdb.firebaseio.com/',
 credential: cert({...}),
};
const app = initializeApp(options);
const database = getDatabase(app);
database.ref().get();

But I only get this default log, the second one from enableLogging is missing.

2024年12月16日T14:08:15.452Z] @firebase/database: FIREBASE WARNING: Firebase error. Please ensure that you have the URL of your Firebase Realtime Database instance configured correctly. (https://random-project-name-default-rtdb.firebaseio.com/) 

Do you have any idea why?

Thank you.

You must be logged in to vote

Replies: 1 comment

Comment options

Hi @lahirumaramba,
Should I open an issue for this possible bug?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /